Refactor graphics editor and screen editor tab handling

- Updated tab item handling in GraphicsEditor and ScreenEditor to ensure proper opening and closing of tab items.
- Improved layout management by replacing deprecated macros with ImGui table functions for better readability and maintainability.
- Adjusted palette display function signature in color handling to return a boolean for success status instead of absl::Status.
- Enhanced tile rendering functions for consistency and clarity in the graphics editing workflow.
This commit is contained in:
scawful
2025-05-13 17:30:18 -04:00
parent afc33cb7dd
commit 0863b7c606
5 changed files with 57 additions and 57 deletions

View File

@@ -51,7 +51,7 @@ IMGUI_API bool SnesColorEdit4(absl::string_view label, gfx::SnesColor* color,
return pressed;
}
absl::Status DisplayPalette(gfx::SnesPalette& palette, bool loaded) {
IMGUI_API bool DisplayPalette(gfx::SnesPalette& palette, bool loaded) {
static ImVec4 color = ImVec4(0, 0, 0, 255.f);
ImGuiColorEditFlags misc_flags = ImGuiColorEditFlags_AlphaPreview |
ImGuiColorEditFlags_NoDragDrop |
@@ -121,7 +121,7 @@ absl::Status DisplayPalette(gfx::SnesPalette& palette, bool loaded) {
ImGui::ColorPicker4("##picker", (float*)&color,
misc_flags | ImGuiColorEditFlags_NoSidePreview |
ImGuiColorEditFlags_NoSmallPreview);
return absl::OkStatus();
return true;
}
void SelectablePalettePipeline(uint64_t& palette_id, bool& refresh_graphics,