menu

package
v0.0.0-...-2924a1e Latest Latest
Warning

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

Go to latest
Published: Jan 31, 2022 License: GPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Graphics

type Graphics struct {
	Ratio        float64
	ScreenWidth  int
	ScreenHeight int
	UnitX        int
	UnitY        int
	CenterX      int
	CenterY      int
}

func NewGraphics

func NewGraphics(ratio float64) *Graphics

func (*Graphics) BlankScreen

func (g *Graphics) BlankScreen()

func (*Graphics) DrawBackground

func (g *Graphics) DrawBackground(symbol string, fgColor tb.Attribute, ratio float64)

func (*Graphics) DrawBackgroundFgBg

func (g *Graphics) DrawBackgroundFgBg(symbol string, fgColor tb.Attribute, bgColor tb.Attribute, ratio float64)

func (*Graphics) DrawUnit

func (g *Graphics) DrawUnit(xU int, yU int, symbol string, color tb.Attribute)

func (*Graphics) DrawUnitFgBg

func (g *Graphics) DrawUnitFgBg(xU int, yU int, symbol string, fgColor tb.Attribute, bgColor tb.Attribute)

func (*Graphics) Flush

func (g *Graphics) Flush()

func (*Graphics) GetCenter

func (g *Graphics) GetCenter() (int, int)

func (*Graphics) GetUnits

func (g *Graphics) GetUnits() (int, int)

func (*Graphics) Print

func (g *Graphics) Print(x, y int, msg string, color tb.Attribute)

func (*Graphics) PrintFgBg

func (g *Graphics) PrintFgBg(x, y int, msg string, fgColor tb.Attribute, bgColor tb.Attribute)

func (*Graphics) ReadChar

func (g *Graphics) ReadChar() (rune, error)

func (*Graphics) Readline

func (g *Graphics) Readline(x, y int) string

func (*Graphics) Resize

func (g *Graphics) Resize(ratio float64)

func (*Graphics) SetCursor

func (g *Graphics) SetCursor(x, y int)
type Menu struct {
	Quit        bool
	Multiplayer bool
	Server      bool
	Host        string
	Port        string
	Name        string
	// contains filtered or unexported fields
}

func NewMenu

func NewMenu() *Menu
func (m *Menu) Options()

Jump to

Keyboard shortcuts

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