20 this->font_size = font_size;
32 if (current_fs != font_size)
37 float wrap_width = (
width + (
x > -1 ?
x : 0)) > 480 ? (480 -
x - 10) :
width;
38 ImVec2 cpos = ImGui::GetCursorPos();
39 ImGui::PushTextWrapPos(cpos.x + wrap_width);
42 ImGui::TextWrapped(this->label);
46 ImGui::PopTextWrapPos();
50 if (current_fs != font_size)
static std::unique_ptr< app_workspace > & get_instance()
Get the instance app_workspace which is a singleton.
virtual void render_element()
gui_label(const char *label, int x=-1, int y=-1, int width=-1, app_workspace_ns::font_size font_size=app_workspace_ns::font_size::NORMAL_FONT)
Construct a new gui label object.
void set_label(const char *label)
font_size
This enum defines sizes of corresponding fonts. E.g.: SMALL_FONT is 12px.