Public Member Functions | Public Attributes

Text Class Reference

#include <Text.h>

List of all members.

Public Member Functions

void setFont (const char *filename, bool mono_spaced)
void setXY (u32 pixel_x, u32 pixel_y)
void setMetrics (i32 glyph_spacing, i32 line_spacing, u32 max_width, u32 max_lines)
u32 getGlyphHeight () const
i32 getVerticalSpacing () const
void print (char *str)
void print (char *str, u32 nx, u32 ny)
char * printLine (char *str, u32 line)
u32 printLines (char *str, u32 from_line, u32 to_line)
char * nextLineSplit (char *str)
void resetEffects ()

Public Attributes

i32 lineSpacing
i32 glyphSpacing
u32 maxWidth
u32 maxLines

Detailed Description

A bitmap font text renderer.

LOWPRIO: There are MAJOR uglyness in this code. Cleanup needed

KNOWN BUG: The color parsing code is kind of broken, but it's too boring to debug it.

Special text styles can be achieved by using the escape char '~' followed by a command in the input string:

cRGBA - Base color. RGBA are numbers in [0, 9] b - Bold (not yet implemented) i - Italic (not yet implemented) r - Reset all flags


The documentation for this class was generated from the following files:
 All Classes Functions