menus

package
v0.0.0-...-f342502 Latest Latest
Warning

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

Go to latest
Published: Feb 20, 2017 License: GPL-3.0 Imports: 5 Imported by: 1

Documentation

Index

Constants

View Source
const (
	LeftRight = 1 << iota
	UpDown    = 1 << iota
	YX        = 1 << iota
	RightLeft = 0
	DownUp    = 0
	XY        = 0
)

Variables

This section is empty.

Functions

func CreateMenus

func CreateMenus(window *sdl.Window, surface *sdl.Surface, renderer *sdl.Renderer, controlManager *inputManager.ControlManager) inputManager.Update

Types

type AnimationDirection

type AnimationDirection int
type Menu struct {
	// contains filtered or unexported fields
}
func (menu *Menu) Open(highlightedItem int, menuInfo *MenuInfo) inputManager.Update
type MenuAction struct {
	Select func(menuInfo *MenuInfo, menuItem *MenuItem) int
	Up     func(menuInfo *MenuInfo, menuItem *MenuItem) int
	Down   func(menuInfo *MenuInfo, menuItem *MenuItem) int
	Left   func(menuInfo *MenuInfo, menuItem *MenuItem) int
	Right  func(menuInfo *MenuInfo, menuItem *MenuItem) int
}
type MenuGeneratorInfo struct {
	// contains filtered or unexported fields
}

func LoadMenuGeneratorInfo

func LoadMenuGeneratorInfo(menuItemAnimation *MenuItemAnimation, backgroundPath string, buttonTexts []string, fontPath string) MenuGeneratorInfo
func (menuGeneratorInfo *MenuGeneratorInfo) GenerateMenuShellOneColumn(renderer *sdl.Renderer, x, y, dx, dy int32) Menu

TODO Make sdl_tff work!

type MenuInfo struct {
	// contains filtered or unexported fields
}
type MenuItem struct {
	// contains filtered or unexported fields
}
type MenuItemAnimation struct {
	FrameLength        uint64
	AnimationDirection AnimationDirection
	// contains filtered or unexported fields
}

func LoadMenuAnimation

func LoadMenuAnimation(highlightedPath, notHighlightedPath string, dx, dy int32) MenuItemAnimation
func (animation *MenuItemAnimation) Generate(renderer *sdl.Renderer) (*sdl.Texture, *sdl.Texture, []*sdl.Rect, uint64)

Jump to

Keyboard shortcuts

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