yaze 0.2.0
Link to the Past ROM Editor
 
Loading...
Searching...
No Matches
settings_editor.cc
Go to the documentation of this file.
1
3
4#include "absl/status/status.h"
6#include "imgui/imgui.h"
7
8namespace yaze {
9namespace app {
10namespace editor {
11
12using ImGui::BeginChild;
13using ImGui::BeginMenu;
14using ImGui::BeginTabBar;
15using ImGui::BeginTabItem;
16using ImGui::BeginTable;
17using ImGui::Checkbox;
18using ImGui::EndChild;
19using ImGui::EndMenu;
20using ImGui::EndTabBar;
21using ImGui::EndTabItem;
22using ImGui::EndTable;
23using ImGui::TableHeader;
24using ImGui::TableHeadersRow;
25using ImGui::TableNextColumn;
26using ImGui::TableNextRow;
27using ImGui::TableSetBgColor;
28using ImGui::TableSetColumnIndex;
29using ImGui::TableSetupColumn;
30using ImGui::Text;
31
32absl::Status SettingsEditor::Update() {
33 if (BeginTabBar("Settings", ImGuiTabBarFlags_None)) {
34 if (BeginTabItem("General")) {
36 EndTabItem();
37 }
38 if (BeginTabItem("Keyboard Shortcuts")) {
39 EndTabItem();
40 }
41 EndTabBar();
42 }
43
44 return absl::OkStatus();
45}
46
48 if (BeginTable("##SettingsTable", 2,
49 ImGuiTableFlags_Reorderable | ImGuiTableFlags_Hideable |
50 ImGuiTableFlags_Borders | ImGuiTableFlags_Resizable)) {
51 TableSetupColumn("Experiment Flags", ImGuiTableColumnFlags_WidthFixed,
52 250.0f);
53 TableSetupColumn("General Setting", ImGuiTableColumnFlags_WidthStretch,
54 0.0f);
55
56 TableHeadersRow();
57
58 TableNextColumn();
59 if (BeginChild("##GeneralSettingsStyleWrapper", ImVec2(0, 0),
60 ImGuiChildFlags_FrameStyle)) {
61 static FlagsMenu flags;
62 flags.Draw();
63 EndChild();
64 }
65
66 TableNextColumn();
67 if (BeginChild("##GeneralSettingsWrapper", ImVec2(0, 0),
68 ImGuiChildFlags_FrameStyle)) {
69 Text("TODO: Add some settings here");
70 EndChild();
71 }
72
73 EndTable();
74 }
75}
76
78 return absl::OkStatus();
79}
80
81} // namespace editor
82} // namespace app
83} // namespace yaze
Definition common.cc:22