yaze 0.3.2
Link to the Past ROM Editor
 
Loading...
Searching...
No Matches
entity_workbench.h
Go to the documentation of this file.
1#ifndef YAZE_APP_EDITOR_OVERWORLD_ENTITY_ENTITY_WORKBENCH_H
2#define YAZE_APP_EDITOR_OVERWORLD_ENTITY_ENTITY_WORKBENCH_H
3
4#include <functional>
5#include <optional>
6#include <string>
7
10#include "imgui/imgui.h"
16
17namespace yaze {
18
19namespace zelda3 {
20class Overworld;
21class GameEntity;
22} // namespace zelda3
23
24namespace editor {
25
26class EntityMutationService;
27
37 public:
39
40 // WindowContent interface
41 std::string GetId() const override { return "overworld.entity_workbench"; }
42 std::string GetWorkflowGroup() const override { return "Editors"; }
43 std::string GetDisplayName() const override { return "Entity Properties"; }
44 std::string GetIcon() const override { return ICON_MD_EDIT; }
45 std::string GetEditorCategory() const override { return "Overworld"; }
46 void Draw(bool* p_open) override;
47
48 // Authoritative Edit State
50
51 // UI Flow Triggers
54 void DrawPopups();
55
56 // Pending Insertion State
57 void ProcessPendingInsertion(EntityMutationService* mutation_service);
58
59 // Context Menu Content
60 // Renders the entity right-click menu. Returns the entity whose property
61 // editor should open; the caller opens it after EndPopup so the editor
62 // popup ID resolves at the same ID-stack level as its BeginPopupModal.
64
65 private:
66 static constexpr const char* kContextMenuPopupId =
67 "##OverworldEntityContextMenu";
68
70 std::optional<zelda3::SpecialEntranceInspection> special_entrances_;
71 const Rom* inspected_rom_ = nullptr;
72 const uint8_t* inspected_rom_data_ = nullptr;
74};
75
76} // namespace editor
77} // namespace yaze
78
79#endif // YAZE_APP_EDITOR_OVERWORLD_ENTITY_ENTITY_WORKBENCH_H
The Rom class is used to load, save, and modify Rom data. This is a generic SNES ROM container and do...
Definition rom.h:49
Editor-level service responsible for overworld entity mutations.
Authoritative component for entity editing state and UI.
std::optional< zelda3::SpecialEntranceInspection > special_entrances_
void OpenEditorFor(zelda3::GameEntity *entity)
std::string GetEditorCategory() const override
Editor category this panel belongs to.
std::string GetDisplayName() const override
Human-readable name shown in menus and title bars.
std::string GetWorkflowGroup() const override
Optional workflow group for hack-centric actions.
void ProcessPendingInsertion(EntityMutationService *mutation_service)
static constexpr const char * kContextMenuPopupId
std::string GetIcon() const override
Material Design icon for this panel.
void Draw(bool *p_open) override
Draw the panel content.
void OpenContextMenuFor(zelda3::GameEntity *entity)
void SetActiveEntity(zelda3::GameEntity *entity)
std::string GetId() const override
Unique identifier for this panel.
Base interface for all logical window content components.
Base class for all overworld and dungeon entities.
Definition common.h:31
#define ICON_MD_EDIT
Definition icons.h:645