Documentation ¶
Index ¶
- func Border(decoration string)
- func BotRight() (positionX, positionY int, drawDirectionX, drawDirectionY float64)
- func Center() (positionX, positionY int, drawDirectionX, drawDirectionY float64)
- func CenterLeft() (positionX, positionY int, drawDirectionX, drawDirectionY float64)
- func CenterRight() (positionX, positionY int, drawDirectionX, drawDirectionY float64)
- func CenterTop() (positionX, positionY int, drawDirectionX, drawDirectionY float64)
- func Draw(anchor Anchor, color Color, text interface{})
- func Green() (fg, bg termbox.Attribute)
- func Inverted() (fg, bg termbox.Attribute)
- func Magenta() (fg, bg termbox.Attribute)
- func MiddleLeft() (positionX, positionY int, drawDirectionX, drawDirectionY float64)
- func MiddleRight() (positionX, positionY int, drawDirectionX, drawDirectionY float64)
- func Normal() (fg, bg termbox.Attribute)
- func Origin() (positionX, positionY int, drawDirectionX, drawDirectionY float64)
- func SetCursor(anchor Anchor)
- func TopLeft() (positionX, positionY int, drawDirectionX, drawDirectionY float64)
- func TopRight() (positionX, positionY int, drawDirectionX, drawDirectionY float64)
- type Anchor
- type Color
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Center ¶
Center is an Anchor in the center-middle of the terminal that draws from the center outward.
func CenterLeft ¶
CenterLeft is an Anchor in the center-middle of the terminal that draws toward the left side.
func CenterRight ¶
CenterRight is an Anchor in the center-middle of the terminal that draws toward the right side.
func CenterTop ¶
CenterTop is an Anchor in the center-middle of the terminal that draws toward the top.
func Draw ¶
Draw is a general function for drawing to the terminal. The text can be a rune, a string, or a multiline string, which will be drawn relative to the specified anchor. This function should always be used instead of termbox.SetCell().
func Inverted ¶
func Inverted() (fg, bg termbox.Attribute)
Inverted is a Color that inverts the text and background color to appear as a highlight.
func MiddleLeft ¶ added in v0.0.3
MiddleLeft is an Anchor that is vertically centered and on the left edge of the game window.
func MiddleRight ¶
MiddleRight is an Anchor that is vertically centered and on the right edge of the game window.
func SetCursor ¶
func SetCursor(anchor Anchor)
SetCursor uses an Anchor to determine the position of the cursor, so it can be used in conjunction with Draw to place the cursor.