Documentation ¶
Index ¶
- type Button
- type Canvas
- type CommonCanvas
- func (canvas *CommonCanvas) ChangePosition(position geometry.Position)
- func (canvas CommonCanvas) Elements() []Canvas
- func (canvas CommonCanvas) Height() float64
- func (canvas *CommonCanvas) Hide()
- func (canvas CommonCanvas) IsUnderPosition(geometry.Position) bool
- func (canvas CommonCanvas) IsVisible() bool
- func (canvas CommonCanvas) Position() geometry.Position
- func (canvas *CommonCanvas) Show()
- func (canvas CommonCanvas) Width() float64
- type Font
- type FrameSize
- type InteractiveCanvas
- type Layer
- type Layout
- func (l *Layout) AddElement(drawer Canvas, relativePosition ...geometry.Position)
- func (l *Layout) ChangePosition(position geometry.Position)
- func (l *Layout) Clear()
- func (l *Layout) Draw(on Layer)
- func (l *Layout) Elements() []Canvas
- func (l *Layout) EmitVerticalScroll(vector float64) bool
- func (l Layout) Height() float64
- func (l *Layout) Hide()
- func (l Layout) IsScrollable() bool
- func (l *Layout) IsUnderPosition(position geometry.Position) bool
- func (l *Layout) IsVisible() bool
- func (l Layout) Position() geometry.Position
- func (l *Layout) Show()
- func (l Layout) Width() float64
- type Scroll
- type Sprite
- type SpriteCanvas
- func (canvas *SpriteCanvas) ChangeSprite(withSprite *Sprite)
- func (canvas SpriteCanvas) Draw(on Layer)
- func (canvas SpriteCanvas) Height() float64
- func (canvas SpriteCanvas) IsUnderPosition(position geometry.Position) bool
- func (canvas SpriteCanvas) Sprite() *Sprite
- func (canvas SpriteCanvas) Width() float64
- type TextCanvas
- type Window
- func (w *Window) AddLayer(layer *Layout, position geometry.Position)
- func (w *Window) Close()
- func (w Window) Closed() bool
- func (w Window) CursorPosition() geometry.Position
- func (w Window) Draw()
- func (w Window) EndFrame()
- func (w Window) FillWithColor(color color.Color)
- func (w Window) Height() float64
- func (w *Window) LeftButtonClicked() bool
- func (w *Window) StartFrame()
- func (w Window) Width() float64
- type WindowConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Button ¶
type Button struct { SpriteCanvas // contains filtered or unexported fields }
func (*Button) EmitMouseOut ¶
func (b *Button) EmitMouseOut()
func (*Button) EmitMouseOver ¶
func (b *Button) EmitMouseOver()
func (*Button) SetClickHandler ¶
func (*Button) SetMouseOutHandler ¶
func (b *Button) SetMouseOutHandler(handler func())
func (*Button) SetMouseOverHandler ¶
func (b *Button) SetMouseOverHandler(handler func())
type CommonCanvas ¶
type CommonCanvas struct {
// contains filtered or unexported fields
}
func (*CommonCanvas) ChangePosition ¶
func (canvas *CommonCanvas) ChangePosition(position geometry.Position)
func (CommonCanvas) Elements ¶
func (canvas CommonCanvas) Elements() []Canvas
func (CommonCanvas) Height ¶
func (canvas CommonCanvas) Height() float64
func (*CommonCanvas) Hide ¶
func (canvas *CommonCanvas) Hide()
func (CommonCanvas) IsUnderPosition ¶
func (canvas CommonCanvas) IsUnderPosition(geometry.Position) bool
func (CommonCanvas) IsVisible ¶
func (canvas CommonCanvas) IsVisible() bool
func (CommonCanvas) Position ¶
func (canvas CommonCanvas) Position() geometry.Position
func (*CommonCanvas) Show ¶
func (canvas *CommonCanvas) Show()
func (CommonCanvas) Width ¶
func (canvas CommonCanvas) Width() float64
type Font ¶
type Font struct {
// contains filtered or unexported fields
}
func (Font) CalculateWidthInPixels ¶
type InteractiveCanvas ¶
type Layout ¶
type Layout struct {
// contains filtered or unexported fields
}
func (*Layout) AddElement ¶
func (*Layout) ChangePosition ¶
func (*Layout) EmitVerticalScroll ¶
EmitVerticalScroll todo delegate to another system.
func (Layout) IsScrollable ¶
type SpriteCanvas ¶
type SpriteCanvas struct { CommonCanvas // contains filtered or unexported fields }
func NewSpriteCanvas ¶
func NewSpriteCanvas(sprite *Sprite) *SpriteCanvas
func (*SpriteCanvas) ChangeSprite ¶
func (canvas *SpriteCanvas) ChangeSprite(withSprite *Sprite)
func (SpriteCanvas) Draw ¶
func (canvas SpriteCanvas) Draw(on Layer)
func (SpriteCanvas) Height ¶
func (canvas SpriteCanvas) Height() float64
func (SpriteCanvas) IsUnderPosition ¶
func (canvas SpriteCanvas) IsUnderPosition(position geometry.Position) bool
func (SpriteCanvas) Sprite ¶
func (canvas SpriteCanvas) Sprite() *Sprite
func (SpriteCanvas) Width ¶
func (canvas SpriteCanvas) Width() float64
type TextCanvas ¶
type TextCanvas struct { CommonCanvas // contains filtered or unexported fields }
func NewTextCanvas ¶
func (*TextCanvas) AddLineBreaks ¶
func (canvas *TextCanvas) AddLineBreaks()
func (*TextCanvas) ChangeText ¶
func (canvas *TextCanvas) ChangeText(text string)
func (TextCanvas) Draw ¶
func (canvas TextCanvas) Draw(on Layer)
func (TextCanvas) Height ¶
func (canvas TextCanvas) Height() float64
func (TextCanvas) Text ¶
func (canvas TextCanvas) Text() string
func (TextCanvas) Width ¶
func (canvas TextCanvas) Width() float64
type Window ¶
type Window struct {
// contains filtered or unexported fields
}
func NewWindow ¶
func NewWindow(preset WindowConfig) *Window
func (Window) CursorPosition ¶
func (Window) FillWithColor ¶
func (*Window) LeftButtonClicked ¶
func (*Window) StartFrame ¶
func (w *Window) StartFrame()
Click to show internal directories.
Click to hide internal directories.