#include <GUIFont.h>
|
| GUIFont () |
|
| ~GUIFont () |
|
void | CreateFontTex () |
|
void | ReleaseFontTex () |
|
bool | IsCharValid (unsigned char c) const |
|
int | GetHeight () const |
|
int | AlignText_Center (int width, std::string_view str) |
|
int | GetLineWidth (std::string_view str) |
|
int | CalcTextHeight (std::string_view str, int width, int x_offset, bool return_on_carriage=false) |
|
std::string | GetPageTop (std::string_view pInString, GUIWindow *pWindow, unsigned int uX, int a5) |
|
Color | DrawTextLine (std::string_view text, Color color, Color defaultColor, Pointi position, int max_len_pix) |
|
void | DrawText (GUIWindow *window, Pointi position, Color color, std::string_view text, int maxHeight, Color shadowColor) |
|
int | DrawTextInRect (GUIWindow *window, Pointi position, Color color, std::string_view text, int rect_width, int reverse_text) |
|
std::string | FitTextInAWindow (std::string_view inString, int width, int uX, bool return_on_carriage=false) |
|
void | DrawCreditsEntry (GUIFont *pSecondFont, int uFrameX, int uFrameY, unsigned int w, unsigned int h, Color firstColor, Color secondColor, std::string_view pString, GraphicsImage *image) |
|
int | GetStringHeight2 (GUIFont *secondFont, std::string_view text_str, GUIWindow *pWindow, int startX, int a6) |
|
|
static std::unique_ptr< GUIFont > | LoadFont (std::string_view pFontFile, std::string_view pFontPalette) |
|
◆ GUIFont()
◆ ~GUIFont()
◆ AlignText_Center()
int GUIFont::AlignText_Center |
( |
int |
width, |
|
|
std::string_view |
str |
|
) |
| |
◆ CalcTextHeight()
int GUIFont::CalcTextHeight |
( |
std::string_view |
str, |
|
|
int |
width, |
|
|
int |
x_offset, |
|
|
bool |
return_on_carriage = false |
|
) |
| |
◆ CreateFontTex()
void GUIFont::CreateFontTex |
( |
| ) |
|
◆ DrawCreditsEntry()
void GUIFont::DrawCreditsEntry |
( |
GUIFont * |
pSecondFont, |
|
|
int |
uFrameX, |
|
|
int |
uFrameY, |
|
|
unsigned int |
w, |
|
|
unsigned int |
h, |
|
|
Color |
firstColor, |
|
|
Color |
secondColor, |
|
|
std::string_view |
pString, |
|
|
GraphicsImage * |
image |
|
) |
| |
◆ DrawText()
void GUIFont::DrawText |
( |
GUIWindow * |
window, |
|
|
Pointi |
position, |
|
|
Color |
color, |
|
|
std::string_view |
text, |
|
|
int |
maxHeight, |
|
|
Color |
shadowColor |
|
) |
| |
◆ DrawTextInRect()
int GUIFont::DrawTextInRect |
( |
GUIWindow * |
window, |
|
|
Pointi |
position, |
|
|
Color |
color, |
|
|
std::string_view |
text, |
|
|
int |
rect_width, |
|
|
int |
reverse_text |
|
) |
| |
◆ DrawTextLine()
Color GUIFont::DrawTextLine |
( |
std::string_view |
text, |
|
|
Color |
color, |
|
|
Color |
defaultColor, |
|
|
Pointi |
position, |
|
|
int |
max_len_pix |
|
) |
| |
Draws a single line of text.
- Parameters
-
text | Input line of text. |
color | Color that the text should be started to be drawn at - this allows feeding in the color returned from the previous call to maintain correct color when its split onto a new line. |
defaultColor | The color that the text should return to on hitting a default color tag. |
position | Position to draw the text line to. |
max_len_pix | The maximum allowed width for this line of text. |
- Returns
- Color that was used to draw text at the end of the line.
◆ DrawTextLineToBuff()
void GUIFont::DrawTextLineToBuff |
( |
Color |
color, |
|
|
Color * |
uX_buff_pos, |
|
|
std::string_view |
text, |
|
|
int |
line_width |
|
) |
| |
|
private |
◆ FitTextInAWindow()
std::string GUIFont::FitTextInAWindow |
( |
std::string_view |
inString, |
|
|
int |
width, |
|
|
int |
uX, |
|
|
bool |
return_on_carriage = false |
|
) |
| |
◆ FitTwoFontStringINWindow()
std::string GUIFont::FitTwoFontStringINWindow |
( |
std::string_view |
inString, |
|
|
GUIFont * |
pFontSecond, |
|
|
GUIWindow * |
pWindow, |
|
|
int |
startPixlOff, |
|
|
bool |
return_on_carriage = false |
|
) |
| |
|
private |
◆ GetHeight()
int GUIFont::GetHeight |
( |
| ) |
const |
◆ GetLineWidth()
int GUIFont::GetLineWidth |
( |
std::string_view |
str | ) |
|
◆ GetPageTop()
std::string GUIFont::GetPageTop |
( |
std::string_view |
pInString, |
|
|
GUIWindow * |
pWindow, |
|
|
unsigned int |
uX, |
|
|
int |
a5 |
|
) |
| |
◆ GetStringHeight2()
int GUIFont::GetStringHeight2 |
( |
GUIFont * |
secondFont, |
|
|
std::string_view |
text_str, |
|
|
GUIWindow * |
pWindow, |
|
|
int |
startX, |
|
|
int |
a6 |
|
) |
| |
◆ IsCharValid()
bool GUIFont::IsCharValid |
( |
unsigned char |
c | ) |
const |
◆ LoadFont()
std::unique_ptr< GUIFont > GUIFont::LoadFont |
( |
std::string_view |
pFontFile, |
|
|
std::string_view |
pFontPalette |
|
) |
| |
|
static |
◆ ReleaseFontTex()
void GUIFont::ReleaseFontTex |
( |
| ) |
|
◆ fontshadow
◆ fonttex
◆ maxcharwidth
int GUIFont::maxcharwidth = 0 |
◆ palette
◆ pData
The documentation for this class was generated from the following files: