Class DWText¶
Defined in File render_stack.h
Inheritance Relationships¶
Base Type¶
public BlamRendering::RenderStack::StackObjectBase
(Class StackObjectBase)
Class Documentation¶
-
class
DWText
: public BlamRendering::RenderStack::StackObjectBase¶ Class containing data for a text object using DirectWrite.
Public Functions
-
DWText
()¶ Sets the stack type and default zone color.
-
~DWText
()¶ Empty destructor.
-
void
Draw
()¶ Draws the stack object.
Specific functionality may vary depending on the type of object.
-
void
ShowImPropertyEditor
()¶ Shows a set of ImGUI properties associated with the object.
This will call functions to draw only the property controls for the item, and nothing else. The window/container for the properties must be handled externally.
-
void
SetText
(std::string new_text)¶ Sets the text to display.
- Parameters
new_text
: - The new text to display.
-
void
SetFont
(std::string new_font_name)¶ Sets the font to use for the text.
- Parameters
new_font_name
: - The name of the font to use.
-
void
ShowZoneEdge
(bool show)¶ Enables or disables the display of the text area bounds.
- Parameters
show
: - Whether or not to display the zone edge.
-
void
SetZoneColor
(float new_color[3])¶ Sets the color to use for the zone edge.
- Parameters
new_color
: - The new color of the zone edge. Items must be in the following order:
-
void
SetZoneColor
(float r, float g, float b)¶ Sets the color to use for the zone edge.
- Parameters
r
: - The Red value of the color.g
: - The Green value of the color.b
: - The Blue value of the color.
-
void
SetZoneColor
(float r, float g, float b, float a)¶ Sets the color to use for the zone edge.
- Parameters
r
: - The Red value of the color.g
: - The Green value of the color.b
: - The Blue value of the color.a
: - The Alpha value of the color.
-
void
SetZoneColor
(D2D1::ColorF color)¶ Sets the color to use for the zone edge.
- Parameters
color
: - The new color of the zone edge.
-
void
SetFontSize
(float new_size)¶ Sets the size to use for the font.
- Parameters
new_size
: - The new size of the font.
-
void
SetZoneThickness
(float new_thickness)¶ Sets the thickness of the zone edge.
- Parameters
new_thickness
: - The new thickness of the zone edge.
Public Members
-
std::wstring BlamRendering::RenderStack::DWText::text = L"generic text"
The current text to display.
-
std::wstring BlamRendering::RenderStack::DWText::font_name = L"Comic Sans MS"
The current font name. Defaults to Comic Sans MS. :lmao:
-
float
font_size
= 12¶ The size of the text.
-
bool
show_zone
= false¶ Whether or not to show the text zone.
-
D2D1_COLOR_F
zone_color
¶ The color to use for the zone border.
-
float
zone_thickness
= 1¶ The thickness of the zone border.
-
bool
use_engine_font
= false¶ Whether to use a font within the engine or a system font.
-
std::string
engine_font_id
= ""¶ The ID of the font collection to use.
-
IDWriteFontCollection *
font_collection
¶ The thickness of the zone border.
-
char
font_buffer
[256] = ""¶ Font name buffer for ImGUI editor.
-
bool
auto_calculate_area
= false¶ Whether or not to automatically calculate the area for the text.
-