yaze 0.3.2
Link to the Past ROM Editor
 
Loading...
Searching...
No Matches
interaction_mode.cc
Go to the documentation of this file.
2
3namespace yaze {
4namespace editor {
5
7 if (mode == current_mode_) {
8 return; // No change needed
9 }
10
11 // Store previous mode for potential undo/escape
13
14 // Clear appropriate state based on transition type
15 switch (current_mode_) {
20 // Leaving placement mode - clear placement data
22 break;
23
26 // Leaving drag mode - clear drag data
28 break;
29
31 // Leaving rectangle select - clear rectangle data
33 break;
34
36 // Leaving select mode - nothing special to clear
37 break;
38 }
39
40 current_mode_ = mode;
41}
42
44 // Clear all state and return to select mode
48}
49
51 switch (current_mode_) {
53 return "Select";
55 return "Place Object";
57 return "Place Door";
59 return "Place Sprite";
61 return "Place Item";
63 return "Dragging Objects";
65 return "Dragging Entity";
67 return "Rectangle Select";
68 default:
69 return "Unknown";
70 }
71}
72
73} // namespace editor
74} // namespace yaze
void CancelCurrentMode()
Cancel current mode and return to Select.
void SetMode(InteractionMode mode)
Set interaction mode.
const char * GetModeName() const
Get mode name for debugging/UI.
InteractionMode
Unified interaction mode for the dungeon editor.
void Clear()
Clear all mode state.
void ClearPlacementData()
Clear only placement preview data.
void ClearRectangleData()
Clear only rectangle selection state.
void ClearDragData()
Clear only drag-related state.