Documentation ¶
Overview ¶
Bento is an XML based UI builder for Ebiten
Index ¶
Constants ¶
View Source
const ( Click = EventType("Click") Scroll = EventType("Scroll") Hover = EventType("Hover") Change = EventType("Change") Draw = EventType("Draw") Update = EventType("Update") )
View Source
const ( // The items are packed flush to each other toward the start edge of the alignment container in the main axis. // [item1 item2 ] Start = Justification("start") // The items are packed flush to each other toward the end edge of the alignment container in the main axis. // [ item1 item2] End = Justification("end") // The items are packed flush to each other toward the center of the alignment container along the main axis. // [ item1 item2 ] Center = Justification("center") // The items are evenly distributed within the alignment container along the main axis. // The spacing between each pair of adjacent items, the main-start edge and the first item, and the main-end edge and the last item, are all exactly the same. // [ item1 item2 ] Evenly = Justification("evenly") // The items are evenly distributed within the alignment container along the main axis. // The spacing between each pair of adjacent items is the same. // The empty space before the first and after the last item equals half of the space between each pair of adjacent items. // [ item1 item2 ] Around = Justification("around") // The items are evenly distributed within the alignment container along the main axis. // The spacing between each pair of adjacent items is the same. // The first item is flush with the main-start edge, and the last item is flush with the main-end edge. // [item1 item2] Between = Justification("between") )
Variables ¶
This section is empty.
Functions ¶
func ParseButton ¶ added in v0.3.1
e.g. "button.png 6"
func ParseScrollbar ¶ added in v0.3.1
e.g. "scrollbar.png 6"
Types ¶
type Box ¶
type Box struct { Tag string Parent *Box Children []*Box Content string Component Component Attrs map[string]string // contains filtered or unexported fields }
func (*Box) ToggleDebug ¶ added in v0.4.1
func (n *Box) ToggleDebug()
func (*Box) UnmarshalXML ¶ added in v0.3.1
type Justification ¶
type Justification string
func (Justification) Valid ¶ added in v0.3.1
func (j Justification) Valid() bool
type NineSlice ¶
type NineSlice struct {
// contains filtered or unexported fields
}
A NineSlice is an image that can be drawn with any width and height. It is basically a 3x3 grid of image tiles: The corner tiles are drawn as-is, while the center columns and rows of tiles will be stretched to fit the desired width and height.
func NewNineSlice ¶
type Scrollable ¶ added in v0.4.1
type Scrollable struct {
// contains filtered or unexported fields
}
type Style ¶
type Style struct { Extends string Attrs map[string]string FontName string FontSize int Font font.Face Underline bool Border *NineSlice Button *[4]*NineSlice Scrollbar *[3][4]*NineSlice Input *[4]*NineSlice Image *ebiten.Image MinWidth, MinHeight int MaxWidth, MaxHeight int HJust, VJust Justification HJustSelf, VJustSelf Justification HGrow, VGrow int Margin, Padding Spacing Color color.Color OffsetX, OffsetY int Float bool Hidden bool Display bool ScaleX, ScaleY float64 ZIndex int // contains filtered or unexported fields }
Source Files ¶
Click to show internal directories.
Click to hide internal directories.