Documentation ¶
Index ¶
- type AudioEvent
- type AudioEventListener
- type ControlEvent
- type ControlEventListener
- type CursorPoint
- type DrawEvent
- type DrawEventListener
- type DrawLayersEvent
- type KeyEvent
- type KeyEventListener
- type KeysRegistrationEvent
- type KeysRegistrationEventListener
- type MouseEvent
- type MouseEventListener
- type MultilineTextEvent
- type PlayAudioEvent
- type StopAudioEvent
- type TextEvent
- type TextEventListener
- type VorpalBus
- type WindowSizeEvent
- type WindowTitleEvent
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AudioEvent ¶
type AudioEvent interface {
GetAudioFile() string
}
type AudioEventListener ¶
type AudioEventListener interface {
OnAudioEvent(audioChannel <-chan AudioEvent)
}
type ControlEvent ¶
type ControlEvent interface{}
func NewWindowTitleEvent ¶
func NewWindowTitleEvent(data string) ControlEvent
/////WindowTitleEvent//////
type ControlEventListener ¶
type ControlEventListener interface {
OnControlEvent(controlChannel <-chan ControlEvent)
}
type DrawEvent ¶
type DrawEvent interface { }
/////////// DrawEvent and the drawEvent struct are no-ops or signaling at best.
func NewDrawEvent ¶
func NewDrawEvent() DrawEvent
type DrawEventListener ¶
type DrawEventListener interface {
OnDrawEvent(drawChannel <-chan DrawEvent)
}
type DrawLayersEvent ¶
type DrawLayersEvent interface { DrawEvent Reset() GetImageLayers() []lib.ImageLayerData AddImageLayer(imgLayer lib.ImageLayerData) DrawEvent }
func NewDrawLayersEvent ¶
func NewDrawLayersEvent() DrawLayersEvent
type KeyEvent ¶
type KeyEvent interface { ToRune() rune Equals(keyRune rune) bool EqualsIgnoreCase(keyRune rune) bool IsPressed() bool IsReleased() bool }
func NewKeyEvent ¶
type KeyEventListener ¶
type KeyEventListener interface {
OnKeyEvent(keyChannel <-chan KeyEvent)
}
type KeysRegistrationEvent ¶
type KeysRegistrationEvent interface {
GetRunes() []rune
}
////////////////////////////////////////////////////////////////////
func NewKeyRegistrationEvent ¶
func NewKeyRegistrationEvent(keys []rune) KeysRegistrationEvent
type KeysRegistrationEventListener ¶
type KeysRegistrationEventListener interface {
OnKeyRegistrationEvent(keyRegistrationChannel <-chan KeysRegistrationEvent)
}
type MouseEvent ¶
type MouseEvent interface { GetCursorPoint() CursorPoint IsWheel() bool IsReleased(button mouse.Button) bool IsPressed(button mouse.Button) bool }
func NewMouseEvent ¶
func NewMouseEvent(event mouse.Event) MouseEvent
type MouseEventListener ¶
type MouseEventListener interface {
OnMouseEvent(mouseChannel <-chan MouseEvent)
}
type MultilineTextEvent ¶
type MultilineTextEvent interface { TextEvent lib.Font GetText() []lib.TextLine AddTextLine(lib.TextLine) MultilineTextEvent AddText(string) MultilineTextEvent GetId() int32 }
func NewMultilineTextEvent ¶
func NewMultilineTextEvent(font string, fontSize, x, y int32) MultilineTextEvent
type PlayAudioEvent ¶
type PlayAudioEvent interface { AudioEvent IsLoop() bool }
func NewPlayAudioEvent ¶
func NewPlayAudioEvent(state lib.AudioState) PlayAudioEvent
type StopAudioEvent ¶
type StopAudioEvent interface { AudioEvent }
func NewStopAudioEvent ¶
func NewStopAudioEvent(state lib.AudioState) StopAudioEvent
type TextEventListener ¶
type TextEventListener interface {
OnTextEvent(textChannel <-chan TextEvent)
}
type VorpalBus ¶
type VorpalBus interface { ///Individual listeners.... AddKeyEventListener(eventListener KeyEventListener) AddMouseListener(eventListener MouseEventListener) AddDrawEventListener(eventListener DrawEventListener) AddAudioEventListener(eventListener AudioEventListener) AddTextEventListener(eventListener TextEventListener) AddKeysRegistrationEventListener(eventListener KeysRegistrationEventListener) AddControlEventListener(eventListener ControlEventListener) SendMouseEvent(event MouseEvent) SendKeysRegistrationEvent(event KeysRegistrationEvent) SendKeyEvent(event KeyEvent) SendDrawEvent(event DrawEvent) SendAudioEvent(event AudioEvent) SendTextEvent(event TextEvent) SendControlEvent(event ControlEvent) }
func GetVorpalBus ¶
func GetVorpalBus() VorpalBus
type WindowSizeEvent ¶
type WindowSizeEvent interface { ControlEvent GetWindowSize() (int, int) }
func NewWindowSizeEvent ¶
func NewWindowSizeEvent(width, height int) WindowSizeEvent
//WindowSizeEvent
type WindowTitleEvent ¶
type WindowTitleEvent interface { ControlEvent GetTitle() string }
Click to show internal directories.
Click to hide internal directories.