Authoritative component for entity editing state and UI. More...
#include <entity_workbench.h>


Public Member Functions | |
| OverworldEntityWorkbench ()=default | |
| 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. | |
| void | Draw (bool *p_open) override |
| Draw the panel content. | |
| void | SetActiveEntity (zelda3::GameEntity *entity) |
| void | OpenEditorFor (zelda3::GameEntity *entity) |
| void | OpenContextMenuFor (zelda3::GameEntity *entity) |
| void | DrawPopups () |
| void | SetPendingInsertion (const std::string &type, ImVec2 pos) |
| void | ProcessPendingInsertion (EntityMutationService *mutation_service, int current_map, int game_state) |
| void | DrawEntityContextMenu () |
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 int | GetPriority () const |
| Get display priority for menu ordering. | |
| 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 Attributes | |
| zelda3::GameEntity * | editing_entity_ = nullptr |
Static Private Attributes | |
| static constexpr const char * | kContextMenuPopupId |
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) | |
Authoritative component for entity editing state and UI.
This WindowContent manages the active editing context for overworld entities (items, sprites, entrances, exits). It hosts the property popups and tracks the "currently editing" entity state.
Definition at line 34 of file entity_workbench.h.
|
default |
|
inlineoverridevirtual |
Unique identifier for this panel.
IDs should be:
Implements yaze::editor::WindowContent.
Definition at line 39 of file entity_workbench.h.
|
inlineoverridevirtual |
Human-readable name shown in menus and title bars.
Implements yaze::editor::WindowContent.
Definition at line 40 of file entity_workbench.h.
|
inlineoverridevirtual |
Material Design icon for this panel.
Implements yaze::editor::WindowContent.
Definition at line 41 of file entity_workbench.h.
References ICON_MD_EDIT.
|
inlineoverridevirtual |
Editor category this panel belongs to.
Implements yaze::editor::WindowContent.
Definition at line 42 of file entity_workbench.h.
|
overridevirtual |
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 42 of file entity_workbench.cc.
References yaze::editor::CurrentOverworldWindowContext(), ICON_MD_SETTINGS, and OpenEditorFor().

| void yaze::editor::OverworldEntityWorkbench::SetActiveEntity | ( | zelda3::GameEntity * | entity | ) |
Definition at line 64 of file entity_workbench.cc.
References yaze::editor::CurrentOverworldWindowContext().
Referenced by yaze::editor::OverworldEditor::ClearSelectedItem(), and yaze::editor::OverworldEditor::SelectItemByIdentity().

| void yaze::editor::OverworldEntityWorkbench::OpenEditorFor | ( | zelda3::GameEntity * | entity | ) |
Definition at line 71 of file entity_workbench.cc.
References yaze::editor::CurrentOverworldWindowContext(), editing_entity_, yaze::zelda3::GameEntity::entity_type_, yaze::zelda3::GameEntity::kEntrance, yaze::zelda3::GameEntity::kExit, yaze::zelda3::GameEntity::kItem, yaze::gui::EditorNames::kOverworld, yaze::zelda3::GameEntity::kSprite, and yaze::gui::MakePopupId().
Referenced by Draw(), DrawEntityContextMenu(), and ProcessPendingInsertion().

| void yaze::editor::OverworldEntityWorkbench::OpenContextMenuFor | ( | zelda3::GameEntity * | entity | ) |
Definition at line 111 of file entity_workbench.cc.
References yaze::editor::CurrentOverworldWindowContext(), and kContextMenuPopupId.
Referenced by yaze::editor::OverworldEditor::InitInteractionCoordinator().

| void yaze::editor::OverworldEntityWorkbench::DrawPopups | ( | ) |
Definition at line 120 of file entity_workbench.cc.
References yaze::editor::CurrentOverworldWindowContext(), DrawEntityContextMenu(), yaze::editor::DrawExitEditorPopup(), yaze::editor::DrawItemEditorPopup(), yaze::editor::DrawOverworldEntrancePopup(), yaze::editor::DrawSpriteEditorPopup(), editing_entity_, kContextMenuPopupId, yaze::zelda3::GameEntity::kEntrance, yaze::zelda3::GameEntity::kExit, yaze::zelda3::GameEntity::kItem, yaze::gui::EditorNames::kOverworld, yaze::zelda3::GameEntity::kSprite, and yaze::gui::MakePopupId().
| void yaze::editor::OverworldEntityWorkbench::SetPendingInsertion | ( | const std::string & | type, |
| ImVec2 | pos ) |
Definition at line 195 of file entity_workbench.cc.
References yaze::editor::CurrentOverworldWindowContext().

| void yaze::editor::OverworldEntityWorkbench::ProcessPendingInsertion | ( | EntityMutationService * | mutation_service, |
| int | current_map, | ||
| int | game_state ) |
Definition at line 204 of file entity_workbench.cc.
References yaze::editor::CurrentOverworldWindowContext(), yaze::editor::EntityMutationService::InsertEntity(), and OpenEditorFor().

| void yaze::editor::OverworldEntityWorkbench::DrawEntityContextMenu | ( | ) |
Definition at line 229 of file entity_workbench.cc.
References yaze::editor::CurrentOverworldWindowContext(), ICON_MD_EDIT, ICON_MD_LINK, yaze::zelda3::GameEntity::kEntrance, yaze::zelda3::GameEntity::kExit, and OpenEditorFor().
Referenced by DrawPopups().

|
staticconstexprprivate |
Definition at line 62 of file entity_workbench.h.
Referenced by DrawPopups(), and OpenContextMenuFor().
|
private |
Definition at line 65 of file entity_workbench.h.
Referenced by DrawPopups(), and OpenEditorFor().