Richard Boegli's CnC_Generals_Zero_Hour Fork WIP
This is documentation of Richard Boegil's Zero Hour Fork
 
Loading...
Searching...
No Matches
Render2DTextClass Class Reference

#include <render2d.h>

Inherits Render2DClass.

Public Member Functions

 Render2DTextClass (Font3DInstanceClass *font=NULL)
 
 ~Render2DTextClass ()
 
virtual void Reset (void)
 
Font3DInstanceClassPeek_Font (void)
 
void Set_Font (Font3DInstanceClass *font)
 
void Set_Location (const Vector2 &loc)
 
void Set_Wrapping_Width (float width)
 
void Set_Clipping_Rect (const RectClass &rect)
 
bool Is_Clipping_Enabled (void) const
 
void Enable_Clipping (bool onoff)
 
void Draw_Text (const char *text, unsigned long color=0xFFFFFFFF)
 
void Draw_Text (const WCHAR *text, unsigned long color=0xFFFFFFFF)
 
void Draw_Block (const RectClass &screen, unsigned long color=0xFFFFFFFF)
 
const RectClassGet_Draw_Extents (void)
 
const RectClassGet_Total_Extents (void)
 
const Vector2Get_Cursor (void)
 
Vector2 Get_Text_Extents (const WCHAR *text)
 
- Public Member Functions inherited from Render2DClass
 Render2DClass (TextureClass *tex=NULL)
 
virtual ~Render2DClass (void)
 
void Render (void)
 
void Set_Coordinate_Range (const RectClass &range)
 
void Set_Texture (TextureClass *tex)
 
TextureClassPeek_Texture (void)
 
void Set_Texture (const char *filename)
 
void Enable_Additive (bool b)
 
void Enable_Alpha (bool b)
 
void Enable_Grayscale (bool b)
 added for generals to draw disabled button states - MW
 
void Enable_Texturing (bool b)
 
ShaderClassGet_Shader (void)
 
void Add_Quad (const Vector2 &v0, const Vector2 &v1, const Vector2 &v2, const Vector2 &v3, const RectClass &uv, unsigned long color=0xFFFFFFFF)
 
void Add_Quad_Backfaced (const Vector2 &v0, const Vector2 &v1, const Vector2 &v2, const Vector2 &v3, const RectClass &uv, unsigned long color=0xFFFFFFFF)
 
void Add_Quad (const RectClass &screen, const RectClass &uv, unsigned long color=0xFFFFFFFF)
 
void Add_Quad (const Vector2 &v0, const Vector2 &v1, const Vector2 &v2, const Vector2 &v3, unsigned long color=0xFFFFFFFF)
 
void Add_Quad (const RectClass &screen, unsigned long color=0xFFFFFFFF)
 
void Add_Quad_VGradient (const Vector2 &v0, const Vector2 &v1, const Vector2 &v2, const Vector2 &v3, const RectClass &uv, unsigned long top_color, unsigned long bottom_color)
 
void Add_Quad_VGradient (const RectClass &screen, unsigned long top_color, unsigned long bottom_color)
 
void Add_Quad_HGradient (const Vector2 &v0, const Vector2 &v1, const Vector2 &v2, const Vector2 &v3, const RectClass &uv, unsigned long left_color, unsigned long right_color)
 
void Add_Quad_HGradient (const RectClass &screen, unsigned long left_color, unsigned long right_color)
 
void Add_Tri (const Vector2 &v0, const Vector2 &v1, const Vector2 &v2, const Vector2 &uv0, const Vector2 &uv1, const Vector2 &uv2, unsigned long color=0xFFFFFFFF)
 
void Add_Line (const Vector2 &a, const Vector2 &b, float width, unsigned long color=0xFFFFFFFF)
 
void Add_Line (const Vector2 &a, const Vector2 &b, float width, const RectClass &uv, unsigned long color=0xFFFFFFFF)
 
void Add_Line (const Vector2 &a, const Vector2 &b, float width, unsigned long color, unsigned long color2)
 
void Add_Line (const Vector2 &a, const Vector2 &b, float width, const RectClass &uv, unsigned long color, unsigned long color2)
 
void Add_Outline (const RectClass &rect, float width=1.0F, unsigned long color=0xFFFFFFFF)
 
void Add_Outline (const RectClass &rect, float width, const RectClass &uv, unsigned long color=0xFFFFFFFF)
 
void Add_Rect (const RectClass &rect, float border_width=1.0F, uint32 border_color=0xFF000000, uint32 fill_color=0xFFFFFFFF)
 
void Set_Hidden (bool hide)
 
void Set_Z_Value (float z_value)
 
void Move (const Vector2 &a)
 
void Force_Alpha (float alpha)
 
void Force_Color (int color)
 
DynamicVectorClass< unsigned long > & Get_Color_Array (void)
 
- Public Member Functions inherited from W3DMPO
virtual ~W3DMPO ()
 

Additional Inherited Members

- Static Public Member Functions inherited from Render2DClass
static ShaderClass Get_Default_Shader (void)
 
static void Set_Screen_Resolution (const RectClass &screen)
 
static const RectClassGet_Screen_Resolution (void)
 
- Protected Member Functions inherited from Render2DClass
Vector2 Convert_Vert (const Vector2 &v)
 
void Convert_Vert (Vector2 &vert_out, const Vector2 &vert_in)
 
void Convert_Vert (Vector2 &vert_out, float x_in, float y_in)
 
void Update_Bias (void)
 
void Internal_Add_Quad_Vertices (const Vector2 &v0, const Vector2 &v1, const Vector2 &v2, const Vector2 &v3)
 
void Internal_Add_Quad_Vertices (const RectClass &screen)
 
void Internal_Add_Quad_UVs (const RectClass &uv)
 
void Internal_Add_Quad_Colors (unsigned long color)
 
void Internal_Add_Quad_VColors (unsigned long color1, unsigned long color2)
 
void Internal_Add_Quad_HColors (unsigned long color1, unsigned long color2)
 
void Internal_Add_Quad_Indicies (int start_vert_index, bool backfaced=false)
 
- Protected Member Functions inherited from W3DMPO
virtual int glueEnforcer () const =0
 
- Protected Attributes inherited from Render2DClass
Vector2 CoordinateScale
 
Vector2 CoordinateOffset
 
Vector2 BiasedCoordinateOffset
 
TextureClassTexture
 
ShaderClass Shader
 
DynamicVectorClass< unsigned short > Indices
 
unsigned short PreAllocatedIndices [60]
 
DynamicVectorClass< Vector2Vertices
 
Vector2 PreAllocatedVertices [60]
 
DynamicVectorClass< Vector2UVCoordinates
 
Vector2 PreAllocatedUVCoordinates [60]
 
DynamicVectorClass< unsigned long > Colors
 
unsigned long PreAllocatedColors [60]
 
bool IsHidden
 
bool IsGrayScale
 
float ZValue
 
- Static Protected Attributes inherited from Render2DClass
static RectClass ScreenResolution
 

Detailed Description

Definition at line 204 of file render2d.h.

Constructor & Destructor Documentation

◆ Render2DTextClass()

Render2DTextClass::Render2DTextClass ( Font3DInstanceClass * font = NULL)

Definition at line 712 of file render2d.cpp.

◆ ~Render2DTextClass()

Render2DTextClass::~Render2DTextClass ( )

Definition at line 726 of file render2d.cpp.

Member Function Documentation

◆ Draw_Block()

void Render2DTextClass::Draw_Block ( const RectClass & screen,
unsigned long color = 0xFFFFFFFF )

Definition at line 837 of file render2d.cpp.

◆ Draw_Text() [1/2]

void Render2DTextClass::Draw_Text ( const char * text,
unsigned long color = 0xFFFFFFFF )

Definition at line 792 of file render2d.cpp.

◆ Draw_Text() [2/2]

void Render2DTextClass::Draw_Text ( const WCHAR * text,
unsigned long color = 0xFFFFFFFF )

Definition at line 800 of file render2d.cpp.

◆ Enable_Clipping()

void Render2DTextClass::Enable_Clipping ( bool onoff)
inline

Definition at line 220 of file render2d.h.

◆ Get_Cursor()

const Vector2 & Render2DTextClass::Get_Cursor ( void )
inline

Definition at line 229 of file render2d.h.

◆ Get_Draw_Extents()

const RectClass & Render2DTextClass::Get_Draw_Extents ( void )
inline

Definition at line 227 of file render2d.h.

◆ Get_Text_Extents()

Vector2 Render2DTextClass::Get_Text_Extents ( const WCHAR * text)

Definition at line 847 of file render2d.cpp.

◆ Get_Total_Extents()

const RectClass & Render2DTextClass::Get_Total_Extents ( void )
inline

Definition at line 228 of file render2d.h.

◆ Is_Clipping_Enabled()

bool Render2DTextClass::Is_Clipping_Enabled ( void ) const
inline

Definition at line 219 of file render2d.h.

◆ Peek_Font()

Font3DInstanceClass * Render2DTextClass::Peek_Font ( void )
inline

Definition at line 211 of file render2d.h.

◆ Reset()

void Render2DTextClass::Reset ( void )
virtual

Reimplemented from Render2DClass.

Definition at line 731 of file render2d.cpp.

◆ Set_Clipping_Rect()

void Render2DTextClass::Set_Clipping_Rect ( const RectClass & rect)
inline

Definition at line 218 of file render2d.h.

◆ Set_Font()

void Render2DTextClass::Set_Font ( Font3DInstanceClass * font)

Definition at line 742 of file render2d.cpp.

◆ Set_Location()

void Render2DTextClass::Set_Location ( const Vector2 & loc)
inline

Definition at line 214 of file render2d.h.

◆ Set_Wrapping_Width()

void Render2DTextClass::Set_Wrapping_Width ( float width)
inline

Definition at line 215 of file render2d.h.


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