terminal

package
v0.0.0-...-afd9bea Latest Latest
Warning

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

Go to latest
Published: Jan 22, 2022 License: BSD-3-Clause Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateScreen

func CreateScreen() (tcell.Screen, error)

CreateScreen generates a ready to use screen. The screen has no cursor and doesn't support mouse eventing.

func DrawFilledRectangle

func DrawFilledRectangle(screen tcell.Screen, xStart, yStart, width, height int, style tcell.Style)

DrawFilledRectangle draws a rectangle with the specified style. This removes all runes previously written into the target area of the rectangle.

Types

type Renderer

type Renderer struct {
}

Renderer draws the state.GameSession onto a tcell.Screen. While the Renderer can hold state, it's recommended to keep it as state free as possible.

func NewRenderer

func NewRenderer() *Renderer

NewRenderer creates a ready to use Renderer.

func (*Renderer) Draw

func (renderer *Renderer) Draw(screen tcell.Screen, session *state.GameSession)

Draw renders the passed state.GameSession onto the passed tcell.Screen.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳