WindowContent for displaying and editing dungeon entrances. More...
#include <dungeon_entrances_panel.h>


Public Types | |
| using | CameraStateProvider |
| using | CameraRepairCallback = std::function<absl::Status(int)> |
| using | EntrancePropertyEditCallback |
| using | SpawnPropertyEditCallback |
Public Member Functions | |
| DungeonEntrancesPanel (std::array< zelda3::RoomEntrance, zelda3::kNumDungeonEntranceSlots > *entrances, std::array< zelda3::DungeonSpawnPoint, zelda3::kNumDungeonSpawnPoints > *spawn_points, int *current_entrance_id, std::function< void(int)> on_entrance_selected) | |
| 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. | |
| std::string | GetWorkflowGroup () const override |
| Optional workflow group for hack-centric actions. | |
| void | SetPropertyEditCallbacks (EntrancePropertyEditCallback entrance_callback, SpawnPropertyEditCallback spawn_callback) |
| std::shared_ptr< const int > | property_edit_gesture () const |
| void | SetCameraTools (CameraStateProvider state_provider, CameraRepairCallback repair_callback, std::function< void()> data_changed_callback={}) |
| bool | OwnsNavigationShortcutFocus () const |
| void | SetGraphicsPreview (std::function< DungeonRenderContext()> context, std::function< bool()> automatic, std::function< void(int)> select) |
| void | DrawGraphicsContext (float width=-1.0f) |
| void | DrawPropertiesInWorkbench () |
| void | Draw (bool *p_open) override |
| Draw the panel content. | |
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 WindowPresentationPolicy | GetPresentationPolicy () const |
| How this content is hosted and advertised by workspace chrome. | |
| 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 | 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 | HasExactPreferredWidth () const |
| Whether GetPreferredWidth() is an exact content width. | |
| virtual float | GetPreferredHeight () const |
| Get preferred height for this panel (optional) | |
| virtual bool | PrefersFloating () const |
| 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 | DrawCameraRepairPreview () |
| void | DrawCameraSafety (int slot_index) |
| void | DrawSelectedProperties () |
| bool | DrawCameraBoundaries (const char *table_id, const std::array< uint8_t *, 8 > &boundaries) |
| void | DrawEntranceList () |
| void | DrawSpawnPointProperties (int slot_index) |
| void | DrawRegularEntranceProperties (int slot_index) |
| void | CommitEntrancePropertyEdit (int slot_index, const zelda3::RoomEntrance &before, bool changed) |
| void | CommitSpawnPropertyEdit (int slot_index, const zelda3::DungeonSpawnPoint &before, bool changed) |
| void | ObservePropertyEditGesture () |
| void | RegisterPropertyInput (const char *field_label, const char *widget_label) |
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 displaying and editing dungeon entrances.
This panel provides a list of all dungeon entrances with their properties. Users can select entrances to navigate to their associated rooms.
Definition at line 40 of file dungeon_entrances_panel.h.
Definition at line 64 of file dungeon_entrances_panel.h.
| using yaze::editor::DungeonEntrancesPanel::CameraRepairCallback = std::function<absl::Status(int)> |
Definition at line 66 of file dungeon_entrances_panel.h.
Definition at line 67 of file dungeon_entrances_panel.h.
Definition at line 69 of file dungeon_entrances_panel.h.
|
inline |
Definition at line 42 of file dungeon_entrances_panel.h.
|
inlineoverridevirtual |
Unique identifier for this panel.
IDs should be:
Implements yaze::editor::WindowContent.
Definition at line 57 of file dungeon_entrances_panel.h.
Referenced by yaze::editor::DungeonWorkbenchContent::DrawInspectorShelfRoom().
|
inlineoverridevirtual |
Human-readable name shown in menus and title bars.
Implements yaze::editor::WindowContent.
Definition at line 58 of file dungeon_entrances_panel.h.
|
inlineoverridevirtual |
Material Design icon for this panel.
Implements yaze::editor::WindowContent.
Definition at line 59 of file dungeon_entrances_panel.h.
References ICON_MD_DOOR_FRONT.
|
inlineoverridevirtual |
Editor category this panel belongs to.
Implements yaze::editor::WindowContent.
Definition at line 60 of file dungeon_entrances_panel.h.
|
inlineoverridevirtual |
Get display priority for menu ordering.
Reimplemented from yaze::editor::WindowContent.
Definition at line 61 of file dungeon_entrances_panel.h.
|
inlineoverridevirtual |
Optional workflow group for hack-centric actions.
Reimplemented from yaze::editor::WindowContent.
Definition at line 62 of file dungeon_entrances_panel.h.
|
inline |
Definition at line 72 of file dungeon_entrances_panel.h.
References entrance_property_edit_callback_, and spawn_property_edit_callback_.
Referenced by yaze::editor::DungeonEditorV2::ConfigureEntrancePropertyEditCallbacks().
|
inline |
Definition at line 78 of file dungeon_entrances_panel.h.
References property_edit_gesture_.
Referenced by yaze::editor::DungeonEditorV2::ConfigureEntrancePropertyEditCallbacks().
|
inline |
Definition at line 82 of file dungeon_entrances_panel.h.
Referenced by yaze::editor::DungeonEditorV2::ConfigureEntrancePropertyEditCallbacks().
|
inline |
Definition at line 89 of file dungeon_entrances_panel.h.
References navigation_shortcut_focus_, and navigation_shortcut_last_draw_frame_.
Referenced by yaze::editor::DungeonEditorV2::CanHandleDungeonNavigationShortcut().
|
inline |
Definition at line 96 of file dungeon_entrances_panel.h.
References preview_automatic_, preview_context_, and select_preview_.
|
inline |
Definition at line 106 of file dungeon_entrances_panel.h.
References yaze::gui::AutoRegisterLastItem(), current_entrance_id_, yaze::editor::DungeonEntrancePreviewLabel(), entrances_, yaze::zelda3::GetEntranceLabel(), yaze::editor::kAmbiguous, yaze::zelda3::kNumDungeonSpawnPoints, on_entrance_selected_, preview_automatic_, preview_context_, select_preview_, and spawn_points_.
Referenced by yaze::editor::DungeonWorkbenchContent::Draw().

|
inline |
Definition at line 194 of file dungeon_entrances_panel.h.
References current_entrance_id_, DrawSelectedProperties(), entrances_, preview_automatic_, preview_context_, and spawn_points_.
Referenced by yaze::editor::DungeonWorkbenchContent::DrawInspectorShelfRoom().

|
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 210 of file dungeon_entrances_panel.h.
References current_entrance_id_, DrawEntranceList(), DrawSelectedProperties(), entrances_, ICON_MD_DOOR_FRONT, ICON_MD_TUNE, navigation_shortcut_focus_, navigation_shortcut_last_draw_frame_, and spawn_points_.

|
inlineprivate |
Definition at line 254 of file dungeon_entrances_panel.h.
References yaze::gui::AutoRegisterLastItem(), camera_repair_callback_, camera_repair_error_, camera_repair_preview_, camera_repair_slot_, and yaze::editor::ValidateDungeonEntranceCamera().
Referenced by DrawCameraSafety().

|
inlineprivate |
Definition at line 354 of file dungeon_entrances_panel.h.
References yaze::gui::AutoRegisterLastItem(), camera_repair_callback_, camera_repair_error_, camera_repair_preview_, camera_repair_slot_, camera_state_provider_, DrawCameraRepairPreview(), and yaze::editor::ValidateDungeonEntranceCamera().
Referenced by DrawRegularEntranceProperties(), and DrawSpawnPointProperties().

|
inlineprivate |
Definition at line 400 of file dungeon_entrances_panel.h.
References current_entrance_id_, DrawRegularEntranceProperties(), DrawSpawnPointProperties(), yaze::zelda3::kNumDungeonSpawnPoints, and ObservePropertyEditGesture().
Referenced by Draw(), and DrawPropertiesInWorkbench().

|
inlineprivate |
Definition at line 412 of file dungeon_entrances_panel.h.
References yaze::gui::InputHexByte().
Referenced by DrawRegularEntranceProperties(), and DrawSpawnPointProperties().

|
inlineprivate |
Definition at line 449 of file dungeon_entrances_panel.h.
References current_entrance_id_, entrance_filter_, yaze::zelda3::GetEntranceLabel(), yaze::zelda3::GetRoomLabel(), ICON_MD_SEARCH, yaze::zelda3::kNumDungeonEntranceSlots, yaze::zelda3::kNumDungeonSpawnPoints, yaze::zelda3::kNumRegularDungeonEntrances, and on_entrance_selected_.
Referenced by Draw().

|
inlineprivate |
Definition at line 490 of file dungeon_entrances_panel.h.
References yaze::gui::AutoRegisterLastItem(), yaze::editor::CanEditDungeonSpawnPoint(), CommitSpawnPropertyEdit(), DrawCameraBoundaries(), DrawCameraSafety(), yaze::gui::InputHexByte(), yaze::gui::InputHexWord(), and RegisterPropertyInput().
Referenced by DrawSelectedProperties().
|
inlineprivate |
Definition at line 573 of file dungeon_entrances_panel.h.
References yaze::gui::AutoRegisterLastItem(), yaze::editor::CanEditDungeonEntrance(), CommitEntrancePropertyEdit(), DrawCameraBoundaries(), DrawCameraSafety(), yaze::gui::InputHexByte(), yaze::gui::InputHexWord(), and RegisterPropertyInput().
Referenced by DrawSelectedProperties().
|
inlineprivate |
Definition at line 642 of file dungeon_entrances_panel.h.
References camera_data_changed_callback_, entrance_property_edit_callback_, yaze::editor::MarkDungeonEntranceDirtyIfEditable(), and ObservePropertyEditGesture().
Referenced by DrawRegularEntranceProperties().

|
inlineprivate |
Definition at line 658 of file dungeon_entrances_panel.h.
References camera_data_changed_callback_, yaze::editor::MarkDungeonSpawnPointDirtyIfEditable(), ObservePropertyEditGesture(), and spawn_property_edit_callback_.
Referenced by DrawSpawnPointProperties().

|
private |
Definition at line 126 of file dungeon_editor_v2_entrance_camera.cc.
References property_edit_active_id_, and property_edit_gesture_.
Referenced by CommitEntrancePropertyEdit(), CommitSpawnPropertyEdit(), and DrawSelectedProperties().
|
private |
Definition at line 135 of file dungeon_editor_v2_entrance_camera.cc.
References yaze::gui::WidgetIdRegistry::WidgetMetadata::bounds, yaze::gui::WidgetIdRegistry::WidgetMetadata::enabled, yaze::gui::WidgetIdRegistry::Instance(), yaze::gui::WidgetIdRegistry::WidgetMetadata::label, yaze::gui::WidgetIdRegistry::NormalizeLabel(), yaze::gui::WidgetIdRegistry::RegisterWidget(), and yaze::gui::WidgetIdRegistry::WidgetMetadata::visible.
Referenced by DrawRegularEntranceProperties(), and DrawSpawnPointProperties().

|
private |
Definition at line 678 of file dungeon_entrances_panel.h.
Referenced by Draw(), DrawGraphicsContext(), and DrawPropertiesInWorkbench().
|
private |
Definition at line 680 of file dungeon_entrances_panel.h.
Referenced by Draw(), DrawGraphicsContext(), and DrawPropertiesInWorkbench().
|
private |
Definition at line 681 of file dungeon_entrances_panel.h.
Referenced by Draw(), DrawEntranceList(), DrawGraphicsContext(), DrawPropertiesInWorkbench(), and DrawSelectedProperties().
|
private |
Definition at line 682 of file dungeon_entrances_panel.h.
Referenced by DrawEntranceList(), and DrawGraphicsContext().
|
private |
Definition at line 683 of file dungeon_entrances_panel.h.
Referenced by DrawGraphicsContext(), DrawPropertiesInWorkbench(), and SetGraphicsPreview().
|
private |
Definition at line 684 of file dungeon_entrances_panel.h.
Referenced by DrawGraphicsContext(), DrawPropertiesInWorkbench(), and SetGraphicsPreview().
|
private |
Definition at line 685 of file dungeon_entrances_panel.h.
Referenced by DrawGraphicsContext(), and SetGraphicsPreview().
|
private |
Definition at line 686 of file dungeon_entrances_panel.h.
Referenced by DrawCameraSafety().
|
private |
Definition at line 687 of file dungeon_entrances_panel.h.
Referenced by DrawCameraRepairPreview(), and DrawCameraSafety().
|
private |
Definition at line 688 of file dungeon_entrances_panel.h.
Referenced by CommitEntrancePropertyEdit(), and SetPropertyEditCallbacks().
|
private |
Definition at line 689 of file dungeon_entrances_panel.h.
Referenced by CommitSpawnPropertyEdit(), and SetPropertyEditCallbacks().
|
private |
Definition at line 690 of file dungeon_entrances_panel.h.
Referenced by ObservePropertyEditGesture().
|
private |
Definition at line 691 of file dungeon_entrances_panel.h.
Referenced by ObservePropertyEditGesture(), and property_edit_gesture().
|
private |
Definition at line 692 of file dungeon_entrances_panel.h.
Referenced by CommitEntrancePropertyEdit(), and CommitSpawnPropertyEdit().
|
private |
Definition at line 693 of file dungeon_entrances_panel.h.
Referenced by DrawCameraRepairPreview(), and DrawCameraSafety().
|
private |
Definition at line 694 of file dungeon_entrances_panel.h.
Referenced by DrawCameraRepairPreview(), and DrawCameraSafety().
|
private |
Definition at line 695 of file dungeon_entrances_panel.h.
Referenced by DrawCameraRepairPreview(), and DrawCameraSafety().
|
private |
Definition at line 696 of file dungeon_entrances_panel.h.
Referenced by Draw(), and OwnsNavigationShortcutFocus().
|
private |
Definition at line 697 of file dungeon_entrances_panel.h.
Referenced by Draw(), and OwnsNavigationShortcutFocus().
|
private |
Definition at line 698 of file dungeon_entrances_panel.h.
Referenced by DrawEntranceList().