OpenBarnyard
 
Loading...
Searching...
No Matches
AGUI2Font.h
Go to the documentation of this file.
1#pragma once
2#include "AGUI2Material.h"
3#include "AGUI2FontResource.h"
4
18
33
35{
36public:
43
44public:
45 AGUI2Font() = default;
46
47 TBOOL Create( AGUI2FontDef* a_pFontDef );
48
49 void DrawTextWrapped( const TWCHAR* a_wszText, TFLOAT a_fX, TFLOAT a_fY, TFLOAT a_fWidth, TFLOAT a_fHeight, TUINT32 a_uiColour, TFLOAT a_fScale, TextAlign a_eAlign, void* a_fnCallback = TNULL );
50 void DrawTextSingleLine( const TWCHAR* a_wszText, TINT a_iTextLength, TFLOAT a_fX, TFLOAT a_fY, TUINT32 a_uiColour, TFLOAT a_fScale, void* a_fnCallback = TNULL );
51
52 TFLOAT GetTextHeightWrapped( const TWCHAR* a_wszText, TFLOAT a_fMaxWidth, TFLOAT a_fScale = 1.0f );
53 TFLOAT GetTextWidth( const TWCHAR* a_wszText, TFLOAT a_fScale = 1.0f );
54 TFLOAT GetTextWidth( const TWCHAR* a_wszText, TINT a_iTextLength, TFLOAT a_fScale = 1.0f );
55
57
58private:
59 AGUI2FontDef* m_pFontDef = TNULL;
60 AGUI2Material** m_ppMaterials = TNULL;
61 TBOOL m_bFlag = TFALSE;
62};
63
uint16_t TUINT16
Definition Typedefs.h:15
int32_t TINT32
Definition Typedefs.h:12
wchar_t TWCHAR
Definition Typedefs.h:21
unsigned int TUINT
Definition Typedefs.h:8
char TCHAR
Definition Typedefs.h:20
uint8_t TUINT8
Definition Typedefs.h:17
float TFLOAT
Definition Typedefs.h:4
#define TNULL
Definition Typedefs.h:23
uint32_t TUINT32
Definition Typedefs.h:13
int TINT
Definition Typedefs.h:7
#define TFALSE
Definition Typedefs.h:24
bool TBOOL
Definition Typedefs.h:6
int8_t TINT8
Definition Typedefs.h:16
TUINT16 ui16MaxCharacter
Definition AGUI2Font.h:27
TUINT8 uiNumMaterials
Definition AGUI2Font.h:26
TUINT8 uiLineHeight
Definition AGUI2Font.h:25
TINT32 Unk3
Definition AGUI2Font.h:29
const TCHAR * szTextureNames
Definition AGUI2Font.h:22
TUINT8 uiLinesMargin
Definition AGUI2Font.h:24
TINT8 iLetterSpacing
Definition AGUI2Font.h:23
TUINT16 ui16MinCharacter
Definition AGUI2Font.h:28
AGUI2FontDefCharacterData * pCharactersData
Definition AGUI2Font.h:31
void * Unk1
Definition AGUI2Font.h:21
TINT32 * pCharactersMap
Definition AGUI2Font.h:30
TBOOL Create(AGUI2FontDef *a_pFontDef)
Definition AGUI2Font.cpp:13
void DrawTextWrapped(const TWCHAR *a_wszText, TFLOAT a_fX, TFLOAT a_fY, TFLOAT a_fWidth, TFLOAT a_fHeight, TUINT32 a_uiColour, TFLOAT a_fScale, TextAlign a_eAlign, void *a_fnCallback=nullptr)
Definition AGUI2Font.cpp:34
TFLOAT GetTextHeightWrapped(const TWCHAR *a_wszText, TFLOAT a_fMaxWidth, TFLOAT a_fScale=1.0f)
TFLOAT GetTextWidth(const TWCHAR *a_wszText, TFLOAT a_fScale=1.0f)
AGUI2Font()=default
@ TextAlign_Center
Definition AGUI2Font.h:40
@ TextAlign_Right
Definition AGUI2Font.h:41
@ TextAlign_Left
Definition AGUI2Font.h:39
void DrawTextSingleLine(const TWCHAR *a_wszText, TINT a_iTextLength, TFLOAT a_fX, TFLOAT a_fY, TUINT32 a_uiColour, TFLOAT a_fScale, void *a_fnCallback=nullptr)
TFLOAT GetLinesMargin()
AGUI2FontResource * pFontResource
Definition AGUI2Font.h:69
void * Unk1
Definition AGUI2Font.h:68
TCHAR * szName
Definition AGUI2Font.h:66
AGUI2Font * pFont
Definition AGUI2Font.h:67
TUINT uiNumRefs
Definition AGUI2Font.h:70