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 <string>
6
7
#include "
app/editor/system/editor_panel.h
"
8
#include "
app/gui/core/icons.h
"
9
#include "imgui/imgui.h"
10
#include "
zelda3/overworld/overworld_entrance.h
"
11
#include "
zelda3/overworld/overworld_exit.h
"
12
#include "
zelda3/overworld/overworld_item.h
"
13
#include "
zelda3/sprite/sprite.h
"
14
15
namespace
yaze
{
16
17
namespace
zelda3 {
18
class
Overworld;
19
class
GameEntity;
20
}
// namespace zelda3
21
22
namespace
editor {
23
24
class
EntityMutationService;
25
34
class
OverworldEntityWorkbench
:
public
WindowContent
{
35
public
:
36
OverworldEntityWorkbench
() =
default
;
37
38
// WindowContent interface
39
std::string
GetId
()
const override
{
return
"overworld.entity_workbench"
; }
40
std::string
GetDisplayName
()
const override
{
return
"Entity Properties"
; }
41
std::string
GetIcon
()
const override
{
return
ICON_MD_EDIT
; }
42
std::string
GetEditorCategory
()
const override
{
return
"Overworld"
; }
43
void
Draw
(
bool
* p_open)
override
;
44
45
// Authoritative Edit State
46
void
SetActiveEntity
(
zelda3::GameEntity
* entity);
47
48
// UI Flow Triggers
49
void
OpenEditorFor
(
zelda3::GameEntity
* entity);
50
void
OpenContextMenuFor
(
zelda3::GameEntity
* entity);
51
void
DrawPopups
();
52
53
// Pending Insertion State
54
void
SetPendingInsertion
(
const
std::string& type, ImVec2 pos);
55
void
ProcessPendingInsertion
(
EntityMutationService
* mutation_service,
56
int
current_map,
int
game_state);
57
58
// Context Menu Content
59
void
DrawEntityContextMenu
();
60
61
private
:
62
static
constexpr
const
char
*
kContextMenuPopupId
=
63
"##OverworldEntityContextMenu"
;
64
65
zelda3::GameEntity
*
editing_entity_
=
nullptr
;
66
};
67
68
}
// namespace editor
69
}
// namespace yaze
70
71
#endif
// YAZE_APP_EDITOR_OVERWORLD_ENTITY_ENTITY_WORKBENCH_H
yaze::editor::EntityMutationService
Editor-level service responsible for overworld entity mutations.
Definition
entity_mutation_service.h:29
yaze::editor::OverworldEntityWorkbench
Authoritative component for entity editing state and UI.
Definition
entity_workbench.h:34
yaze::editor::OverworldEntityWorkbench::editing_entity_
zelda3::GameEntity * editing_entity_
Definition
entity_workbench.h:65
yaze::editor::OverworldEntityWorkbench::SetPendingInsertion
void SetPendingInsertion(const std::string &type, ImVec2 pos)
Definition
entity_workbench.cc:195
yaze::editor::OverworldEntityWorkbench::OpenEditorFor
void OpenEditorFor(zelda3::GameEntity *entity)
Definition
entity_workbench.cc:71
yaze::editor::OverworldEntityWorkbench::GetEditorCategory
std::string GetEditorCategory() const override
Editor category this panel belongs to.
Definition
entity_workbench.h:42
yaze::editor::OverworldEntityWorkbench::GetDisplayName
std::string GetDisplayName() const override
Human-readable name shown in menus and title bars.
Definition
entity_workbench.h:40
yaze::editor::OverworldEntityWorkbench::OverworldEntityWorkbench
OverworldEntityWorkbench()=default
yaze::editor::OverworldEntityWorkbench::DrawPopups
void DrawPopups()
Definition
entity_workbench.cc:120
yaze::editor::OverworldEntityWorkbench::kContextMenuPopupId
static constexpr const char * kContextMenuPopupId
Definition
entity_workbench.h:62
yaze::editor::OverworldEntityWorkbench::DrawEntityContextMenu
void DrawEntityContextMenu()
Definition
entity_workbench.cc:229
yaze::editor::OverworldEntityWorkbench::GetIcon
std::string GetIcon() const override
Material Design icon for this panel.
Definition
entity_workbench.h:41
yaze::editor::OverworldEntityWorkbench::Draw
void Draw(bool *p_open) override
Draw the panel content.
Definition
entity_workbench.cc:42
yaze::editor::OverworldEntityWorkbench::ProcessPendingInsertion
void ProcessPendingInsertion(EntityMutationService *mutation_service, int current_map, int game_state)
Definition
entity_workbench.cc:204
yaze::editor::OverworldEntityWorkbench::OpenContextMenuFor
void OpenContextMenuFor(zelda3::GameEntity *entity)
Definition
entity_workbench.cc:111
yaze::editor::OverworldEntityWorkbench::SetActiveEntity
void SetActiveEntity(zelda3::GameEntity *entity)
Definition
entity_workbench.cc:64
yaze::editor::OverworldEntityWorkbench::GetId
std::string GetId() const override
Unique identifier for this panel.
Definition
entity_workbench.h:39
yaze::editor::WindowContent
Base interface for all logical window content components.
Definition
editor_panel.h:89
yaze::zelda3::GameEntity
Base class for all overworld and dungeon entities.
Definition
common.h:31
editor_panel.h
icons.h
ICON_MD_EDIT
#define ICON_MD_EDIT
Definition
icons.h:645
yaze
Definition
patch_export_usage.cc:8
overworld_entrance.h
overworld_exit.h
overworld_item.h
sprite.h
src
app
editor
overworld
entity
entity_workbench.h
Generated by
1.10.0