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 | SetProject (const project::YazeProject *project) |
| 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 | |
| float | HexPropertyWidth (int digits) const |
| void | ContinuePropertyRow (const char *label, int digits) const |
| template<typename T > | |
| bool | DrawHexProperty (const char *label, T *value, const char *widget_label, bool continue_row=false) |
| std::string | EntranceLabel (int slot) const |
| 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 41 of file dungeon_entrances_panel.h.
Definition at line 65 of file dungeon_entrances_panel.h.
| using yaze::editor::DungeonEntrancesPanel::CameraRepairCallback = std::function<absl::Status(int)> |
Definition at line 67 of file dungeon_entrances_panel.h.
Definition at line 68 of file dungeon_entrances_panel.h.
Definition at line 70 of file dungeon_entrances_panel.h.
|
inline |
Definition at line 43 of file dungeon_entrances_panel.h.
|
inlineoverridevirtual |
Unique identifier for this panel.
IDs should be:
Implements yaze::editor::WindowContent.
Definition at line 58 of file dungeon_entrances_panel.h.
Referenced by yaze::editor::DungeonWorkbenchContent::DrawSidebarContent().
|
inlineoverridevirtual |
Human-readable name shown in menus and title bars.
Implements yaze::editor::WindowContent.
Definition at line 59 of file dungeon_entrances_panel.h.
|
inlineoverridevirtual |
Material Design icon for this panel.
Implements yaze::editor::WindowContent.
Definition at line 60 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 61 of file dungeon_entrances_panel.h.
|
inlineoverridevirtual |
Get display priority for menu ordering.
Reimplemented from yaze::editor::WindowContent.
Definition at line 62 of file dungeon_entrances_panel.h.
|
inlineoverridevirtual |
Optional workflow group for hack-centric actions.
Reimplemented from yaze::editor::WindowContent.
Definition at line 63 of file dungeon_entrances_panel.h.
|
inline |
Definition at line 73 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 79 of file dungeon_entrances_panel.h.
References property_edit_gesture_.
Referenced by yaze::editor::DungeonEditorV2::ConfigureEntrancePropertyEditCallbacks().
|
inline |
Definition at line 83 of file dungeon_entrances_panel.h.
Referenced by yaze::editor::DungeonEditorV2::ConfigureEntrancePropertyEditCallbacks().
|
inline |
Definition at line 90 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 97 of file dungeon_entrances_panel.h.
References preview_automatic_, preview_context_, and select_preview_.
|
inline |
Definition at line 105 of file dungeon_entrances_panel.h.
References project_.
Referenced by yaze::editor::DungeonEditorV2::SetDependencies().
|
inline |
Definition at line 109 of file dungeon_entrances_panel.h.
References yaze::gui::AutoRegisterLastItem(), current_entrance_id_, yaze::editor::DungeonEntrancePreviewLabel(), EntranceLabel(), entrances_, yaze::editor::kAmbiguous, yaze::zelda3::kNumDungeonSpawnPoints, on_entrance_selected_, preview_automatic_, preview_context_, select_preview_, and spawn_points_.
Referenced by yaze::editor::DungeonWorkbenchContent::Draw(), and yaze::editor::DungeonWorkbenchContent::DrawSidebarContent().

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

|
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 207 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 251 of file dungeon_entrances_panel.h.
Referenced by ContinuePropertyRow(), DrawCameraBoundaries(), and DrawHexProperty().
|
inlineprivate |
Definition at line 262 of file dungeon_entrances_panel.h.
References HexPropertyWidth().
Referenced by DrawHexProperty().

|
inlineprivate |
Definition at line 273 of file dungeon_entrances_panel.h.
References ContinuePropertyRow(), HexPropertyWidth(), yaze::gui::InputHexByte(), yaze::gui::InputHexWord(), and RegisterPropertyInput().
Referenced by DrawRegularEntranceProperties(), and DrawSpawnPointProperties().
|
inlineprivate |
Definition at line 295 of file dungeon_entrances_panel.h.
References yaze::editor::DungeonEntrancePreviewLabel(), entrances_, yaze::editor::dungeon_project_labels::GetEntranceLabel(), yaze::zelda3::kNumDungeonSpawnPoints, and project_.
Referenced by DrawEntranceList(), and DrawGraphicsContext().

|
inlineprivate |
Definition at line 304 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 404 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 456 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 468 of file dungeon_entrances_panel.h.
References HexPropertyWidth(), yaze::gui::InputHexByte(), and RegisterPropertyInput().
Referenced by DrawRegularEntranceProperties(), and DrawSpawnPointProperties().

|
inlineprivate |
Definition at line 527 of file dungeon_entrances_panel.h.
References current_entrance_id_, yaze::editor::DungeonEntrancePreviewLabel(), entrance_filter_, EntranceLabel(), yaze::editor::dungeon_project_labels::GetRoomLabel(), ICON_MD_SEARCH, yaze::zelda3::kNumDungeonEntranceSlots, yaze::zelda3::kNumDungeonSpawnPoints, yaze::zelda3::kNumRegularDungeonEntrances, on_entrance_selected_, and project_.
Referenced by Draw().

|
inlineprivate |
Definition at line 570 of file dungeon_entrances_panel.h.
References yaze::gui::AutoRegisterLastItem(), yaze::editor::CanEditDungeonSpawnPoint(), CommitSpawnPropertyEdit(), DrawCameraBoundaries(), DrawCameraSafety(), and DrawHexProperty().
Referenced by DrawSelectedProperties().
|
inlineprivate |
Definition at line 642 of file dungeon_entrances_panel.h.
References yaze::gui::AutoRegisterLastItem(), yaze::editor::CanEditDungeonEntrance(), CommitEntrancePropertyEdit(), DrawCameraBoundaries(), DrawCameraSafety(), and DrawHexProperty().
Referenced by DrawSelectedProperties().
|
inlineprivate |
Definition at line 702 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 718 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 DrawCameraBoundaries(), and DrawHexProperty().

|
private |
Definition at line 738 of file dungeon_entrances_panel.h.
Referenced by Draw(), DrawGraphicsContext(), DrawPropertiesInWorkbench(), and EntranceLabel().
|
private |
Definition at line 740 of file dungeon_entrances_panel.h.
Referenced by Draw(), DrawGraphicsContext(), and DrawPropertiesInWorkbench().
|
private |
Definition at line 741 of file dungeon_entrances_panel.h.
Referenced by Draw(), DrawEntranceList(), DrawGraphicsContext(), DrawPropertiesInWorkbench(), and DrawSelectedProperties().
|
private |
Definition at line 742 of file dungeon_entrances_panel.h.
Referenced by DrawEntranceList(), EntranceLabel(), and SetProject().
|
private |
Definition at line 743 of file dungeon_entrances_panel.h.
Referenced by DrawEntranceList(), and DrawGraphicsContext().
|
private |
Definition at line 744 of file dungeon_entrances_panel.h.
Referenced by DrawGraphicsContext(), DrawPropertiesInWorkbench(), and SetGraphicsPreview().
|
private |
Definition at line 745 of file dungeon_entrances_panel.h.
Referenced by DrawGraphicsContext(), DrawPropertiesInWorkbench(), and SetGraphicsPreview().
|
private |
Definition at line 746 of file dungeon_entrances_panel.h.
Referenced by DrawGraphicsContext(), and SetGraphicsPreview().
|
private |
Definition at line 747 of file dungeon_entrances_panel.h.
Referenced by DrawCameraSafety().
|
private |
Definition at line 748 of file dungeon_entrances_panel.h.
Referenced by DrawCameraRepairPreview(), and DrawCameraSafety().
|
private |
Definition at line 749 of file dungeon_entrances_panel.h.
Referenced by CommitEntrancePropertyEdit(), and SetPropertyEditCallbacks().
|
private |
Definition at line 750 of file dungeon_entrances_panel.h.
Referenced by CommitSpawnPropertyEdit(), and SetPropertyEditCallbacks().
|
private |
Definition at line 751 of file dungeon_entrances_panel.h.
Referenced by ObservePropertyEditGesture().
|
private |
Definition at line 752 of file dungeon_entrances_panel.h.
Referenced by ObservePropertyEditGesture(), and property_edit_gesture().
|
private |
Definition at line 753 of file dungeon_entrances_panel.h.
Referenced by CommitEntrancePropertyEdit(), and CommitSpawnPropertyEdit().
|
private |
Definition at line 754 of file dungeon_entrances_panel.h.
Referenced by DrawCameraRepairPreview(), and DrawCameraSafety().
|
private |
Definition at line 755 of file dungeon_entrances_panel.h.
Referenced by DrawCameraRepairPreview(), and DrawCameraSafety().
|
private |
Definition at line 756 of file dungeon_entrances_panel.h.
Referenced by DrawCameraRepairPreview(), and DrawCameraSafety().
|
private |
Definition at line 757 of file dungeon_entrances_panel.h.
Referenced by Draw(), and OwnsNavigationShortcutFocus().
|
private |
Definition at line 758 of file dungeon_entrances_panel.h.
Referenced by Draw(), and OwnsNavigationShortcutFocus().
|
private |
Definition at line 759 of file dungeon_entrances_panel.h.
Referenced by DrawEntranceList().