#include <CUI_VarBMFont.h>
Inheritance diagram for CUI_VarBMFont:
Public Member Functions | |
CUI_VarBMFont (IUI_Shader *shader=NULL, int xres=256, int yres=256, unsigned char *widths=NULL) | |
Constructor. | |
virtual | ~CUI_VarBMFont () |
Destructor - deletes the temporary texcoord lookup table. | |
virtual bool | CalculateLookupTable (unsigned char *widths) |
(Re)Calculate the texture table | |
virtual bool | RenderText (double dtime, IUI_Renderer *renderer, char *text) |
Base implementation. | |
virtual bool | RenderText (double dtime, IUI_Renderer *renderer, char *text, unsigned int columns, unsigned int rows, unsigned int startColumn, unsigned int startRow, bool wrap, unsigned int &textColumns, unsigned int &textRows, bool invert=false, unsigned int cursorPosition=0, unsigned short cursorType=UI_CURSOR_NONE) |
Render specifying number of rows & columns and where to start. | |
virtual bool | Count (char *text, unsigned int columns, unsigned int rows, bool wrap, unsigned int &textColumns, unsigned int &textRows) |
Count the number of columns and rows without rendering. | |
virtual bool | SetShader (IUI_Shader *shader) |
Set the shader to use for this font. | |
virtual bool | SetWidths (unsigned char *widths) |
New character widths. | |
Protected Attributes | |
IUI_Shader * | m_shader |
the shader to use for the bitmapped font. | |
int | m_resx |
X resolution of the bitmap (in pixels). | |
int | m_resy |
Y resolution of the bitmap (in pixels). | |
v4_f | m_textureTable [256 *4] |
Texture coordinate lookup table. | |
float | m_charwidth [256] |
array of widths in floats (1.0 is full character width) |
A bitmapped front with variable-width characters.
Uses texture and font width data generated by bitmap font builder: http://lmnopc.com/bitmapfontbuilder/ All fonts must be full 256 character ascii, 16 characters per row, 16 characters per column.
|
Constructor. Create a specific font
|
|
Render specifying number of rows & columns and where to start.
Used by CUI_TextBox Implements IUI_Font. |
|
Base implementation.
Default text renderer. Everything must fit into [0,1] unit square. Implements IUI_Font. |