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) |
| bool | duplicate_on_drag = false |
| bool | drag_mutation_started = false |
| bool | drag_has_duplicated = false |
| int | drag_last_tile_dx = 0 |
| int | drag_last_tile_dy = 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) |
| int | paint_brush_radius = 0 |
| int | paint_last_tile_x = -1 |
| int | paint_last_tile_y = -1 |
| uint8_t | paint_collision_value = 0 |
| bool | is_painting = false |
| bool | paint_mutation_started = false |
Mode-specific state data.
Centralizes all preview data and drag state that was previously scattered across multiple member variables.
Definition at line 48 of file interaction_mode.h.
|
inline |
Clear all mode state.
Definition at line 89 of file interaction_mode.h.
References detected_door_direction, drag_current, drag_has_duplicated, drag_last_tile_dx, drag_last_tile_dy, drag_mutation_started, drag_start, duplicate_on_drag, entity_drag_current, entity_drag_start, is_painting, yaze::zelda3::North, paint_brush_radius, paint_collision_value, paint_last_tile_x, paint_last_tile_y, paint_mutation_started, 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 120 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 132 of file interaction_mode.h.
References drag_current, drag_has_duplicated, drag_last_tile_dx, drag_last_tile_dy, drag_mutation_started, drag_start, duplicate_on_drag, entity_drag_current, and entity_drag_start.
Referenced by yaze::editor::InteractionModeManager::SetMode().
|
inline |
Clear only rectangle selection state.
Definition at line 147 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 50 of file interaction_mode.h.
Referenced by Clear(), and ClearPlacementData().
| std::optional<zelda3::DoorType> yaze::editor::ModeState::preview_door_type |
Definition at line 51 of file interaction_mode.h.
Referenced by Clear(), ClearPlacementData(), yaze::editor::DungeonObjectInteraction::GetPreviewDoorType(), and yaze::editor::DungeonObjectInteraction::SetPreviewDoorType().
| std::optional<uint8_t> yaze::editor::ModeState::preview_sprite_id |
Definition at line 52 of file interaction_mode.h.
Referenced by Clear(), ClearPlacementData(), yaze::editor::DungeonObjectInteraction::GetPreviewSpriteId(), and yaze::editor::DungeonObjectInteraction::SetPreviewSpriteId().
| std::optional<uint8_t> yaze::editor::ModeState::preview_item_id |
Definition at line 53 of file interaction_mode.h.
Referenced by Clear(), ClearPlacementData(), yaze::editor::DungeonObjectInteraction::GetPreviewItemId(), and yaze::editor::DungeonObjectInteraction::SetPreviewItemId().
| zelda3::DoorDirection yaze::editor::ModeState::detected_door_direction = zelda3::DoorDirection::North |
Definition at line 56 of file interaction_mode.h.
Referenced by Clear(), and ClearPlacementData().
| uint8_t yaze::editor::ModeState::snapped_door_position = 0 |
Definition at line 57 of file interaction_mode.h.
Referenced by Clear(), and ClearPlacementData().
| ImVec2 yaze::editor::ModeState::drag_start = ImVec2(0, 0) |
Definition at line 60 of file interaction_mode.h.
Referenced by Clear(), and ClearDragData().
| ImVec2 yaze::editor::ModeState::drag_current = ImVec2(0, 0) |
Definition at line 61 of file interaction_mode.h.
Referenced by Clear(), and ClearDragData().
| bool yaze::editor::ModeState::duplicate_on_drag = false |
Definition at line 62 of file interaction_mode.h.
Referenced by Clear(), and ClearDragData().
| bool yaze::editor::ModeState::drag_mutation_started = false |
Definition at line 63 of file interaction_mode.h.
Referenced by Clear(), and ClearDragData().
| bool yaze::editor::ModeState::drag_has_duplicated = false |
Definition at line 64 of file interaction_mode.h.
Referenced by Clear(), and ClearDragData().
| int yaze::editor::ModeState::drag_last_tile_dx = 0 |
Definition at line 65 of file interaction_mode.h.
Referenced by Clear(), and ClearDragData().
| int yaze::editor::ModeState::drag_last_tile_dy = 0 |
Definition at line 66 of file interaction_mode.h.
Referenced by Clear(), and ClearDragData().
| int yaze::editor::ModeState::rect_start_x = 0 |
Definition at line 69 of file interaction_mode.h.
Referenced by Clear(), and ClearRectangleData().
| int yaze::editor::ModeState::rect_start_y = 0 |
Definition at line 70 of file interaction_mode.h.
Referenced by Clear(), and ClearRectangleData().
| int yaze::editor::ModeState::rect_end_x = 0 |
Definition at line 71 of file interaction_mode.h.
Referenced by Clear(), and ClearRectangleData().
| int yaze::editor::ModeState::rect_end_y = 0 |
Definition at line 72 of file interaction_mode.h.
Referenced by Clear(), and ClearRectangleData().
| ImVec2 yaze::editor::ModeState::entity_drag_start = ImVec2(0, 0) |
Definition at line 75 of file interaction_mode.h.
Referenced by Clear(), and ClearDragData().
| ImVec2 yaze::editor::ModeState::entity_drag_current = ImVec2(0, 0) |
Definition at line 76 of file interaction_mode.h.
Referenced by Clear(), and ClearDragData().
| int yaze::editor::ModeState::paint_brush_radius = 0 |
Definition at line 79 of file interaction_mode.h.
Referenced by Clear().
| int yaze::editor::ModeState::paint_last_tile_x = -1 |
Definition at line 80 of file interaction_mode.h.
Referenced by Clear(), and yaze::editor::InteractionModeManager::SetMode().
| int yaze::editor::ModeState::paint_last_tile_y = -1 |
Definition at line 81 of file interaction_mode.h.
Referenced by Clear(), and yaze::editor::InteractionModeManager::SetMode().
| uint8_t yaze::editor::ModeState::paint_collision_value = 0 |
Definition at line 82 of file interaction_mode.h.
Referenced by Clear(), and yaze::editor::CustomCollisionPanel::Draw().
| bool yaze::editor::ModeState::is_painting = false |
Definition at line 83 of file interaction_mode.h.
Referenced by Clear(), yaze::editor::InteractionModeManager::SetMode(), and yaze::editor::DungeonObjectInteraction::UpdateCollisionPainting().
| bool yaze::editor::ModeState::paint_mutation_started = false |
Definition at line 84 of file interaction_mode.h.
Referenced by Clear(), and yaze::editor::InteractionModeManager::SetMode().