Window

package
v0.0.0-...-9749107 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 4, 2020 License: GPL-3.0 Imports: 6 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Flag

type Flag uint32

func (*Flag) UnmarshalYAML

func (flag *Flag) UnmarshalYAML(value *yaml.Node) error

type IKeyboardInput

type IKeyboardInput interface {
	IsKeyPressed(key string) bool
}

type IMouseInput

type IMouseInput interface {
	GetRelativeMovement() (float32, float32)
}

type IWindow

type IWindow interface {
	FrameBuffer.IFrameBuffer

	SwapWindow()
	PollEvents()
	ShouldClose() bool

	GetTimeDeltaAndFPS() (float32, uint32)

	GetKeyboardInput() IKeyboardInput
	GetMouseInput() IMouseInput
}

type SDLKeyboardInput

type SDLKeyboardInput struct {
	// contains filtered or unexported fields
}

func NewSDLKeyboardInput

func NewSDLKeyboardInput() *SDLKeyboardInput

func (*SDLKeyboardInput) IsKeyPressed

func (input *SDLKeyboardInput) IsKeyPressed(key string) bool

type SDLMouseInput

type SDLMouseInput struct {
	// contains filtered or unexported fields
}

func NewSDLMouseInput

func NewSDLMouseInput() *SDLMouseInput

func (*SDLMouseInput) GetRelativeMovement

func (input *SDLMouseInput) GetRelativeMovement() (float32, float32)

type SDLWindow

type SDLWindow struct {
	FrameBuffer.FrameBuffer
	*sdl.Window

	FpsSmoothing float32

	TitlebarFPS bool
	// contains filtered or unexported fields
}

func NewSDLWindow

func NewSDLWindow(viewport FrameBuffer.Viewport, title string, flags Flag) (*SDLWindow, error)

func (*SDLWindow) Destroy

func (window *SDLWindow) Destroy()

func (*SDLWindow) GetKeyboardInput

func (window *SDLWindow) GetKeyboardInput() IKeyboardInput

func (*SDLWindow) GetMouseInput

func (window *SDLWindow) GetMouseInput() IMouseInput

func (*SDLWindow) GetTimeDeltaAndFPS

func (window *SDLWindow) GetTimeDeltaAndFPS() (float32, uint32)

func (*SDLWindow) GetTitle

func (window *SDLWindow) GetTitle() string

func (*SDLWindow) PollEvents

func (window *SDLWindow) PollEvents()

func (*SDLWindow) SetTitle

func (window *SDLWindow) SetTitle(title string)

func (*SDLWindow) ShouldClose

func (window *SDLWindow) ShouldClose() bool

func (*SDLWindow) SwapWindow

func (window *SDLWindow) SwapWindow()

func (*SDLWindow) UnmarshalYAML

func (window *SDLWindow) UnmarshalYAML(value *yaml.Node) error

type SyncInterval

type SyncInterval int

func (*SyncInterval) UnmarshalYAML

func (sync *SyncInterval) UnmarshalYAML(value *yaml.Node) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL