RigsofRods
Soft-body Physics Simulation
|
Helper for drawing multiline wrapped & colored text. More...
#include <GUIUtils.h>
Public Member Functions | |
ImTextFeeder (ImDrawList *_drawlist, ImVec2 _origin) | |
void | AddInline (ImU32 color, ImVec2 text_size, const char *text, const char *text_end) |
No wrapping or trimming. More... | |
void | AddWrapped (ImU32 color, float wrap_width, const char *text, const char *text_end) |
Wraps entire input. Trims leading blanks on extra lines. wrap_width=-1.f disables wrapping. More... | |
void | AddMultiline (ImU32 color, float wrap_width, const char *text, const char *text_end) |
Wraps substrings separated by blanks. wrap_width=-1.f disables wrapping. More... | |
void | NextLine () |
Data Fields | |
ImDrawList * | drawlist |
ImVec2 | cursor |
Next draw position, screen space. More... | |
ImVec2 | origin |
First draw position, screen space. More... | |
ImVec2 | size = ImVec2(0,0) |
Accumulated text size. More... | |
Helper for drawing multiline wrapped & colored text.
Definition at line 27 of file GUIUtils.h.
|
inline |
Definition at line 29 of file GUIUtils.h.
void RoR::ImTextFeeder::AddInline | ( | ImU32 | color, |
ImVec2 | text_size, | ||
const char * | text, | ||
const char * | text_end | ||
) |
No wrapping or trimming.
Definition at line 35 of file GUIUtils.cpp.
void RoR::ImTextFeeder::AddMultiline | ( | ImU32 | color, |
float | wrap_width, | ||
const char * | text, | ||
const char * | text_end | ||
) |
Wraps substrings separated by blanks. wrap_width=-1.f
disables wrapping.
Definition at line 71 of file GUIUtils.cpp.
void RoR::ImTextFeeder::AddWrapped | ( | ImU32 | color, |
float | wrap_width, | ||
const char * | text, | ||
const char * | text_end | ||
) |
Wraps entire input. Trims leading blanks on extra lines. wrap_width=-1.f
disables wrapping.
Definition at line 43 of file GUIUtils.cpp.
void RoR::ImTextFeeder::NextLine | ( | ) |
Definition at line 117 of file GUIUtils.cpp.
ImVec2 RoR::ImTextFeeder::cursor |
Next draw position, screen space.
Definition at line 40 of file GUIUtils.h.
ImDrawList* RoR::ImTextFeeder::drawlist |
Definition at line 39 of file GUIUtils.h.
ImVec2 RoR::ImTextFeeder::origin |
First draw position, screen space.
Definition at line 41 of file GUIUtils.h.
ImVec2 RoR::ImTextFeeder::size = ImVec2(0,0) |
Accumulated text size.
Definition at line 42 of file GUIUtils.h.