#include <CUI_FixedBMFont.h>
Inheritance diagram for CUI_FixedBMFont:
Public Member Functions | |
CUI_FixedBMFont (IUI_Shader *shader=NULL, int charx=16, int chary=24, int xres=256, int yres=256, int startoffset=0) | |
Constructor. | |
virtual | ~CUI_FixedBMFont () |
Destructor - deletes the temporary texcoord lookup table. | |
virtual bool | CalculateLookupTable () |
(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 | SetCharSize (int charx, int chary) |
Set the width and height (in pixels) of each character in the bitmap. | |
virtual bool | SetBitmapResolution (int resx, int resy) |
Set resolution (in pixels) of the bitmap. | |
virtual bool | SetCharPerRow (int charperrow) |
Set the number of characters per row in the bitmap. | |
virtual bool | SetOffset (int offset) |
Set the offset from '!' of the first character in the font. | |
Protected Attributes | |
IUI_Shader * | m_shader |
the shader to use for the bitmapped font. | |
int | m_charx |
Fixed width of characters (in pixels). | |
int | m_chary |
Fixed height of characters (in pixels). | |
int | m_resx |
X resolution of the bitmap (in pixels). | |
int | m_resy |
Y resolution of the bitmap (in pixels). | |
int | m_charperrow |
Characters per row. | |
int | m_startoffset |
offset from '!' that the font starts at | |
v4_f * | m_textureTable |
Texture coordinate lookup table. |
A bitmapped front with fixed-width characters.
Uses a texture coordinate lookup table (generated in the constructor) to speed up rendering.
|
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. |