Mode-specific state data. More...
#include <interaction_mode.h>
Public Member Functions | |
| void | Clear () |
| Clear all mode state. | |
| void | ClearPlacementData () |
| Clear only placement preview data. | |
| void | ClearDragData () |
| Clear only drag-related state. | |
| void | ClearRectangleData () |
| Clear only rectangle selection state. | |
Public Attributes | |
| std::optional< zelda3::RoomObject > | preview_object |
| std::optional< zelda3::DoorType > | preview_door_type |
| std::optional< uint8_t > | preview_sprite_id |
| std::optional< uint8_t > | preview_item_id |
| zelda3::DoorDirection | detected_door_direction = zelda3::DoorDirection::North |
| uint8_t | snapped_door_position = 0 |
| ImVec2 | drag_start = ImVec2(0, 0) |
| ImVec2 | drag_current = ImVec2(0, 0) |
| int | rect_start_x = 0 |
| int | rect_start_y = 0 |
| int | rect_end_x = 0 |
| int | rect_end_y = 0 |
| ImVec2 | entity_drag_start = ImVec2(0, 0) |
| ImVec2 | entity_drag_current = ImVec2(0, 0) |
Mode-specific state data.
Centralizes all preview data and drag state that was previously scattered across multiple member variables.
Definition at line 46 of file interaction_mode.h.
|
inline |
Clear all mode state.
Definition at line 74 of file interaction_mode.h.
References detected_door_direction, drag_current, drag_start, entity_drag_current, entity_drag_start, yaze::zelda3::North, preview_door_type, preview_item_id, preview_object, preview_sprite_id, rect_end_x, rect_end_y, rect_start_x, rect_start_y, and snapped_door_position.
Referenced by yaze::editor::InteractionModeManager::CancelCurrentMode().
|
inline |
Clear only placement preview data.
Definition at line 94 of file interaction_mode.h.
References detected_door_direction, yaze::zelda3::North, preview_door_type, preview_item_id, preview_object, preview_sprite_id, and snapped_door_position.
Referenced by yaze::editor::InteractionModeManager::SetMode().
|
inline |
Clear only drag-related state.
Definition at line 106 of file interaction_mode.h.
References drag_current, drag_start, entity_drag_current, and entity_drag_start.
Referenced by yaze::editor::InteractionModeManager::SetMode().
|
inline |
Clear only rectangle selection state.
Definition at line 116 of file interaction_mode.h.
References rect_end_x, rect_end_y, rect_start_x, and rect_start_y.
Referenced by yaze::editor::InteractionModeManager::SetMode().
| std::optional<zelda3::RoomObject> yaze::editor::ModeState::preview_object |
Definition at line 48 of file interaction_mode.h.
Referenced by Clear(), ClearPlacementData(), and yaze::editor::DungeonObjectInteraction::SetPreviewObject().
| std::optional<zelda3::DoorType> yaze::editor::ModeState::preview_door_type |
| std::optional<uint8_t> yaze::editor::ModeState::preview_sprite_id |
| std::optional<uint8_t> yaze::editor::ModeState::preview_item_id |
Definition at line 51 of file interaction_mode.h.
Referenced by Clear(), ClearPlacementData(), yaze::editor::DungeonObjectInteraction::GetPreviewItemId(), yaze::editor::DungeonObjectInteraction::SetItemPlacementMode(), and yaze::editor::DungeonObjectInteraction::SetPreviewItemId().
| zelda3::DoorDirection yaze::editor::ModeState::detected_door_direction = zelda3::DoorDirection::North |
Definition at line 54 of file interaction_mode.h.
Referenced by Clear(), ClearPlacementData(), and yaze::editor::DungeonObjectInteraction::DrawDoorGhostPreview().
| uint8_t yaze::editor::ModeState::snapped_door_position = 0 |
Definition at line 55 of file interaction_mode.h.
Referenced by Clear(), and ClearPlacementData().
| ImVec2 yaze::editor::ModeState::drag_start = ImVec2(0, 0) |
Definition at line 58 of file interaction_mode.h.
Referenced by Clear(), ClearDragData(), and yaze::editor::DungeonObjectInteraction::HandleCanvasMouseInput().
| ImVec2 yaze::editor::ModeState::drag_current = ImVec2(0, 0) |
Definition at line 59 of file interaction_mode.h.
Referenced by Clear(), ClearDragData(), and yaze::editor::DungeonObjectInteraction::HandleCanvasMouseInput().
| int yaze::editor::ModeState::rect_start_x = 0 |
Definition at line 62 of file interaction_mode.h.
Referenced by Clear(), ClearRectangleData(), and yaze::editor::DungeonObjectInteraction::HandleCanvasMouseInput().
| int yaze::editor::ModeState::rect_start_y = 0 |
Definition at line 63 of file interaction_mode.h.
Referenced by Clear(), and ClearRectangleData().
| int yaze::editor::ModeState::rect_end_x = 0 |
Definition at line 64 of file interaction_mode.h.
Referenced by Clear(), and ClearRectangleData().
| int yaze::editor::ModeState::rect_end_y = 0 |
Definition at line 65 of file interaction_mode.h.
Referenced by Clear(), and ClearRectangleData().
| ImVec2 yaze::editor::ModeState::entity_drag_start = ImVec2(0, 0) |
Definition at line 68 of file interaction_mode.h.
Referenced by Clear(), ClearDragData(), and yaze::editor::DungeonObjectInteraction::TrySelectEntityAtCursor().
| ImVec2 yaze::editor::ModeState::entity_drag_current = ImVec2(0, 0) |
Definition at line 69 of file interaction_mode.h.
Referenced by Clear(), and ClearDragData().