gui

package
Version: v0.0.0-...-8b49de5 Latest Latest
Warning

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

Go to latest
Published: Jan 11, 2019 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetSinglePixelTex

func GetSinglePixelTex(renderer *sdl.Renderer, color sdl.Color) *sdl.Texture

Types

type ImageButton

type ImageButton struct {
	Image           *sdl.Texture
	Rect            sdl.Rect
	WasLeftClicked  bool
	WasRightClicked bool
	IsSelected      bool
	SelectedTex     *sdl.Texture
}

func NewImageButton

func NewImageButton(renderer *sdl.Renderer, image *sdl.Texture, rect sdl.Rect, selectedColor sdl.Color) *ImageButton

func (*ImageButton) Draw

func (button *ImageButton) Draw(renderer *sdl.Renderer)

func (*ImageButton) Update

func (button *ImageButton) Update(mouseState *MouseState)

type MouseState

type MouseState struct {
	LeftButton      bool
	RightButton     bool
	PrevLeftButton  bool
	PrevRightButton bool
	PrevX, PrevY    int
	X, Y            int
}

func GetMouseState

func GetMouseState() *MouseState

func (*MouseState) Update

func (mouseState *MouseState) Update()

Source Files

Jump to

Keyboard shortcuts

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