EditorPanel for placing and managing dungeon pot items. More...
#include <item_editor_panel.h>


Public Member Functions | |
| ItemEditorPanel (int *current_room_id, std::array< zelda3::Room, 0x128 > *rooms, DungeonCanvasViewer *canvas_viewer=nullptr) | |
| std::string | GetId () const override |
| Unique identifier for this panel. | |
| std::string | GetDisplayName () const override |
| Human-readable name shown in menus and title bars. | |
| std::string | GetIcon () const override |
| Material Design icon for this panel. | |
| std::string | GetEditorCategory () const override |
| Editor category this panel belongs to. | |
| int | GetPriority () const override |
| Get display priority for menu ordering. | |
| void | Draw (bool *p_open) override |
| Draw the panel content. | |
| void | SetCanvasViewer (DungeonCanvasViewer *viewer) |
| void | SetItemPlacedCallback (std::function< void(const zelda3::PotItem &)> callback) |
Public Member Functions inherited from yaze::editor::EditorPanel | |
| virtual | ~EditorPanel ()=default |
| virtual void | OnOpen () |
| Called when panel becomes visible. | |
| virtual void | OnClose () |
| Called when panel is hidden. | |
| virtual void | OnFocus () |
| Called when panel receives focus. | |
| virtual PanelCategory | GetPanelCategory () const |
| Get the lifecycle category for this panel. | |
| virtual bool | IsEnabled () const |
| Check if this panel is currently enabled. | |
| virtual std::string | GetDisabledTooltip () const |
| Get tooltip text when panel is disabled. | |
| virtual std::string | GetShortcutHint () const |
| Get keyboard shortcut hint for display. | |
| virtual float | GetPreferredWidth () const |
| Get preferred width for this panel (optional) | |
| virtual bool | IsVisibleByDefault () const |
| Whether this panel should be visible by default. | |
| virtual std::string | GetParentPanelId () const |
| Get parent panel ID for cascade behavior. | |
| virtual bool | CascadeCloseChildren () const |
| Whether closing this panel should close child panels. | |
Private Member Functions | |
| void | DrawPlacementControls () |
| void | DrawItemSelector () |
| void | DrawRoomItems () |
| ImVec4 | GetItemTypeColor (int item_id, const AgentUITheme &theme) |
| const char * | GetItemTypeIcon (int item_id) |
Private Attributes | |
| int * | current_room_id_ = nullptr |
| std::array< zelda3::Room, 0x128 > * | rooms_ = nullptr |
| DungeonCanvasViewer * | canvas_viewer_ = nullptr |
| int | selected_item_id_ = 0 |
| bool | placement_mode_ = false |
| std::function< void(const zelda3::PotItem &) | item_placed_callback_ ) |
Static Private Attributes | |
| static constexpr const char * | kPotItemNames [] |
| static constexpr size_t | kPotItemCount = sizeof(kPotItemNames) / sizeof(kPotItemNames[0]) |
EditorPanel for placing and managing dungeon pot items.
This panel provides item selection and placement functionality for dungeon rooms, similar to ObjectEditorPanel and SpriteEditorPanel.
Definition at line 31 of file item_editor_panel.h.
|
inline |
Definition at line 33 of file item_editor_panel.h.
|
inlineoverridevirtual |
Unique identifier for this panel.
IDs should be:
Implements yaze::editor::EditorPanel.
Definition at line 44 of file item_editor_panel.h.
|
inlineoverridevirtual |
Human-readable name shown in menus and title bars.
Implements yaze::editor::EditorPanel.
Definition at line 45 of file item_editor_panel.h.
|
inlineoverridevirtual |
Material Design icon for this panel.
Implements yaze::editor::EditorPanel.
Definition at line 46 of file item_editor_panel.h.
References ICON_MD_INVENTORY.
|
inlineoverridevirtual |
Editor category this panel belongs to.
Implements yaze::editor::EditorPanel.
Definition at line 47 of file item_editor_panel.h.
|
inlineoverridevirtual |
Get display priority for menu ordering.
Reimplemented from yaze::editor::EditorPanel.
Definition at line 48 of file item_editor_panel.h.
|
inlineoverridevirtual |
Draw the panel content.
| p_open | Pointer to visibility flag (nullptr if not closable) |
Called by PanelManager when the panel is visible. Do NOT call ImGui::Begin/End - the PanelWindow wrapper handles that. Just draw your content directly.
Implements yaze::editor::EditorPanel.
Definition at line 54 of file item_editor_panel.h.
References current_room_id_, DrawItemSelector(), DrawPlacementControls(), DrawRoomItems(), and rooms_.

|
inline |
Definition at line 77 of file item_editor_panel.h.
References canvas_viewer_.
Referenced by yaze::editor::DungeonEditorV2::OnRoomSelected(), and yaze::editor::DungeonEditorV2::~DungeonEditorV2().
|
inline |
Definition at line 81 of file item_editor_panel.h.
References item_placed_callback_.
|
inlineprivate |
Definition at line 120 of file item_editor_panel.h.
References canvas_viewer_, yaze::editor::AgentUI::GetTheme(), ICON_MD_CANCEL, ICON_MD_INFO, ICON_MD_PLACE, kPotItemCount, kPotItemNames, yaze::editor::DungeonCanvasViewer::object_interaction(), placement_mode_, selected_item_id_, and yaze::editor::DungeonObjectInteraction::SetItemPlacementMode().
Referenced by Draw().

|
inlineprivate |
Definition at line 141 of file item_editor_panel.h.
References canvas_viewer_, GetItemTypeColor(), GetItemTypeIcon(), yaze::editor::AgentUI::GetTheme(), ICON_MD_INVENTORY, kPotItemCount, kPotItemNames, yaze::editor::DungeonCanvasViewer::object_interaction(), placement_mode_, selected_item_id_, and yaze::editor::DungeonObjectInteraction::SetItemPlacementMode().
Referenced by Draw().
|
inlineprivate |
Definition at line 224 of file item_editor_panel.h.
References current_room_id_, yaze::editor::AgentUI::GetTheme(), ICON_MD_DELETE, ICON_MD_INFO, ICON_MD_LIST, kPotItemCount, and kPotItemNames.
Referenced by Draw().

|
inlineprivate |
Definition at line 266 of file item_editor_panel.h.
References yaze::editor::AgentUITheme::dungeon_object_chest, yaze::editor::AgentUITheme::dungeon_object_default, yaze::editor::AgentUITheme::dungeon_object_pot, yaze::editor::AgentUITheme::dungeon_object_stairs, yaze::editor::AgentUITheme::dungeon_sprite_layer0, and yaze::editor::AgentUITheme::status_error.
Referenced by DrawItemSelector().
|
inlineprivate |
Definition at line 282 of file item_editor_panel.h.
References ICON_MD_ARROW_UPWARD, ICON_MD_AUTO_AWESOME, ICON_MD_BLOCK, ICON_MD_BROKEN_IMAGE, ICON_MD_BUG_REPORT, ICON_MD_CIRCLE, ICON_MD_EGG, ICON_MD_FAVORITE, ICON_MD_FLUTTER_DASH, ICON_MD_HELP, ICON_MD_KEY, ICON_MD_LANDSCAPE, ICON_MD_MONETIZATION_ON, ICON_MD_PERSON, ICON_MD_STAIRS, ICON_MD_SWAP_HORIZ, ICON_MD_TERRAIN, ICON_MD_TOGGLE_ON, and ICON_MD_WARNING.
Referenced by DrawItemSelector().
|
staticconstexprprivate |
Definition at line 88 of file item_editor_panel.h.
Referenced by DrawItemSelector(), DrawPlacementControls(), and DrawRoomItems().
|
staticconstexprprivate |
Definition at line 118 of file item_editor_panel.h.
Referenced by DrawItemSelector(), DrawPlacementControls(), and DrawRoomItems().
|
private |
Definition at line 324 of file item_editor_panel.h.
Referenced by Draw(), and DrawRoomItems().
|
private |
Definition at line 325 of file item_editor_panel.h.
Referenced by Draw().
|
private |
Definition at line 326 of file item_editor_panel.h.
Referenced by DrawItemSelector(), DrawPlacementControls(), and SetCanvasViewer().
|
private |
Definition at line 329 of file item_editor_panel.h.
Referenced by DrawItemSelector(), and DrawPlacementControls().
|
private |
Definition at line 330 of file item_editor_panel.h.
Referenced by DrawItemSelector(), and DrawPlacementControls().
|
private |
Definition at line 332 of file item_editor_panel.h.
Referenced by SetItemPlacedCallback().