Documentation ¶
Index ¶
- Constants
- func InitTopContainer()
- type BasicComponentImpl
- type Component
- type Image
- type StaticComponentImpl
- type StaticTexturedComponent
- type TexturedComponentImpl
- type TopContainerType
- func (self *TopContainerType) HandleInput(key_events []windows.KeyboardInputEvent, ...) windows.WindowAction
- func (self *TopContainerType) Init()
- func (self *TopContainerType) Program() uint32
- func (self *TopContainerType) Render()
- func (self *TopContainerType) Tick(timedelta float64, key_states []bool)
Constants ¶
View Source
const ( TOP_LEFT = 0 TOP_RIGHT = 1 BOTTOM_LEFT = 2 BOTTOM_RIGHT = 3 )
Variables ¶
This section is empty.
Functions ¶
func InitTopContainer ¶
func InitTopContainer()
Types ¶
type BasicComponentImpl ¶
type BasicComponentImpl struct {
X, Y, W, H int
}
type Component ¶
type Component interface { // Returns true if the Scene cares about input AcceptsInput() bool // Processes input events HandleInput(keyEvents []windows.KeyboardInputEvent, mouseEvents []windows.MouseInputEvent) windows.WindowAction // Update the game frame and process time-dependant input Tick(timedelta float64, keyStates []bool) // Render the component Render() }
type Image ¶
type Image struct { StaticComponentImpl // contains filtered or unexported fields }
type StaticComponentImpl ¶
type StaticComponentImpl struct { }
A partial component implementation that ignores input and ticks
func (*StaticComponentImpl) AcceptsInput ¶
func (self *StaticComponentImpl) AcceptsInput() bool
func (*StaticComponentImpl) HandleInput ¶
func (self *StaticComponentImpl) HandleInput(keyEvents []windows.KeyboardInputEvent, mouseEvents []windows.MouseInputEvent) windows.WindowAction
func (*StaticComponentImpl) Tick ¶
func (self *StaticComponentImpl) Tick(timedelta float64, keyStates []bool)
type StaticTexturedComponent ¶
type StaticTexturedComponent struct { TexturedComponentImpl StaticComponentImpl }
StaticTexturedComponent is a basic component that takes no input and renders a texture
type TexturedComponentImpl ¶
type TexturedComponentImpl struct { BasicComponentImpl // contains filtered or unexported fields }
func (*TexturedComponentImpl) Move ¶
func (c *TexturedComponentImpl) Move(x, y, w, h int)
func (*TexturedComponentImpl) Render ¶
func (c *TexturedComponentImpl) Render()
func (*TexturedComponentImpl) SetTexture ¶
func (c *TexturedComponentImpl) SetTexture(texture uint32, topleft, topright, bottomleft, bottomright mgl32.Vec2)
assign a texture and texture coordinates to this component
type TopContainerType ¶
type TopContainerType struct { windows.SimpleSceneImpl // contains filtered or unexported fields }
var TopContainer *TopContainerType
func (*TopContainerType) HandleInput ¶
func (self *TopContainerType) HandleInput(key_events []windows.KeyboardInputEvent, mouse_events []windows.MouseInputEvent) windows.WindowAction
func (*TopContainerType) Init ¶
func (self *TopContainerType) Init()
func (*TopContainerType) Program ¶
func (self *TopContainerType) Program() uint32
func (*TopContainerType) Render ¶
func (self *TopContainerType) Render()
func (*TopContainerType) Tick ¶
func (self *TopContainerType) Tick(timedelta float64, key_states []bool)
Click to show internal directories.
Click to hide internal directories.