Documentation
¶
Index ¶
- Constants
- Variables
- func CopyPixel(image *ebiten.Image, pXsrc int, pYsrc int, pXdst int, pYdst int)
- func DrawRectangle(screen *ebiten.Image, x1 int, y1 int, x2 int, y2 int, c color.Color)
- func Floodfill(image *ebiten.Image, x int, y int, c color.Color)
- func GetTextYOffset() int
- func GetUIFont() font.Face
- func LoadImage(path string) *ebiten.Image
- type Background
- type Button
- type CheckBox
- type Input
- type Keyboard
- func (k *Keyboard) Clear()
- func (k *Keyboard) DisableFeedback()
- func (k *Keyboard) Draw(dst *ebiten.Image)
- func (k *Keyboard) EnableFeedback(pos image.Point, widthB int)
- func (k *Keyboard) GetBuffer() string
- func (k *Keyboard) GetString() string
- func (k *Keyboard) SetOnPressed(f func(k *Keyboard))
- func (k *Keyboard) Update()
- type NumPad
- func (k *NumPad) Clear()
- func (k *NumPad) DisableFeedback()
- func (k *NumPad) Draw(dst *ebiten.Image)
- func (k *NumPad) EnableFeedback(pos image.Point, widthB int)
- func (k *NumPad) GetBuffer() string
- func (k *NumPad) GetString() string
- func (k *NumPad) SetFeedbackColor(color color.Color)
- func (k *NumPad) SetMax(max int)
- func (k *NumPad) SetMin(min int)
- func (k *NumPad) SetOnPressed(f func(k *NumPad))
- func (k *NumPad) Update()
- type Text
- type TextBox
- type VScrollBar
Constants ¶
const VScrollBarWidth = 16
VScrollBarWidth is width for VScrollBar.
Variables ¶
var BackgroundType = goecs.NewComponentType()
BackgroundType is the ComponentType of Background
var ButtonType = goecs.NewComponentType()
ButtonType is the ComponentType of Button
var TextType = goecs.NewComponentType()
TextType is the ComponentType of Text
Functions ¶
func DrawRectangle ¶
DrawRectangle draw
Types ¶
type Background ¶
Background represents background.
func NewBackground ¶
func NewBackground(x int, y int, image *ebiten.Image) *Background
NewBackground ...
func (*Background) Draw ¶
func (b *Background) Draw(dst *ebiten.Image, op *ebiten.DrawImageOptions)
Draw renders content
func (Background) Type ¶
func (b Background) Type() goecs.ComponentType
Type will return Button goecs.ComponentType
type Button ¶
Button represents button ui.
func (*Button) SetOnPressed ¶
SetOnPressed register callback.
func (Button) Type ¶
func (b Button) Type() goecs.ComponentType
Type will return Button goecs.ComponentType
type CheckBox ¶
CheckBox represents check box ui.
func (*CheckBox) SetOnCheckChanged ¶
SetOnCheckChanged set onCheckChanged handlers.
type Keyboard ¶
Keyboard ...
func (*Keyboard) EnableFeedback ¶
EnableFeedback enables
func (*Keyboard) SetOnPressed ¶
SetOnPressed register callback.
type NumPad ¶
NumPad ...
func (*NumPad) EnableFeedback ¶
EnableFeedback enables
func (*NumPad) SetFeedbackColor ¶
SetFeedbackColor ...
func (*NumPad) SetOnPressed ¶
SetOnPressed register callback.
type Text ¶
Text represents text ui.
func (Text) Type ¶
func (t Text) Type() goecs.ComponentType
Type will return Button goecs.ComponentType
type TextBox ¶
TextBox represents text box ui.
type VScrollBar ¶
VScrollBar represents vertical scroll bar.
func (*VScrollBar) Update ¶
func (v *VScrollBar) Update(contentHeight int)
Update handles input and scroll.