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
37 // Leaving paint modes - clear paint state
42 break;
43
45 // Leaving select mode - nothing special to clear
46 break;
47 }
48
49 current_mode_ = mode;
50}
51
53 // Clear all state and return to select mode
57}
58
85
86} // namespace editor
87} // 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.
constexpr const char * kObjects
constexpr const char * kRectangle
constexpr const char * kItems
constexpr const char * kSprites
constexpr const char * kSelect
constexpr const char * kDragEntity
constexpr const char * kWaterFill
constexpr const char * kDoors
constexpr const char * kCollision
constexpr const char * kDragObjects
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.