ui

package
v0.0.0-...-d03cab4 Latest Latest
Warning

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

Go to latest
Published: Nov 28, 2021 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	TextStyle     = tcell.StyleDefault.Background(tcell.ColorBlack).Foreground(tcell.ColorWhite)
	InfoTextStyle = tcell.StyleDefault.Background(tcell.ColorBlack).Foreground(tcell.ColorCadetBlue)
	BoxStyle      = tcell.StyleDefault.Background(tcell.ColorBlack).Foreground(tcell.ColorWhite)
)

Functions

func CalculateTextWidth

func CalculateTextWidth(text string) int

func CreateScreen

func CreateScreen() tcell.Screen

func DrawDialogue

func DrawDialogue(dialogue rpg.Dialogue, on tcell.Screen, at Pos)

func DrawLocation

func DrawLocation(location data.Location, on tcell.Screen)

func DrawPlayer

func DrawPlayer(player data.Player, on tcell.Screen)

func DrawStatusPanel

func DrawStatusPanel(player data.Player, on tcell.Screen)

func DrawUnit

func DrawUnit(unit Drawer, on tcell.Screen)

Types

type Box

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

func NewBox

func NewBox(x1 int, y1 int, x2 int, y2 int, title ...string) Box

func (Box) Draw

func (b Box) Draw(on tcell.Screen, useStyle ...tcell.Style)

type Drawer

type Drawer interface {
	Icon() rune
	Style() tcell.Style
	Position() data.Position
}

type Pos

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

func NewPosition

func NewPosition(x int, y int) Pos

func (Pos) X

func (p Pos) X() int

func (Pos) Y

func (p Pos) Y() int

type Text

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

func NewText

func NewText(value string, posX int, posY int) Text

func (Text) Draw

func (t Text) Draw(on tcell.Screen, useStyle ...tcell.Style)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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