yaze 0.3.2
Link to the Past ROM Editor
 
Loading...
Searching...
No Matches
overworld_entity_interaction.h
Go to the documentation of this file.
1#ifndef YAZE_APP_EDITOR_OVERWORLD_OVERWORLD_ENTITY_INTERACTION_H
2#define YAZE_APP_EDITOR_OVERWORLD_OVERWORLD_ENTITY_INTERACTION_H
3
6#include "imgui/imgui.h"
7#include "rom/rom.h"
13
14namespace yaze {
15namespace editor {
16
31 public:
32 explicit OverworldEntityInteraction(Rom* rom) : rom_(rom) {}
33
34 void SetRom(Rom* rom) { rom_ = rom; }
36 entity_renderer_ = renderer;
37 }
38
43 void HandleContextMenus(zelda3::GameEntity* hovered_entity);
44
50 int HandleDoubleClick(zelda3::GameEntity* hovered_entity);
51
58 bool HandleDragDrop(zelda3::GameEntity* hovered_entity, ImVec2 mouse_delta);
59
63 void FinishDrag();
64
65 // Current entity accessors (for popup drawing in parent editor)
71
72 // Drag state accessors
73 bool is_dragging() const { return is_dragging_; }
75
76 private:
77 Rom* rom_ = nullptr;
79
80 // Current entity state (for popups)
86
87 // Drag state
88 bool is_dragging_ = false;
89 bool free_movement_ = false;
91};
92
93} // namespace editor
94} // namespace yaze
95
96#endif // YAZE_APP_EDITOR_OVERWORLD_OVERWORLD_ENTITY_INTERACTION_H
97
The Rom class is used to load, save, and modify Rom data. This is a generic SNES ROM container and do...
Definition rom.h:24
Handles entity interaction logic for the Overworld Editor.
void FinishDrag()
Finish an active drag operation.
int HandleDoubleClick(zelda3::GameEntity *hovered_entity)
Handle double-click actions on entities.
void HandleContextMenus(zelda3::GameEntity *hovered_entity)
Handle entity context menus on right-click.
void SetEntityRenderer(OverworldEntityRenderer *renderer)
bool HandleDragDrop(zelda3::GameEntity *hovered_entity, ImVec2 mouse_delta)
Handle entity drag-and-drop operations.
Handles visualization of all overworld entities (entrances, exits, items, sprites)
Base class for all overworld and dungeon entities.
Definition common.h:31
Represents an overworld exit that transitions from dungeon to overworld.
A class for managing sprites in the overworld and underworld.
Definition sprite.h:35