Documentation
¶
Overview ¶
Package tbutils provides a small number of helper functions for displaying text in a termbox
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CalculateXCenterCoord ¶
CalculateXCenterCoord calculates the x coordinate to write a string to so it is centred in the termbox. If the text is longer than the width of the termbox then this function returns 0
func DrawLine ¶
DrawLine adds a single line of text to the termbox's back buffer. If the line is too long to fit in the termbox, it will be split across multiple lines. This function is the equivalent of calling DrawRichLine(x,y,text,termbox.ColorDefault,termbox.ColorDefault)
func DrawRichLine ¶ added in v0.3.1
DrawRichLine adds a single line of text to the termbox's back buffer. If the line is too long to fit in the termbox, it will be split across multiple lines.
func DrawRichText ¶ added in v0.3.1
DrawRichText takes a string and adds it to the termbox's back buffer. If the string contains any newline characters, it'll be split across multiple rows. If the string is too long to find in the termbox, it'll be split across multiple lines to fit.
func DrawText ¶
DrawText take a string and adds it to the termbox's back buffer. If the string contains any newline characters, the string will be split across multiple rows. If the string is too long to fit in the termbox, it'll be split across multiple lines to fit. This function is the equivalent of calling DrawRichText(x,y,text,termbox.ColorDefault,termbox.ColorDefault)
Types ¶
This section is empty.