From 5f455b1d5ef2a5257c89f70ca2458ca50d40f230 Mon Sep 17 00:00:00 2001 From: Justin Scofield Date: Mon, 25 Jul 2022 19:17:51 -0400 Subject: [PATCH] Update PaletteEditor --- src/app/editor/palette_editor.cc | 14 +++++++++++++- src/app/editor/palette_editor.h | 8 +++++++- 2 files changed, 20 insertions(+), 2 deletions(-) diff --git a/src/app/editor/palette_editor.cc b/src/app/editor/palette_editor.cc index 8717bde0..bee5abb4 100644 --- a/src/app/editor/palette_editor.cc +++ b/src/app/editor/palette_editor.cc @@ -2,6 +2,7 @@ #include +#include "absl/status/status.h" #include "app/gfx/snes_palette.h" #include "gui/canvas.h" #include "gui/icons.h" @@ -10,7 +11,18 @@ namespace yaze { namespace app { namespace editor { -void PaletteEditor::Update() {} +absl::Status PaletteEditor::Update() { + for (const auto &name : kPaletteCategoryNames) { + if (ImGui::TreeNode(name.data())) { + + ImGui::SameLine(); + if (ImGui::SmallButton("button")) { + } + ImGui::TreePop(); + } + } + return absl::OkStatus(); +} } // namespace editor } // namespace app diff --git a/src/app/editor/palette_editor.h b/src/app/editor/palette_editor.h index 12b8d8c0..939d2d55 100644 --- a/src/app/editor/palette_editor.h +++ b/src/app/editor/palette_editor.h @@ -3,6 +3,7 @@ #include +#include "absl/status/status.h" #include "app/gfx/snes_palette.h" #include "gui/canvas.h" #include "gui/icons.h" @@ -11,9 +12,14 @@ namespace yaze { namespace app { namespace editor { +static constexpr absl::string_view kPaletteCategoryNames[] = { + "Sword", "Shield", "Clothes", "World Colors", + "Area Colors", "Enemies", "Dungeons", "World Map", + "Dungeon Map", "Triforce", "Crystal"}; + class PaletteEditor { public: - void Update(); + absl::Status Update(); private: };