yaze 0.3.2
Link to the Past ROM Editor
 
Loading...
Searching...
No Matches
yaze::editor::DungeonWorkbenchContent Class Reference

#include <dungeon_workbench_content.h>

Inheritance diagram for yaze::editor::DungeonWorkbenchContent:

Public Member Functions

 DungeonWorkbenchContent (DungeonRoomSelector *room_selector, int *current_room_id, std::function< void(int)> on_room_selected, std::function< void(int, RoomSelectionIntent)> on_room_selected_with_intent, std::function< void(int)> on_save_room, std::function< void()> on_save_all_rooms, std::function< DungeonCanvasViewer *()> get_viewer, std::function< DungeonCanvasViewer *(int)> get_compare_viewer, std::function< const std::deque< int > &()> get_recent_rooms, std::function< void(int)> forget_recent_room, std::function< void(bool)> set_workflow_mode, Rom *rom=nullptr)
 
 ~DungeonWorkbenchContent () override
 
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 SetRom (Rom *rom)
 
void SetEmbeddedToolPanels (RoomTagEditorPanel *room_tags, CustomCollisionPanel *custom_collision, WaterFillPanel *water_fill, MinecartTrackEditorPanel *minecart_tracks)
 
void SetEmbeddedEditorPanels (WindowContent *object_selector, WindowContent *door_editor, WindowContent *sprite_editor, WindowContent *item_editor, WindowContent *room_graphics, WindowContent *palette_editor)
 
void SetPitDamageTableProvider (std::function< zelda3::PitDamageTable *()> provider)
 
void FocusRoomInspector ()
 
void FocusSelectionInspector ()
 
void FocusEntranceBrowser ()
 
void ShowConnectedGraph ()
 
void RequestDungeonMapPopup ()
 
void OpenObjectSelectorTool ()
 
void OpenDoorTool ()
 
void OpenSpriteTool ()
 
void OpenItemTool ()
 
void OpenRoomGraphicsTool ()
 
void OpenPaletteTool ()
 
void OpenRoomTagsTool ()
 
void OpenCustomCollisionTool ()
 
void OpenWaterFillTool ()
 
void OpenMinecartTool ()
 
void SetInspectorOnLeft (bool on_left)
 
bool IsInspectorOnLeft () const
 
void SetOnInspectorSideChanged (std::function< void(bool)> cb)
 
bool IsToolDrawerActiveForTesting () const
 
const char * GetInspectorModeIdForTesting () const
 
const char * GetActiveToolIdForTesting () const
 
void DrawPitDamageControlsForTesting (int room_id)
 
const DungeonWorkbenchPitDamageControlRectsGetPitDamageControlRectsForTesting () const
 
void NotifyRoomChanged (int previous_room_id)
 Called by the editor when the current room changes.
 
void SetUndoRedoProvider (std::function< bool()> can_undo, std::function< bool()> can_redo, std::function< void()> on_undo, std::function< void()> on_redo, std::function< std::string()> undo_desc, std::function< std::string()> redo_desc, std::function< int()> undo_depth)
 
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 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 float GetPreferredHeight () const
 Get preferred height 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 Types

enum class  WorkbenchTool : uint8_t {
  None , RoomTags , CustomCollision , WaterFill ,
  MinecartTracks , ObjectSelector , DoorEditor , SpriteEditor ,
  ItemEditor , RoomGraphics , Palette
}
 
enum class  SidebarMode : uint8_t { Rooms , Entrances }
 
enum class  InspectorMode : uint8_t { Room , Selection , Tools }
 

Private Member Functions

void DrawRecentRoomTabs ()
 
void DrawSidebarPane (float width, float height, float button_size, bool compact)
 
void DrawSidebarHeader (float button_size, bool compact)
 
void DrawSidebarModeTabs (bool stacked, float segment_height)
 
void DrawSidebarContent ()
 
void DrawCanvasPane (float width, float height, DungeonCanvasViewer *primary_viewer, bool left_sidebar_visible)
 
void DrawSelectionShelf (DungeonCanvasViewer &viewer)
 
void DrawSplitView (DungeonCanvasViewer &primary_viewer)
 
void DrawInspectorPane (float width, float height, float button_size, bool compact, DungeonCanvasViewer *viewer)
 
void DrawInspectorHeader (float button_size, bool compact)
 
void DrawInspector (DungeonCanvasViewer &viewer, bool compact)
 
void DrawInspectorPrimarySelector (float segment_height)
 
void DrawInspectorCompactSummary (DungeonCanvasViewer &viewer)
 
void DrawInspectorShelf (DungeonCanvasViewer &viewer, bool compact)
 
void DrawInspectorShelfRoom (DungeonCanvasViewer &viewer)
 
void DrawInspectorShelfSelection (DungeonCanvasViewer &viewer)
 
void DrawInspectorShelfTools (DungeonCanvasViewer &viewer)
 
void DrawInspectorToolDrawer (DungeonCanvasViewer &viewer)
 
void DrawWorkbenchTool (DungeonCanvasViewer &viewer, WorkbenchTool tool)
 
void DrawInspectorToolStrip ()
 
void OpenTool (WorkbenchTool tool)
 
bool IsWorkbenchToolAvailable (WorkbenchTool tool) const
 
const char * GetWorkbenchToolId (WorkbenchTool tool) const
 
const char * GetWorkbenchToolTitle (WorkbenchTool tool) const
 
const char * GetWorkbenchToolIcon (WorkbenchTool tool) const
 
const char * GetWorkbenchToolShortLabel (WorkbenchTool tool) const
 
const char * GetWorkbenchToolUnavailableMessage (WorkbenchTool tool) const
 
void DrawApplyScopeControls (int room_id)
 
void DrawPitDamageControls (int room_id)
 
void DrawLayerCompositingControls (DungeonCanvasViewer &viewer, int room_id)
 
void DrawDungeonMapPopup (DungeonCanvasViewer &viewer)
 
DungeonMapPanelGetEmbeddedDungeonMap (DungeonCanvasViewer &viewer)
 
void SetAllSaveFlags (bool value)
 
void BuildRoomDungeonCache ()
 

Private Attributes

DungeonRoomSelectorroom_selector_ = nullptr
 
int * current_room_id_ = nullptr
 
int previous_room_id_ = -1
 
bool split_view_enabled_ = false
 
bool inspector_on_left_ = false
 
int compare_room_id_ = -1
 
DungeonWorkbenchLayoutState layout_state_ {}
 
std::function< void(int)> on_room_selected_
 
std::function< void(int, RoomSelectionIntent)> on_room_selected_with_intent_
 
std::function< void(int)> on_save_room_
 
std::function< void()> on_save_all_rooms_
 
std::function< DungeonCanvasViewer *()> get_viewer_
 
std::function< DungeonCanvasViewer *(int)> get_compare_viewer_
 
std::function< const std::deque< int > &()> get_recent_rooms_
 
std::function< void(int)> forget_recent_room_
 
std::function< void(bool)> set_workflow_mode_
 
std::function< void(bool)> on_inspector_side_changed_
 
std::function< zelda3::PitDamageTable *()> get_pit_damage_table_
 
Romrom_ = nullptr
 
SidebarMode sidebar_mode_ = SidebarMode::Rooms
 
InspectorMode inspector_mode_ = InspectorMode::Room
 
bool inspector_selection_was_active_ = false
 
WorkbenchTool active_tool_ = WorkbenchTool::ObjectSelector
 
char compare_search_buf_ [64] = {}
 
std::unordered_map< int, std::string > room_dungeon_cache_
 
bool room_dungeon_cache_built_ = false
 
std::function< bool()> can_undo_
 
std::function< bool()> can_redo_
 
std::function< void()> on_undo_
 
std::function< void()> on_redo_
 
std::function< std::string()> undo_desc_
 
std::function< std::string()> redo_desc_
 
std::function< int()> undo_depth_
 
bool show_shortcut_legend_ = false
 
bool open_dungeon_map_popup_ = false
 
uint16_t pit_damage_replacement_room_id_ = 0
 
uint16_t pit_damage_victim_room_id_ = 0
 
std::string pit_damage_status_message_
 
bool pit_damage_status_error_ = false
 
DungeonWorkbenchPitDamageControlRects pit_damage_control_rects_ {}
 
std::unique_ptr< DungeonMapPanelembedded_dungeon_map_
 
RoomTagEditorPanelroom_tag_panel_ = nullptr
 
CustomCollisionPanelcustom_collision_panel_ = nullptr
 
WaterFillPanelwater_fill_panel_ = nullptr
 
MinecartTrackEditorPanelminecart_track_panel_ = nullptr
 
WindowContentobject_selector_content_ = nullptr
 
WindowContentdoor_editor_content_ = nullptr
 
WindowContentsprite_editor_content_ = nullptr
 
WindowContentitem_editor_content_ = nullptr
 
WindowContentroom_graphics_content_ = nullptr
 
WindowContentpalette_editor_content_ = nullptr
 

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)
 

Detailed Description

Definition at line 72 of file dungeon_workbench_content.h.

Member Enumeration Documentation

◆ WorkbenchTool

enum class yaze::editor::DungeonWorkbenchContent::WorkbenchTool : uint8_t
strongprivate
Enumerator
None 
RoomTags 
CustomCollision 
WaterFill 
MinecartTracks 
ObjectSelector 
DoorEditor 
SpriteEditor 
ItemEditor 
RoomGraphics 
Palette 

Definition at line 175 of file dungeon_workbench_content.h.

◆ SidebarMode

enum class yaze::editor::DungeonWorkbenchContent::SidebarMode : uint8_t
strongprivate
Enumerator
Rooms 
Entrances 

Definition at line 253 of file dungeon_workbench_content.h.

◆ InspectorMode

enum class yaze::editor::DungeonWorkbenchContent::InspectorMode : uint8_t
strongprivate
Enumerator
Room 
Selection 
Tools 

Definition at line 255 of file dungeon_workbench_content.h.

Constructor & Destructor Documentation

◆ DungeonWorkbenchContent()

yaze::editor::DungeonWorkbenchContent::DungeonWorkbenchContent ( DungeonRoomSelector * room_selector,
int * current_room_id,
std::function< void(int)> on_room_selected,
std::function< void(int, RoomSelectionIntent)> on_room_selected_with_intent,
std::function< void(int)> on_save_room,
std::function< void()> on_save_all_rooms,
std::function< DungeonCanvasViewer *()> get_viewer,
std::function< DungeonCanvasViewer *(int)> get_compare_viewer,
std::function< const std::deque< int > &()> get_recent_rooms,
std::function< void(int)> forget_recent_room,
std::function< void(bool)> set_workflow_mode,
Rom * rom = nullptr )

Definition at line 290 of file dungeon_workbench_content.cc.

◆ ~DungeonWorkbenchContent()

yaze::editor::DungeonWorkbenchContent::~DungeonWorkbenchContent ( )
overridedefault

Member Function Documentation

◆ GetId()

std::string yaze::editor::DungeonWorkbenchContent::GetId ( ) const
overridevirtual

Unique identifier for this panel.

Returns
Panel ID in format "{category}.{name}" (e.g., "dungeon.room_selector")

IDs should be:

  • Lowercase with underscores
  • Prefixed with editor category
  • Unique across all panels

Implements yaze::editor::WindowContent.

Definition at line 316 of file dungeon_workbench_content.cc.

◆ GetDisplayName()

std::string yaze::editor::DungeonWorkbenchContent::GetDisplayName ( ) const
overridevirtual

Human-readable name shown in menus and title bars.

Returns
Display name (e.g., "Room Selector")

Implements yaze::editor::WindowContent.

Definition at line 319 of file dungeon_workbench_content.cc.

◆ GetIcon()

std::string yaze::editor::DungeonWorkbenchContent::GetIcon ( ) const
overridevirtual

Material Design icon for this panel.

Returns
Icon constant (e.g., ICON_MD_LIST)

Implements yaze::editor::WindowContent.

Definition at line 322 of file dungeon_workbench_content.cc.

References ICON_MD_WORKSPACES.

◆ GetEditorCategory()

std::string yaze::editor::DungeonWorkbenchContent::GetEditorCategory ( ) const
overridevirtual

Editor category this panel belongs to.

Returns
Category name matching EditorType (e.g., "Dungeon", "Overworld")

Implements yaze::editor::WindowContent.

Definition at line 325 of file dungeon_workbench_content.cc.

◆ GetPriority()

int yaze::editor::DungeonWorkbenchContent::GetPriority ( ) const
overridevirtual

Get display priority for menu ordering.

Returns
Priority value (lower = higher in list, default 50)

Reimplemented from yaze::editor::WindowContent.

Definition at line 328 of file dungeon_workbench_content.cc.

◆ SetRom()

void yaze::editor::DungeonWorkbenchContent::SetRom ( Rom * rom)

◆ SetEmbeddedToolPanels()

void yaze::editor::DungeonWorkbenchContent::SetEmbeddedToolPanels ( RoomTagEditorPanel * room_tags,
CustomCollisionPanel * custom_collision,
WaterFillPanel * water_fill,
MinecartTrackEditorPanel * minecart_tracks )

◆ SetEmbeddedEditorPanels()

void yaze::editor::DungeonWorkbenchContent::SetEmbeddedEditorPanels ( WindowContent * object_selector,
WindowContent * door_editor,
WindowContent * sprite_editor,
WindowContent * item_editor,
WindowContent * room_graphics,
WindowContent * palette_editor )

◆ SetPitDamageTableProvider()

void yaze::editor::DungeonWorkbenchContent::SetPitDamageTableProvider ( std::function< zelda3::PitDamageTable *()> provider)
inline

◆ FocusRoomInspector()

void yaze::editor::DungeonWorkbenchContent::FocusRoomInspector ( )

◆ FocusSelectionInspector()

void yaze::editor::DungeonWorkbenchContent::FocusSelectionInspector ( )

◆ FocusEntranceBrowser()

void yaze::editor::DungeonWorkbenchContent::FocusEntranceBrowser ( )

◆ ShowConnectedGraph()

◆ RequestDungeonMapPopup()

void yaze::editor::DungeonWorkbenchContent::RequestDungeonMapPopup ( )

◆ OpenObjectSelectorTool()

void yaze::editor::DungeonWorkbenchContent::OpenObjectSelectorTool ( )

◆ OpenDoorTool()

void yaze::editor::DungeonWorkbenchContent::OpenDoorTool ( )

Definition at line 387 of file dungeon_workbench_content.cc.

References DoorEditor, and OpenTool().

Referenced by yaze::editor::DungeonEditorV2::WireViewerPanelCallbacks().

Here is the call graph for this function:

◆ OpenSpriteTool()

void yaze::editor::DungeonWorkbenchContent::OpenSpriteTool ( )

Definition at line 391 of file dungeon_workbench_content.cc.

References OpenTool(), and SpriteEditor.

Referenced by yaze::editor::DungeonEditorV2::WireViewerPanelCallbacks().

Here is the call graph for this function:

◆ OpenItemTool()

void yaze::editor::DungeonWorkbenchContent::OpenItemTool ( )

Definition at line 395 of file dungeon_workbench_content.cc.

References ItemEditor, and OpenTool().

Referenced by yaze::editor::DungeonEditorV2::WireViewerPanelCallbacks().

Here is the call graph for this function:

◆ OpenRoomGraphicsTool()

void yaze::editor::DungeonWorkbenchContent::OpenRoomGraphicsTool ( )

Definition at line 399 of file dungeon_workbench_content.cc.

References OpenTool(), and RoomGraphics.

Referenced by yaze::editor::DungeonEditorV2::WireViewerPanelCallbacks().

Here is the call graph for this function:

◆ OpenPaletteTool()

void yaze::editor::DungeonWorkbenchContent::OpenPaletteTool ( )

Definition at line 403 of file dungeon_workbench_content.cc.

References OpenTool(), and Palette.

Here is the call graph for this function:

◆ OpenRoomTagsTool()

void yaze::editor::DungeonWorkbenchContent::OpenRoomTagsTool ( )

Definition at line 407 of file dungeon_workbench_content.cc.

References OpenTool(), and RoomTags.

Here is the call graph for this function:

◆ OpenCustomCollisionTool()

void yaze::editor::DungeonWorkbenchContent::OpenCustomCollisionTool ( )

Definition at line 411 of file dungeon_workbench_content.cc.

References CustomCollision, and OpenTool().

Here is the call graph for this function:

◆ OpenWaterFillTool()

void yaze::editor::DungeonWorkbenchContent::OpenWaterFillTool ( )

Definition at line 415 of file dungeon_workbench_content.cc.

References OpenTool(), and WaterFill.

Here is the call graph for this function:

◆ OpenMinecartTool()

void yaze::editor::DungeonWorkbenchContent::OpenMinecartTool ( )

Definition at line 419 of file dungeon_workbench_content.cc.

References MinecartTracks, and OpenTool().

Here is the call graph for this function:

◆ SetInspectorOnLeft()

void yaze::editor::DungeonWorkbenchContent::SetInspectorOnLeft ( bool on_left)
inline

Definition at line 129 of file dungeon_workbench_content.h.

References inspector_on_left_.

Referenced by yaze::editor::DungeonEditorV2::Update().

◆ IsInspectorOnLeft()

bool yaze::editor::DungeonWorkbenchContent::IsInspectorOnLeft ( ) const
inline

Definition at line 130 of file dungeon_workbench_content.h.

References inspector_on_left_.

◆ SetOnInspectorSideChanged()

void yaze::editor::DungeonWorkbenchContent::SetOnInspectorSideChanged ( std::function< void(bool)> cb)
inline

◆ IsToolDrawerActiveForTesting()

bool yaze::editor::DungeonWorkbenchContent::IsToolDrawerActiveForTesting ( ) const

Definition at line 423 of file dungeon_workbench_content.cc.

References inspector_mode_, and Tools.

◆ GetInspectorModeIdForTesting()

const char * yaze::editor::DungeonWorkbenchContent::GetInspectorModeIdForTesting ( ) const

Definition at line 427 of file dungeon_workbench_content.cc.

References inspector_mode_, Room, Selection, and Tools.

◆ GetActiveToolIdForTesting()

const char * yaze::editor::DungeonWorkbenchContent::GetActiveToolIdForTesting ( ) const

Definition at line 439 of file dungeon_workbench_content.cc.

References active_tool_, and GetWorkbenchToolId().

Here is the call graph for this function:

◆ DrawPitDamageControlsForTesting()

void yaze::editor::DungeonWorkbenchContent::DrawPitDamageControlsForTesting ( int room_id)
inline

Definition at line 142 of file dungeon_workbench_content.h.

References DrawPitDamageControls().

Here is the call graph for this function:

◆ GetPitDamageControlRectsForTesting()

const DungeonWorkbenchPitDamageControlRects & yaze::editor::DungeonWorkbenchContent::GetPitDamageControlRectsForTesting ( ) const
inline

Definition at line 146 of file dungeon_workbench_content.h.

References pit_damage_control_rects_.

◆ NotifyRoomChanged()

void yaze::editor::DungeonWorkbenchContent::NotifyRoomChanged ( int previous_room_id)
inline

Called by the editor when the current room changes.

Definition at line 151 of file dungeon_workbench_content.h.

References previous_room_id_.

Referenced by yaze::editor::DungeonEditorV2::OnRoomSelected().

◆ SetUndoRedoProvider()

void yaze::editor::DungeonWorkbenchContent::SetUndoRedoProvider ( std::function< bool()> can_undo,
std::function< bool()> can_redo,
std::function< void()> on_undo,
std::function< void()> on_redo,
std::function< std::string()> undo_desc,
std::function< std::string()> redo_desc,
std::function< int()> undo_depth )
inline

◆ Draw()

void yaze::editor::DungeonWorkbenchContent::Draw ( bool * p_open)
overridevirtual

Draw the panel content.

Parameters
p_openPointer 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 544 of file dungeon_workbench_content.cc.

References yaze::editor::DungeonWorkbenchPaneLayout::center_width, yaze::editor::DungeonWorkbenchResponsiveLayout::compact_left, yaze::editor::DungeonWorkbenchResponsiveLayout::compact_right, yaze::editor::DungeonWorkbenchToolbarParams::compare_room_id, compare_room_id_, yaze::editor::DungeonWorkbenchToolbarParams::compare_search_buf, compare_search_buf_, yaze::editor::DungeonWorkbenchToolbarParams::compare_search_buf_size, yaze::editor::DungeonWorkbenchToolbarParams::compare_viewer, yaze::editor::DungeonWorkbenchToolbarParams::current_room_id, current_room_id_, yaze::editor::DungeonWorkbenchToolbar::Draw(), DrawCanvasPane(), DrawDungeonMapPopup(), yaze::editor::DrawDungeonWorkbenchVerticalSplitter(), DrawInspectorPane(), DrawSidebarPane(), get_compare_viewer_, yaze::editor::DungeonWorkbenchToolbarParams::get_recent_rooms, get_recent_rooms_, get_viewer_, yaze::editor::AgentUI::GetTheme(), yaze::gui::LayoutHelpers::GetTouchSafeWidgetHeight(), ICON_MD_INFO, inspector_on_left_, yaze::Rom::is_loaded(), yaze::gui::UIConfig::kContentMinWidthSidebar, yaze::gui::UIConfig::kSplitterWidth, yaze::editor::DungeonWorkbenchToolbarParams::layout, layout_state_, yaze::editor::DungeonWorkbenchToolbarParams::left_sidebar_visible, yaze::editor::DungeonWorkbenchLayoutState::left_width, yaze::editor::DungeonWorkbenchPaneLayout::left_width, yaze::editor::DungeonWorkbenchPaneLayout::min_left_width, yaze::editor::DungeonWorkbenchPaneLayout::min_right_width, yaze::editor::DungeonWorkbenchToolbarParams::on_request_dungeon_map, yaze::editor::DungeonWorkbenchToolbarParams::on_room_selected, on_room_selected_, yaze::editor::DungeonWorkbenchToolbarParams::on_save_room, on_save_room_, yaze::editor::DungeonWorkbenchToolbarParams::open_room_matrix, yaze::editor::DungeonWorkbenchToolbarParams::previous_room_id, previous_room_id_, yaze::editor::DungeonWorkbenchToolbarParams::primary_viewer, RequestDungeonMapPopup(), yaze::editor::ResolveDungeonWorkbenchPaneLayout(), yaze::editor::DungeonWorkbenchPaneLayout::responsive, yaze::editor::DungeonWorkbenchLayoutState::right_width, yaze::editor::DungeonWorkbenchPaneLayout::right_width, rom_, room_selector_, yaze::editor::DungeonWorkbenchToolbarParams::set_workflow_mode, set_workflow_mode_, yaze::editor::DungeonWorkbenchResponsiveLayout::show_left, yaze::editor::DungeonWorkbenchLayoutState::show_left_sidebar, yaze::editor::DungeonWorkbenchResponsiveLayout::show_right, yaze::editor::DungeonWorkbenchLayoutState::show_right_inspector, ShowConnectedGraph(), yaze::editor::DungeonWorkbenchToolbarParams::split_view_enabled, and split_view_enabled_.

◆ DrawRecentRoomTabs()

◆ DrawSidebarPane()

void yaze::editor::DungeonWorkbenchContent::DrawSidebarPane ( float width,
float height,
float button_size,
bool compact )
private

Definition at line 443 of file dungeon_workbench_content.cc.

References DrawSidebarContent(), and DrawSidebarHeader().

Referenced by Draw().

Here is the call graph for this function:

◆ DrawSidebarHeader()

◆ DrawSidebarModeTabs()

void yaze::editor::DungeonWorkbenchContent::DrawSidebarModeTabs ( bool stacked,
float segment_height )
private

Definition at line 500 of file dungeon_workbench_content.cc.

References Entrances, ICON_MD_DOOR_FRONT, ICON_MD_VIEW_LIST, Rooms, sidebar_mode_, and yaze::gui::ToggleButton().

Referenced by DrawSidebarHeader().

Here is the call graph for this function:

◆ DrawSidebarContent()

void yaze::editor::DungeonWorkbenchContent::DrawSidebarContent ( )
private

◆ DrawCanvasPane()

◆ DrawSelectionShelf()

◆ DrawSplitView()

◆ DrawInspectorPane()

void yaze::editor::DungeonWorkbenchContent::DrawInspectorPane ( float width,
float height,
float button_size,
bool compact,
DungeonCanvasViewer * viewer )
private

Definition at line 894 of file dungeon_workbench_content.cc.

References DrawInspector(), and DrawInspectorHeader().

Referenced by Draw().

Here is the call graph for this function:

◆ DrawInspectorHeader()

◆ DrawInspector()

void yaze::editor::DungeonWorkbenchContent::DrawInspector ( DungeonCanvasViewer & viewer,
bool compact )
private

Definition at line 1187 of file dungeon_workbench_content.cc.

References DrawInspectorShelf().

Referenced by DrawInspectorPane().

Here is the call graph for this function:

◆ DrawInspectorPrimarySelector()

void yaze::editor::DungeonWorkbenchContent::DrawInspectorPrimarySelector ( float segment_height)
private

Definition at line 1879 of file dungeon_workbench_content.cc.

References yaze::editor::workbench::CalcIconButtonWidth(), inspector_mode_, Room, Selection, yaze::gui::ToggleButton(), and Tools.

Referenced by DrawInspectorHeader().

Here is the call graph for this function:

◆ DrawInspectorCompactSummary()

◆ DrawInspectorShelf()

◆ DrawInspectorShelfRoom()

◆ DrawInspectorShelfSelection()

◆ DrawInspectorShelfTools()

◆ DrawInspectorToolDrawer()

◆ DrawWorkbenchTool()

◆ DrawInspectorToolStrip()

◆ OpenTool()

◆ IsWorkbenchToolAvailable()

◆ GetWorkbenchToolId()

const char * yaze::editor::DungeonWorkbenchContent::GetWorkbenchToolId ( WorkbenchTool tool) const
private

◆ GetWorkbenchToolTitle()

◆ GetWorkbenchToolIcon()

◆ GetWorkbenchToolShortLabel()

const char * yaze::editor::DungeonWorkbenchContent::GetWorkbenchToolShortLabel ( WorkbenchTool tool) const
private

◆ GetWorkbenchToolUnavailableMessage()

const char * yaze::editor::DungeonWorkbenchContent::GetWorkbenchToolUnavailableMessage ( WorkbenchTool tool) const
private

◆ DrawApplyScopeControls()

void yaze::editor::DungeonWorkbenchContent::DrawApplyScopeControls ( int room_id)
private

◆ DrawPitDamageControls()

◆ DrawLayerCompositingControls()

◆ DrawDungeonMapPopup()

void yaze::editor::DungeonWorkbenchContent::DrawDungeonMapPopup ( DungeonCanvasViewer & viewer)
private

Definition at line 1504 of file dungeon_workbench_content.cc.

References yaze::editor::workbench::DrawActionButton(), GetEmbeddedDungeonMap(), ICON_MD_CLOSE, and open_dungeon_map_popup_.

Referenced by Draw().

Here is the call graph for this function:

◆ GetEmbeddedDungeonMap()

◆ SetAllSaveFlags()

void yaze::editor::DungeonWorkbenchContent::SetAllSaveFlags ( bool value)
private

◆ BuildRoomDungeonCache()

void yaze::editor::DungeonWorkbenchContent::BuildRoomDungeonCache ( )
private

Member Data Documentation

◆ room_selector_

DungeonRoomSelector* yaze::editor::DungeonWorkbenchContent::room_selector_ = nullptr
private

Definition at line 231 of file dungeon_workbench_content.h.

Referenced by Draw(), DrawSidebarContent(), and GetEmbeddedDungeonMap().

◆ current_room_id_

int* yaze::editor::DungeonWorkbenchContent::current_room_id_ = nullptr
private

◆ previous_room_id_

int yaze::editor::DungeonWorkbenchContent::previous_room_id_ = -1
private

Definition at line 235 of file dungeon_workbench_content.h.

Referenced by Draw(), and NotifyRoomChanged().

◆ split_view_enabled_

bool yaze::editor::DungeonWorkbenchContent::split_view_enabled_ = false
private

◆ inspector_on_left_

bool yaze::editor::DungeonWorkbenchContent::inspector_on_left_ = false
private

◆ compare_room_id_

int yaze::editor::DungeonWorkbenchContent::compare_room_id_ = -1
private

Definition at line 238 of file dungeon_workbench_content.h.

Referenced by Draw(), DrawRecentRoomTabs(), and DrawSplitView().

◆ layout_state_

◆ on_room_selected_

std::function<void(int)> yaze::editor::DungeonWorkbenchContent::on_room_selected_
private

◆ on_room_selected_with_intent_

std::function<void(int, RoomSelectionIntent)> yaze::editor::DungeonWorkbenchContent::on_room_selected_with_intent_
private

Definition at line 241 of file dungeon_workbench_content.h.

Referenced by DrawRecentRoomTabs(), and GetEmbeddedDungeonMap().

◆ on_save_room_

std::function<void(int)> yaze::editor::DungeonWorkbenchContent::on_save_room_
private

Definition at line 242 of file dungeon_workbench_content.h.

Referenced by Draw(), and DrawApplyScopeControls().

◆ on_save_all_rooms_

std::function<void()> yaze::editor::DungeonWorkbenchContent::on_save_all_rooms_
private

Definition at line 243 of file dungeon_workbench_content.h.

Referenced by DrawApplyScopeControls().

◆ get_viewer_

std::function<DungeonCanvasViewer*()> yaze::editor::DungeonWorkbenchContent::get_viewer_
private

Definition at line 244 of file dungeon_workbench_content.h.

Referenced by Draw(), and DrawRecentRoomTabs().

◆ get_compare_viewer_

std::function<DungeonCanvasViewer*(int)> yaze::editor::DungeonWorkbenchContent::get_compare_viewer_
private

Definition at line 245 of file dungeon_workbench_content.h.

Referenced by Draw(), and DrawSplitView().

◆ get_recent_rooms_

std::function<const std::deque<int>&()> yaze::editor::DungeonWorkbenchContent::get_recent_rooms_
private

Definition at line 246 of file dungeon_workbench_content.h.

Referenced by Draw(), DrawRecentRoomTabs(), and DrawSplitView().

◆ forget_recent_room_

std::function<void(int)> yaze::editor::DungeonWorkbenchContent::forget_recent_room_
private

Definition at line 247 of file dungeon_workbench_content.h.

Referenced by DrawRecentRoomTabs().

◆ set_workflow_mode_

std::function<void(bool)> yaze::editor::DungeonWorkbenchContent::set_workflow_mode_
private

Definition at line 248 of file dungeon_workbench_content.h.

Referenced by Draw(), and DrawApplyScopeControls().

◆ on_inspector_side_changed_

std::function<void(bool)> yaze::editor::DungeonWorkbenchContent::on_inspector_side_changed_
private

Definition at line 249 of file dungeon_workbench_content.h.

Referenced by DrawInspectorHeader(), and SetOnInspectorSideChanged().

◆ get_pit_damage_table_

std::function<zelda3::PitDamageTable*()> yaze::editor::DungeonWorkbenchContent::get_pit_damage_table_
private

◆ rom_

Rom* yaze::editor::DungeonWorkbenchContent::rom_ = nullptr
private

◆ sidebar_mode_

SidebarMode yaze::editor::DungeonWorkbenchContent::sidebar_mode_ = SidebarMode::Rooms
private

◆ inspector_mode_

◆ inspector_selection_was_active_

bool yaze::editor::DungeonWorkbenchContent::inspector_selection_was_active_ = false
private

Definition at line 257 of file dungeon_workbench_content.h.

Referenced by DrawInspectorShelf().

◆ active_tool_

WorkbenchTool yaze::editor::DungeonWorkbenchContent::active_tool_ = WorkbenchTool::ObjectSelector
private

◆ compare_search_buf_

char yaze::editor::DungeonWorkbenchContent::compare_search_buf_[64] = {}
private

Definition at line 260 of file dungeon_workbench_content.h.

Referenced by Draw().

◆ room_dungeon_cache_

std::unordered_map<int, std::string> yaze::editor::DungeonWorkbenchContent::room_dungeon_cache_
private

◆ room_dungeon_cache_built_

bool yaze::editor::DungeonWorkbenchContent::room_dungeon_cache_built_ = false
private

◆ can_undo_

std::function<bool()> yaze::editor::DungeonWorkbenchContent::can_undo_
private

Definition at line 267 of file dungeon_workbench_content.h.

Referenced by DrawCanvasPane(), and SetUndoRedoProvider().

◆ can_redo_

std::function<bool()> yaze::editor::DungeonWorkbenchContent::can_redo_
private

Definition at line 268 of file dungeon_workbench_content.h.

Referenced by DrawCanvasPane(), and SetUndoRedoProvider().

◆ on_undo_

std::function<void()> yaze::editor::DungeonWorkbenchContent::on_undo_
private

Definition at line 269 of file dungeon_workbench_content.h.

Referenced by DrawCanvasPane(), and SetUndoRedoProvider().

◆ on_redo_

std::function<void()> yaze::editor::DungeonWorkbenchContent::on_redo_
private

Definition at line 270 of file dungeon_workbench_content.h.

Referenced by DrawCanvasPane(), and SetUndoRedoProvider().

◆ undo_desc_

std::function<std::string()> yaze::editor::DungeonWorkbenchContent::undo_desc_
private

Definition at line 271 of file dungeon_workbench_content.h.

Referenced by DrawCanvasPane(), and SetUndoRedoProvider().

◆ redo_desc_

std::function<std::string()> yaze::editor::DungeonWorkbenchContent::redo_desc_
private

Definition at line 272 of file dungeon_workbench_content.h.

Referenced by DrawCanvasPane(), and SetUndoRedoProvider().

◆ undo_depth_

std::function<int()> yaze::editor::DungeonWorkbenchContent::undo_depth_
private

Definition at line 273 of file dungeon_workbench_content.h.

Referenced by DrawCanvasPane(), and SetUndoRedoProvider().

◆ show_shortcut_legend_

bool yaze::editor::DungeonWorkbenchContent::show_shortcut_legend_ = false
private

Definition at line 276 of file dungeon_workbench_content.h.

Referenced by DrawInspectorShelfTools().

◆ open_dungeon_map_popup_

bool yaze::editor::DungeonWorkbenchContent::open_dungeon_map_popup_ = false
private

Definition at line 277 of file dungeon_workbench_content.h.

Referenced by DrawDungeonMapPopup(), and RequestDungeonMapPopup().

◆ pit_damage_replacement_room_id_

uint16_t yaze::editor::DungeonWorkbenchContent::pit_damage_replacement_room_id_ = 0
private

Definition at line 278 of file dungeon_workbench_content.h.

Referenced by DrawPitDamageControls().

◆ pit_damage_victim_room_id_

uint16_t yaze::editor::DungeonWorkbenchContent::pit_damage_victim_room_id_ = 0
private

Definition at line 279 of file dungeon_workbench_content.h.

Referenced by DrawPitDamageControls().

◆ pit_damage_status_message_

std::string yaze::editor::DungeonWorkbenchContent::pit_damage_status_message_
private

Definition at line 280 of file dungeon_workbench_content.h.

Referenced by DrawPitDamageControls().

◆ pit_damage_status_error_

bool yaze::editor::DungeonWorkbenchContent::pit_damage_status_error_ = false
private

Definition at line 281 of file dungeon_workbench_content.h.

Referenced by DrawPitDamageControls().

◆ pit_damage_control_rects_

DungeonWorkbenchPitDamageControlRects yaze::editor::DungeonWorkbenchContent::pit_damage_control_rects_ {}
private

◆ embedded_dungeon_map_

std::unique_ptr<DungeonMapPanel> yaze::editor::DungeonWorkbenchContent::embedded_dungeon_map_
private

Definition at line 283 of file dungeon_workbench_content.h.

Referenced by GetEmbeddedDungeonMap().

◆ room_tag_panel_

RoomTagEditorPanel* yaze::editor::DungeonWorkbenchContent::room_tag_panel_ = nullptr
private

◆ custom_collision_panel_

CustomCollisionPanel* yaze::editor::DungeonWorkbenchContent::custom_collision_panel_ = nullptr
private

◆ water_fill_panel_

WaterFillPanel* yaze::editor::DungeonWorkbenchContent::water_fill_panel_ = nullptr
private

◆ minecart_track_panel_

MinecartTrackEditorPanel* yaze::editor::DungeonWorkbenchContent::minecart_track_panel_ = nullptr
private

◆ object_selector_content_

WindowContent* yaze::editor::DungeonWorkbenchContent::object_selector_content_ = nullptr
private

◆ door_editor_content_

WindowContent* yaze::editor::DungeonWorkbenchContent::door_editor_content_ = nullptr
private

◆ sprite_editor_content_

WindowContent* yaze::editor::DungeonWorkbenchContent::sprite_editor_content_ = nullptr
private

◆ item_editor_content_

WindowContent* yaze::editor::DungeonWorkbenchContent::item_editor_content_ = nullptr
private

◆ room_graphics_content_

WindowContent* yaze::editor::DungeonWorkbenchContent::room_graphics_content_ = nullptr
private

◆ palette_editor_content_

WindowContent* yaze::editor::DungeonWorkbenchContent::palette_editor_content_ = nullptr
private

The documentation for this class was generated from the following files: