yaze 0.3.2
Link to the Past ROM Editor
 
Loading...
Searching...
No Matches
dungeon_room_graphics_panel.h
Go to the documentation of this file.
1#ifndef YAZE_APP_EDITOR_DUNGEON_PANELS_DUNGEON_ROOM_GRAPHICS_PANEL_H_
2#define YAZE_APP_EDITOR_DUNGEON_PANELS_DUNGEON_ROOM_GRAPHICS_PANEL_H_
3
4#include <string>
5
11#include "app/gui/core/icons.h"
12#include "imgui/imgui.h"
13#include "zelda3/dungeon/room.h"
14
15namespace yaze {
16namespace editor {
17
18class DungeonEditorV2;
19
30 public:
31 // Default constructor for ContentRegistry self-registration
33 : room_gfx_canvas_("##RoomGfxCanvasPanel", ImVec2(256 + 1, 256 + 1)) {}
34
35 // Legacy constructor for direct instantiation
36 DungeonRoomGraphicsPanel(int* current_room_id,
37 std::array<zelda3::Room, 0x128>* rooms,
38 gfx::IRenderer* renderer = nullptr)
39 : current_room_id_(current_room_id),
40 rooms_(rooms),
41 renderer_(renderer),
42 room_gfx_canvas_("##RoomGfxCanvasPanel", ImVec2(256 + 1, 256 + 1)) {}
43
50 palette_dirty_ = true;
51 }
52
53 // ==========================================================================
54 // EditorPanel Identity
55 // ==========================================================================
56
57 std::string GetId() const override { return "dungeon.room_graphics"; }
58 std::string GetDisplayName() const override { return "Room Graphics"; }
59 std::string GetIcon() const override { return ICON_MD_IMAGE; }
60 std::string GetEditorCategory() const override { return "Dungeon"; }
61 int GetPriority() const override { return 50; }
62
63 // ==========================================================================
64 // EditorPanel Drawing
65 // ==========================================================================
66
67 void Draw(bool* p_open) override;
68
69 private:
70 int* current_room_id_ = nullptr;
71 std::array<zelda3::Room, 0x128>* rooms_ = nullptr;
74
75 // Palette tracking for proper sheet coloring
77 bool palette_dirty_ = true;
78};
79
80} // namespace editor
81} // namespace yaze
82
83#endif // YAZE_APP_EDITOR_DUNGEON_PANELS_DUNGEON_ROOM_GRAPHICS_PANEL_H_
EditorPanel for displaying room graphics blocks.
int GetPriority() const override
Get display priority for menu ordering.
std::string GetDisplayName() const override
Human-readable name shown in menus and title bars.
std::string GetId() const override
Unique identifier for this panel.
std::string GetEditorCategory() const override
Editor category this panel belongs to.
DungeonRoomGraphicsPanel(int *current_room_id, std::array< zelda3::Room, 0x128 > *rooms, gfx::IRenderer *renderer=nullptr)
void SetCurrentPaletteGroup(const gfx::PaletteGroup &group)
Set the current palette group for graphics rendering.
std::array< zelda3::Room, 0x128 > * rooms_
std::string GetIcon() const override
Material Design icon for this panel.
void Draw(bool *p_open) override
Draw the panel content.
Base interface for all logical panel components.
Defines an abstract interface for all rendering operations.
Definition irenderer.h:60
Modern, robust canvas for drawing and manipulating graphics.
Definition canvas.h:150
#define ICON_MD_IMAGE
Definition icons.h:982
Represents a group of palettes.