RigsofRods
Soft-body Physics Simulation
Public Member Functions | Data Fields
RoR::ImTextFeeder Struct Reference

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...
 

Detailed Description

Helper for drawing multiline wrapped & colored text.

Definition at line 27 of file GUIUtils.h.

Constructor & Destructor Documentation

◆ ImTextFeeder()

RoR::ImTextFeeder::ImTextFeeder ( ImDrawList *  _drawlist,
ImVec2  _origin 
)
inline

Definition at line 29 of file GUIUtils.h.

Member Function Documentation

◆ AddInline()

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.

◆ AddMultiline()

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.

+ Here is the caller graph for this function:

◆ AddWrapped()

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.

◆ NextLine()

void RoR::ImTextFeeder::NextLine ( )

Definition at line 117 of file GUIUtils.cpp.

Field Documentation

◆ cursor

ImVec2 RoR::ImTextFeeder::cursor

Next draw position, screen space.

Definition at line 40 of file GUIUtils.h.

◆ drawlist

ImDrawList* RoR::ImTextFeeder::drawlist

Definition at line 39 of file GUIUtils.h.

◆ origin

ImVec2 RoR::ImTextFeeder::origin

First draw position, screen space.

Definition at line 41 of file GUIUtils.h.

◆ size

ImVec2 RoR::ImTextFeeder::size = ImVec2(0,0)

Accumulated text size.

Definition at line 42 of file GUIUtils.h.


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