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


Public Member Functions | |
| ItemEditorPanel (int *current_room_id, DungeonRoomStore *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::WindowContent | |
| virtual | ~WindowContent ()=default |
| virtual void | OnFirstDraw () |
| Called once before the first Draw() in a session. | |
| virtual bool | RequiresLazyInit () const |
| Whether this panel uses lazy initialization. | |
| void | InvalidateLazyInit () |
| Reset lazy init state so OnFirstDraw() runs again. | |
| 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 WindowLifecycle | GetWindowLifecycle () const |
| Get the lifecycle category for this window. | |
| virtual WindowContextScope | GetContextScope () const |
| Optional context binding for this window (room/selection/etc) | |
| virtual WindowScope | GetScope () const |
| Get the registration scope for this window. | |
| 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 std::string | GetWorkflowGroup () const |
| Optional workflow group for hack-centric actions. | |
| virtual std::string | GetWorkflowLabel () const |
| Optional workflow label for menus/command palette. | |
| virtual std::string | GetWorkflowDescription () const |
| Optional workflow description for menus/command palette. | |
| virtual int | GetWorkflowPriority () const |
| Optional workflow ordering priority (lower sorts first). | |
| virtual float | GetPreferredWidth () const |
| Get preferred width for this panel (optional) | |
| virtual bool | PreferAutoHideTabBar () const |
| Whether the dock node hosting this panel should auto-hide its tab bar. | |
| 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. | |
| void | DrawWithLazyInit (bool *p_open) |
| Execute lazy initialization if needed, then call Draw() | |
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 |
| DungeonRoomStore * | 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 |
Additional Inherited Members | |
Protected Member Functions inherited from yaze::editor::WindowContent | |
| void | InvalidateCache () |
| Invalidate all cached computations. | |
| template<typename T > | |
| T & | GetCached (const std::string &key, std::function< T()> compute) |
| Get or compute a cached value. | |
| bool | IsCacheValid () const |
| Check if cache has been invalidated. | |
| void | ClearCache () |
| Clear all cached values (more aggressive than InvalidateCache) | |
WindowContent for placing and managing dungeon pot items.
This panel provides item selection and placement functionality for dungeon rooms, similar to ObjectSelectorContent and SpriteEditorPanel.
Definition at line 33 of file item_editor_panel.h.
|
inline |
Definition at line 35 of file item_editor_panel.h.
|
inlineoverridevirtual |
Unique identifier for this panel.
IDs should be:
Implements yaze::editor::WindowContent.
Definition at line 45 of file item_editor_panel.h.
|
inlineoverridevirtual |
Human-readable name shown in menus and title bars.
Implements yaze::editor::WindowContent.
Definition at line 46 of file item_editor_panel.h.
|
inlineoverridevirtual |
Material Design icon for this panel.
Implements yaze::editor::WindowContent.
Definition at line 47 of file item_editor_panel.h.
References ICON_MD_INVENTORY.
|
inlineoverridevirtual |
Editor category this panel belongs to.
Implements yaze::editor::WindowContent.
Definition at line 48 of file item_editor_panel.h.
|
inlineoverridevirtual |
Get display priority for menu ordering.
Reimplemented from yaze::editor::WindowContent.
Definition at line 49 of file item_editor_panel.h.
|
inlineoverridevirtual |
Draw the panel content.
| p_open | Pointer to visibility flag (nullptr if not closable) |
Called by WorkspaceWindowManager when the panel is visible. Do NOT call ImGui::Begin/End - the PanelWindow wrapper handles that. Just draw your content directly.
Implements yaze::editor::WindowContent.
Definition at line 55 of file item_editor_panel.h.
References current_room_id_, DrawItemSelector(), DrawPlacementControls(), DrawRoomItems(), rooms_, and yaze::editor::DungeonRoomStore::size().

|
inline |
Definition at line 78 of file item_editor_panel.h.
References canvas_viewer_.
Referenced by yaze::editor::DungeonEditorV2::~DungeonEditorV2().
|
inline |
Definition at line 80 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 142 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 232 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 274 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 290 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 87 of file item_editor_panel.h.
Referenced by DrawItemSelector(), DrawPlacementControls(), and DrawRoomItems().
|
staticconstexprprivate |
Definition at line 117 of file item_editor_panel.h.
Referenced by DrawItemSelector(), DrawPlacementControls(), and DrawRoomItems().
|
private |
Definition at line 333 of file item_editor_panel.h.
Referenced by Draw(), and DrawRoomItems().
|
private |
Definition at line 334 of file item_editor_panel.h.
Referenced by Draw().
|
private |
Definition at line 335 of file item_editor_panel.h.
Referenced by DrawItemSelector(), DrawPlacementControls(), and SetCanvasViewer().
|
private |
Definition at line 338 of file item_editor_panel.h.
Referenced by DrawItemSelector(), and DrawPlacementControls().
|
private |
Definition at line 339 of file item_editor_panel.h.
Referenced by DrawItemSelector(), and DrawPlacementControls().
|
private |
Definition at line 341 of file item_editor_panel.h.
Referenced by SetItemPlacedCallback().