ui

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Dec 21, 2022 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type HChoice

type HChoice struct {
	Text    *lang.Text
	Handler func(string) // option click handler, or nil if disabled
}

type HorzChoice

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

func NewHorzChoice

func NewHorzChoice(ctx *misc.Context, font *etxt.Font) *HorzChoice

func (*HorzChoice) AddChoice

func (self *HorzChoice) AddChoice(text *lang.Text, handler func(string))

func (*HorzChoice) AddHChoice

func (self *HorzChoice) AddHChoice(opt *HChoice)

func (*HorzChoice) DrawHiRes

func (self *HorzChoice) DrawHiRes(screen *ebiten.Image, zoomLevel float64)

func (*HorzChoice) SetBaseOpacity

func (self *HorzChoice) SetBaseOpacity(opacity uint8)

func (*HorzChoice) SetLogFontSize

func (self *HorzChoice) SetLogFontSize(size int)

func (*HorzChoice) SetLogHorzPadding

func (self *HorzChoice) SetLogHorzPadding(padding int)

func (*HorzChoice) SetLogOptSeparation

func (self *HorzChoice) SetLogOptSeparation(separation int)

func (*HorzChoice) SetTopLeft

func (self *HorzChoice) SetTopLeft(x, y int)

func (*HorzChoice) Unfocus

func (self *HorzChoice) Unfocus()

func (*HorzChoice) Update

func (self *HorzChoice) Update(logCursorX, logCursorY int)
type Menu struct {
	// contains filtered or unexported fields
}

func NewMenu

func NewMenu(ctx *misc.Context, font *etxt.Font, mainOptions []*lang.Text, handler func(string)) *Menu
func (self *Menu) AtRoot() bool
func (self *Menu) DrawHiRes(screen *ebiten.Image, zoomLevel float64)
func (self *Menu) NavIn() bool
func (self *Menu) NavOut()
func (self *Menu) NavRoot()
func (self *Menu) NavTo(option string) bool
func (self *Menu) SetBaseOpacity(opacity uint8)
func (self *Menu) SetCenter(x, y int)
func (self *Menu) SetCenterTop(x, y int)
func (self *Menu) SetLogFontSize(size int)
func (self *Menu) SetLogHorzPadding(padding int)
func (self *Menu) SetLogOptSeparation(separation int)
func (self *Menu) SetSubOptions(option string, subOptions []*lang.Text, handler func(string)) bool

Sets the submenu options for the current options level

func (self *Menu) Unselect()
func (self *Menu) Update(logCursorX, logCursorY int)
type MenuOption struct {
	Text    *lang.Text
	SubNode *SubMenu
}
type SubMenu struct {
	// contains filtered or unexported fields
}
func (self *SubMenu) CallHandler()
func (self *SubMenu) NavDepth(depth int) *SubMenu
func (self *SubMenu) NavTo(option string) bool
func (self *SubMenu) SetSubOptions(option string, subOptions []*lang.Text, handler func(string)) bool
func (self *SubMenu) Unselect()

Jump to

Keyboard shortcuts

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