31 #include "Utilities/ImGui/ImGuiBase.h" 32 #include "Core/Application/Application.h" 53 ImGui::Indent(indent);
61 ImGui::Unindent(indent);
66 #define GUI_TREE_NODE(name, ...) if(ImGui::CollapsingHeader(name)) { GUI::Indent _(5.0f); __VA_ARGS__; } 67 #define SCOPE_TREE_NODE(name) if (!ImGui::CollapsingHeader(name)) return; GUI::Indent _(5.0f) 76 inline bool InputIntOnClick(
const char* title,
int* v,
const char* buttonText =
"apply")
79 ImGui::AlignTextToFramePadding();
82 ImGui::InputInt(
"", v);
84 bool result = ImGui::Button(buttonText);
96 inline bool InputFloatOnClick(
const char* title,
float* v,
const char* buttonText =
"apply")
99 ImGui::AlignTextToFramePadding();
102 ImGui::InputFloat(
"", v);
104 bool result = ImGui::Button(buttonText);
117 inline bool InputTextOnClick(
const char* text, MxString& str,
size_t sizeRequired,
const char* buttonText =
"apply")
119 str.resize(sizeRequired,
'\0');
120 ImGui::PushID((
void*)&str);
123 ImGui::AlignTextToFramePadding();
127 ImGui::InputText(
"", str.data(), sizeRequired);
129 bool result = ImGui::Button(buttonText);
132 while (result && str.size() > 0 && str.back() ==
'\0')
Definition: ComponentEditor.cpp:35
bool InputIntOnClick(const char *title, int *v, const char *buttonText="apply")
Definition: Layout.h:76
float indent
Definition: Layout.h:45
Indent(float indent)
Definition: Layout.h:50
bool InputFloatOnClick(const char *title, float *v, const char *buttonText="apply")
Definition: Layout.h:96
bool InputTextOnClick(const char *text, MxString &str, size_t sizeRequired, const char *buttonText="apply")
Definition: Layout.h:117
~Indent()
Definition: Layout.h:59