Documentation
¶
Index ¶
- func MouseInBounds(window *glfw.Window, area Area) bool
- type Alignment
- type Area
- type Button
- func (button Button) Draw(img *image.RGBA, window *glfw.Window) []Area
- func (button Button) GetProperties() Properties
- func (button Button) Initialize(skip SkipAlignment) UIElement
- func (button Button) SetParent(parent *Properties) UIElement
- func (button Button) SetProperties(size Size, center Point) UIElement
- func (button Button) ToString() string
- type Column
- func (column Column) Draw(img *image.RGBA, window *glfw.Window) []Area
- func (column Column) GetProperties() Properties
- func (column Column) Initialize(skip SkipAlignment) UIElement
- func (column Column) SetParent(parent *Properties) UIElement
- func (column Column) SetProperties(size Size, center Point) UIElement
- func (column Column) ToString() string
- type Container
- func (container Container) Draw(img *image.RGBA, window *glfw.Window) []Area
- func (container Container) GetProperties() Properties
- func (container Container) Initialize(skip SkipAlignment) UIElement
- func (container Container) SetParent(parent *Properties) UIElement
- func (container Container) SetProperties(size Size, center Point) UIElement
- func (container Container) ToString() string
- type Padding
- type Point
- type Properties
- type Row
- func (row Row) Draw(img *image.RGBA, window *glfw.Window) []Area
- func (row Row) GetProperties() Properties
- func (row Row) Initialize(skip SkipAlignment) UIElement
- func (row Row) SetParent(parent *Properties) UIElement
- func (row Row) SetProperties(size Size, center Point) UIElement
- func (row Row) ToString() string
- type ScaleType
- type Size
- type SkipAlignment
- type Style
- type StyleText
- type Text
- func (text Text) Draw(img *image.RGBA, window *glfw.Window) []Area
- func (text Text) GetProperties() Properties
- func (text Text) Initialize(skip SkipAlignment) UIElement
- func (text Text) SetParent(parent *Properties) UIElement
- func (text Text) SetProperties(size Size, center Point) UIElement
- func (text Text) ToString() string
- type UIElement
- type UIType
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Button ¶
type Button struct {
Properties Properties
Style Style
Child UIElement
Function func()
Image string
HoverImage string
}
func (Button) GetProperties ¶
func (button Button) GetProperties() Properties
func (Button) Initialize ¶
func (button Button) Initialize(skip SkipAlignment) UIElement
func (Button) SetParent ¶
func (button Button) SetParent(parent *Properties) UIElement
type Column ¶
type Column struct {
Properties Properties
Style Style
Children []UIElement
Image string
}
func (Column) GetProperties ¶
func (column Column) GetProperties() Properties
func (Column) Initialize ¶
func (column Column) Initialize(skip SkipAlignment) UIElement
func (Column) SetParent ¶
func (column Column) SetParent(parent *Properties) UIElement
type Container ¶ added in v0.1.2
type Container struct {
Properties Properties
Style Style
Child UIElement
Image string
}
func (Container) GetProperties ¶ added in v0.1.2
func (container Container) GetProperties() Properties
func (Container) Initialize ¶ added in v0.1.2
func (container Container) Initialize(skip SkipAlignment) UIElement
func (Container) SetParent ¶ added in v0.1.2
func (container Container) SetParent(parent *Properties) UIElement
func (Container) SetProperties ¶ added in v0.1.2
type Properties ¶
type Properties struct {
Center Point
Size Size
Alignment Alignment
Padding Padding
Parent *Properties
Initialized bool
Skip SkipAlignment
Type UIType
}
func DefaultProperties ¶
func DefaultProperties(props Properties, skip SkipAlignment, uitype UIType) Properties
func (Properties) ToString ¶ added in v0.1.2
func (p Properties) ToString() string
type Row ¶
type Row struct {
Properties Properties
Style Style
Children []UIElement
Image string
}
func (Row) GetProperties ¶
func (row Row) GetProperties() Properties
func (Row) Initialize ¶
func (row Row) Initialize(skip SkipAlignment) UIElement
func (Row) SetParent ¶
func (row Row) SetParent(parent *Properties) UIElement
type SkipAlignment ¶
type SkipAlignment byte
const ( SkipAlignmentNone SkipAlignment = 0 SkipAlignmentHoriz SkipAlignment = 1 SkipAlignmentVert SkipAlignment = 2 )
type Style ¶
func DefaultStyle ¶ added in v0.1.2
type StyleText ¶
func DefaultStyleText ¶ added in v0.1.2
type Text ¶
type Text struct {
Properties Properties
StyleText StyleText
}
func (Text) GetProperties ¶
func (text Text) GetProperties() Properties
func (Text) Initialize ¶
func (text Text) Initialize(skip SkipAlignment) UIElement
func (Text) SetParent ¶
func (text Text) SetParent(parent *Properties) UIElement
type UIElement ¶
type UIElement interface {
Draw(img *image.RGBA, window *glfw.Window) []Area
SetProperties(size Size, center Point) UIElement
GetProperties() Properties
Initialize(skip SkipAlignment) UIElement
SetParent(parent *Properties) UIElement
ToString() string
}
func ApplyAlignment ¶
func ApplyPadding ¶
func ApplyRelative ¶
Click to show internal directories.
Click to hide internal directories.