Documentation
¶
Index ¶
- func Color(code uint32) *color.Color
- func ColorCode1(code uint32) *[4]color.Color
- func ColorCodeGradation(topLeft, topRight, bottomRight, bottomLeft uint32) *[4]color.Color
- func ColorCodeHorizontal(left, right uint32) *[4]color.Color
- func ColorCodeVertical(top, bottom uint32) *[4]color.Color
- func Px(value int, calc ...sizeSeg) *sizeSeg
- func Radius1(px int) *[4]int
- func Radius4(topLeft, topRight, bottomRight, bottomLeft int) *[4]int
- func Size1(size *sizeSeg) *[4]sizeSeg
- func Size2(vertical, horizontal *sizeSeg) *[4]sizeSeg
- func Size3(top, horizontal, bottom *sizeSeg) *[4]sizeSeg
- func Size4(top, right, bottom, left *sizeSeg) *[4]sizeSeg
- func Vh(value float32, calc ...sizeSeg) *sizeSeg
- func Vw(value float32, calc ...sizeSeg) *sizeSeg
- type Component
- type DirectionType
- type PositionType
- type Text
- type TextFont
- type TextStyle
- type View
- func (v View) Area() image.Rectangle
- func (v View) Components() []Component
- func (v View) Draw(screen *ebiten.Image, x, y int)
- func (v View) GetSize() image.Point
- func (v View) GetStylesCount() int
- func (v View) IsFloating() bool
- func (v View) PopStyle()
- func (v View) PushStyle(style ViewStyle)
- func (v View) ReplaceStyle(position int, style ViewStyle)
- type ViewStyle
- type Window
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ColorCode1 ¶
func ColorCodeGradation ¶
func ColorCodeHorizontal ¶
func ColorCodeVertical ¶
Types ¶
type DirectionType ¶
type DirectionType = string
const ( Horizontal DirectionType = "horizontal" Vertical DirectionType = "vertical" )
type PositionType ¶
type PositionType = string
const ( First PositionType = "first" Center PositionType = "center" Last PositionType = "last" )
type Text ¶
type Text = *textComponent
func (Text) ChangeText ¶
func (Text) Components ¶
func (Text) IsFloating ¶
type View ¶
type View = *viewComponent
func (View) Components ¶
func (View) GetStylesCount ¶
func (View) IsFloating ¶
func (View) ReplaceStyle ¶
type ViewStyle ¶
type ViewStyle struct {
/* top_left top_right bottom_right bottom_left */
BackgroundColor, BorderColor *[4]color.Color
/* top right bottom left */
Padding, Margin, BorderWidth *[4]sizeSeg
/* top_left top_right bottom_right bottom_left */
Radius *[4]int
Width, Height *sizeSeg
Direction *DirectionType
PositionHorizontal *PositionType
PositionVertical *PositionType
IsFloating bool
}
Click to show internal directories.
Click to hide internal directories.