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.
1
#include "
app/editor/dungeon/workspace/dungeon_workbench_inspector_helpers.h
"
2
3
#include <algorithm>
4
5
#include "
app/gui/core/style_guard.h
"
6
7
namespace
yaze::editor::workbench
{
8
9
void
DrawInspectorSectionHeader
(
const
char
* label) {
10
ImGui::SeparatorText(label);
11
}
12
13
bool
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
22
bool
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
yaze::gui::StyleVarGuard
RAII guard for ImGui style vars.
Definition
style_guard.h:68
dungeon_workbench_inspector_helpers.h
yaze::editor::workbench
Definition
dungeon_workbench_chrome.h:16
yaze::editor::workbench::BeginInspectorSection
bool BeginInspectorSection(const char *label, bool default_open)
Definition
dungeon_workbench_inspector_helpers.cc:13
yaze::editor::workbench::DrawActionButton
bool DrawActionButton(const char *label, const ImVec2 &size)
Definition
dungeon_workbench_inspector_helpers.cc:22
yaze::editor::workbench::DrawInspectorSectionHeader
void DrawInspectorSectionHeader(const char *label)
Definition
dungeon_workbench_inspector_helpers.cc:9
style_guard.h
src
app
editor
dungeon
workspace
dungeon_workbench_inspector_helpers.cc
Generated by
1.10.0