plastk

package
v0.0.0-...-2c69ca6 Latest Latest
Warning

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

Go to latest
Published: Oct 5, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DrawMenuBar

func DrawMenuBar(targImage *ebiten.Image, targColor color.Color, targFont *text.GoTextFace, menuHeight int, menu ...[]MenuBarColumn)
func MenuBarDetectClicked(column int, line int) bool
func MenuBarDetectClickedByID(columnID string) bool

make detection easier

func ReNewImg

func ReNewImg(image *ebiten.Image, targetwidth int, targetheight int, targetcolor color.Color) *ebiten.Image

renew image. if same size, return same image

func TransformColumn

func TransformColumn([]MenuBarColumn) []string

Types

type MenuBarColumn struct {
	// three column types currently avaliable: button, dropdown, separator
	ColumnType string
	// title of column
	ColumnName string
	// Information of column
	ColumnDesc string
	// if column type is button, other than 0 is ignored.
	// separator never has column.
	ColumnBase []MenuBarColumn
	// Detect if Button
	ColumnID string
}

Jump to

Keyboard shortcuts

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