Documentation ¶
Index ¶
- type Application
- type BottomBar
- func (bb *BottomBar) Destroy()
- func (bb *BottomBar) InBoundary(pt sdl.Point) bool
- func (bb *BottomBar) OnClick(evt *sdl.MouseButtonEvent) bool
- func (bb *BottomBar) OnEnter()
- func (bb *BottomBar) OnLeave()
- func (bb *BottomBar) OnMotion(evt *sdl.MouseMotionEvent) bool
- func (bb *BottomBar) OnResize(x, y int32)
- func (bb *BottomBar) OnScroll(evt *sdl.MouseWheelEvent) bool
- func (bb *BottomBar) Render()
- func (bb *BottomBar) SetBackgroundColor(color []float32)
- func (bb *BottomBar) SetTextColor(color []float32)
- func (bb *BottomBar) String() string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Application ¶
type Application struct {
// contains filtered or unexported fields
}
Application holds state for the tabula application
func (*Application) HandleSdlEvent ¶
func (app *Application) HandleSdlEvent(e sdl.Event)
HandleSdlEvent checks the type of a given SDL event and runs the method associated with that event
func (*Application) PostEventActions ¶
func (app *Application) PostEventActions()
PostEventActions performs any necessary actions following event polling
func (*Application) Running ¶
func (app *Application) Running() bool
Running returns whether the application is still running
type BottomBar ¶
type BottomBar struct {
// contains filtered or unexported fields
}
BottomBar defines a solid color bar with text displays
func NewBottomBar ¶
NewBottomBar returns a pointer to a new BottomBar struct that implements ui.Component the background color defaults to grey (0x808080FF) and the text white
func (*BottomBar) Destroy ¶
func (bb *BottomBar) Destroy()
Destroy frees all assets obtained by the ui.Component
func (*BottomBar) InBoundary ¶
InBoundary returns whether a point is in this ui.Component's bounds
func (*BottomBar) OnClick ¶
func (bb *BottomBar) OnClick(evt *sdl.MouseButtonEvent) bool
OnClick is called when the user clicks within the ui.Component's region
func (*BottomBar) OnEnter ¶
func (bb *BottomBar) OnEnter()
OnEnter is called when the cursor enters the ui.Component's region
func (*BottomBar) OnLeave ¶
func (bb *BottomBar) OnLeave()
OnLeave is called when the cursor leaves the ui.Component's region
func (*BottomBar) OnMotion ¶
func (bb *BottomBar) OnMotion(evt *sdl.MouseMotionEvent) bool
OnMotion is called when the cursor moves within the ui.Component's region
func (*BottomBar) OnScroll ¶
func (bb *BottomBar) OnScroll(evt *sdl.MouseWheelEvent) bool
OnScroll is called when the user scrolls within the ui.Component's region
func (*BottomBar) SetBackgroundColor ¶
SetBackgroundColor sets the color for the bottom bar's background texture
func (*BottomBar) SetTextColor ¶
SetTextColor sets the color for the bottom bar's text elements