yaze 0.3.2
Link to the Past ROM Editor
 
Loading...
Searching...
No Matches
dungeon_workbench_inspector_helpers.cc
Go to the documentation of this file.
2
3#include <algorithm>
4
6
8
9void DrawInspectorSectionHeader(const char* label) {
10 ImGui::SeparatorText(label);
11}
12
13bool BeginInspectorSection(const char* label, bool default_open) {
14 gui::StyleVarGuard frame_padding_guard(
15 ImGuiStyleVar_FramePadding,
16 ImVec2(ImGui::GetStyle().FramePadding.x,
17 std::max(5.0f, ImGui::GetStyle().FramePadding.y + 1.0f)));
18 return ImGui::CollapsingHeader(
19 label, default_open ? ImGuiTreeNodeFlags_DefaultOpen : 0);
20}
21
22bool DrawActionButton(const char* label, const ImVec2& size) {
23 gui::StyleVarGuard align_guard(ImGuiStyleVar_ButtonTextAlign,
24 ImVec2(0.08f, 0.5f));
25 return ImGui::Button(label, size);
26}
27
28} // namespace yaze::editor::workbench
RAII guard for ImGui style vars.
Definition style_guard.h:68
bool BeginInspectorSection(const char *label, bool default_open)
bool DrawActionButton(const char *label, const ImVec2 &size)
void DrawInspectorSectionHeader(const char *label)