Text

class guerilla.Text

Bases: guerilla.Window

A static text window, that can display text with user defined style, font and color

gettext()

Get the Text window text string

Returns:The window text
Return type:str
setcolor(color)

Set the Text window color

Parameters:color (ui.color) – The text color
setfont(font, size)

Set the Text window font and size.

This function changes the text font properties. Note that font names are system dependent. Use Text.normal and Text.bold

to use predefined fonts.

param font:The text font face name, or nil for default font
type font:str or None
param size:The text size
type size:number
setshadow(shadowcolor, shadowdistance)

Set the Text window shadowing properties

Parameters:
  • shadowcolor (ui.color) – The text shadow color
  • shadowdistance (number) – The text shadow distance in pixels
settext(text)

Set the Text window text string to display

Parameters:text (str) – The text to display