Handles door placement and interaction in the dungeon editor. More...
#include <door_interaction_handler.h>


Classes | |
| struct | PairBadgeOverlay |
Public Types | |
| enum class | PlacementBlockReason { kNone = 0 , kInvalidRoom , kDoorLimit , kInvalidPosition , kStorageValidation } |
| enum class | GhostCapacityState { kNormal = 0 , kNearLimit , kAtLimit } |
| using | DoorMutationPreflight |
Public Member Functions | |
| void | BeginPlacement () override |
| Begin placement mode. | |
| void | CancelPlacement () override |
| Cancel current placement. | |
| bool | IsPlacementActive () const override |
| Check if placement mode is active. | |
| bool | HandleClick (int canvas_x, int canvas_y) override |
| Handle mouse click at canvas position. | |
| void | HandleDrag (ImVec2 current_pos, ImVec2 delta) override |
| Handle mouse drag. | |
| void | HandleRelease () override |
| Handle mouse release. | |
| bool | HandleOverlayClick (int canvas_x, int canvas_y) |
| void | DrawGhostPreview () override |
| Draw ghost preview during placement. | |
| void | DrawSelectionHighlight () override |
| Draw selection highlight for selected entities. | |
| std::optional< size_t > | GetEntityAtPosition (int canvas_x, int canvas_y) const override |
| Get entity at canvas position. | |
| void | SetDoorType (zelda3::DoorType type) |
| Set door type for placement. | |
| zelda3::DoorType | GetDoorType () const |
| Get current door type for placement. | |
| void | DrawSnapIndicators () |
| Draw snap position indicators during door drag. | |
| void | SelectDoor (size_t index) |
| Select door at index. | |
| void | ClearSelection () |
| Clear door selection. | |
| bool | HasSelection () const |
| Check if a door is selected. | |
| std::optional< size_t > | GetSelectedIndex () const |
| Get selected door index. | |
| void | DeleteSelected () |
| Delete selected door. | |
| void | DeleteAll () |
| bool | NudgeSelected (int delta_x, int delta_y) |
| bool | MutateDoorType (size_t index, zelda3::DoorType new_type) |
| Change the type of a door in place, re-encoding ROM bytes. | |
| bool | UpdateDoor (size_t index, zelda3::DoorType type, zelda3::DoorDirection direction, uint8_t position) |
| void | SetDoorMutationPreflight (DoorMutationPreflight callback) |
| const absl::Status & | mutation_status () const |
| void | SetMutationErrorCallback (std::function< void(const absl::Status &)> callback) |
| bool | was_placement_blocked () const |
| True if the most recent PlaceDoorAtSnappedPosition was blocked. | |
| PlacementBlockReason | placement_block_reason () const |
| void | clear_placement_blocked () |
| GhostCapacityState | GetPlacementGhostCapacityState () const |
Public Member Functions inherited from yaze::editor::BaseEntityHandler | |
| virtual | ~BaseEntityHandler ()=default |
| void | SetContext (InteractionContext *ctx) |
| Set the interaction context. | |
| InteractionContext * | context () const |
| Get the interaction context. | |
| virtual bool | HandleMouseWheel (float delta) |
| void | DrawPostPlacementToast () |
Private Member Functions | |
| bool | PreflightDoors (const std::vector< zelda3::Room::Door > &candidate) |
| void | PlaceDoorAtSnappedPosition (int canvas_x, int canvas_y) |
| Place door at snapped position. | |
| bool | UpdateSnappedPosition (int canvas_x, int canvas_y) |
| Update snapped position based on cursor. | |
| std::pair< int, int > | GetCurrentDragAnchorPosition () const |
| std::optional< PairBadgeOverlay > | BuildPairBadgeOverlay (const zelda3::Room::Door &door, ImVec2 door_pos, ImVec2 door_size, float scale) const |
| void | NavigateToPairBadge (const PairBadgeOverlay &badge) const |
Private Attributes | |
| bool | door_placement_mode_ = false |
| PlacementBlockReason | placement_block_reason_ = PlacementBlockReason::kNone |
| zelda3::DoorType | preview_door_type_ = zelda3::DoorType::NormalDoor |
| zelda3::DoorDirection | detected_door_direction_ = zelda3::DoorDirection::North |
| uint8_t | snapped_door_position_ = 0 |
| std::optional< size_t > | selected_door_index_ |
| bool | is_dragging_ = false |
| ImVec2 | drag_start_pos_ |
| ImVec2 | drag_current_pos_ |
| ImVec2 | drag_grab_offset_from_anchor_ = ImVec2(0.0f, 0.0f) |
| DoorMutationPreflight | door_mutation_preflight_ |
| std::function< void(const absl::Status &) | mutation_error_callback_ ) |
| absl::Status | mutation_status_ = absl::OkStatus() |
Additional Inherited Members | |
Protected Member Functions inherited from yaze::editor::BaseEntityHandler | |
| void | TriggerSuccessToast () |
| void | DrawSuccessToastOverlay (const char *msg, ImU32 color) const |
| std::pair< int, int > | RoomToCanvas (int room_x, int room_y) const |
| Convert room tile coordinates to canvas pixel coordinates. | |
| std::pair< int, int > | CanvasToRoom (int canvas_x, int canvas_y) const |
| Convert canvas pixel coordinates to room tile coordinates. | |
| bool | IsWithinBounds (int canvas_x, int canvas_y) const |
| Check if coordinates are within room bounds. | |
| ImVec2 | GetCanvasZeroPoint () const |
| Get canvas zero point (for screen coordinate conversion) | |
| DungeonCanvasTransform | GetCanvasTransform () const |
| std::optional< ImVec2 > | GetPointerScreenPosition () const |
| bool | HasValidContext () const |
| Check if context is valid. | |
| zelda3::Room * | GetCurrentRoom () const |
| Get current room (convenience method) | |
Protected Attributes inherited from yaze::editor::BaseEntityHandler | |
| InteractionContext * | ctx_ = nullptr |
| float | toast_expire_time_ = 0.0f |
Static Protected Attributes inherited from yaze::editor::BaseEntityHandler | |
| static constexpr float | kToastDuration = 1.5f |
Handles door placement and interaction in the dungeon editor.
Doors snap to valid wall positions and have automatic direction detection based on which wall the cursor is near.
Definition at line 24 of file door_interaction_handler.h.
Definition at line 124 of file door_interaction_handler.h.
|
strong |
| Enumerator | |
|---|---|
| kNone | |
| kInvalidRoom | |
| kDoorLimit | |
| kInvalidPosition | |
| kStorageValidation | |
Definition at line 26 of file door_interaction_handler.h.
|
strong |
| Enumerator | |
|---|---|
| kNormal | |
| kNearLimit | |
| kAtLimit | |
Definition at line 33 of file door_interaction_handler.h.
|
overridevirtual |
Begin placement mode.
Called when user selects an entity to place from the palette. Override to initialize placement state.
Implements yaze::editor::BaseEntityHandler.
Definition at line 37 of file door_interaction_handler.cc.
References ClearSelection(), and door_placement_mode_.
Referenced by yaze::editor::InteractionCoordinator::SetMode().

|
overridevirtual |
Cancel current placement.
Called when user presses Escape or switches modes. Override to clean up placement state.
Implements yaze::editor::BaseEntityHandler.
Definition at line 42 of file door_interaction_handler.cc.
References detected_door_direction_, door_placement_mode_, yaze::zelda3::North, and snapped_door_position_.
Referenced by yaze::editor::InteractionCoordinator::CancelCurrentMode(), and yaze::editor::InteractionCoordinator::CancelPlacement().
|
inlineoverridevirtual |
Check if placement mode is active.
Implements yaze::editor::BaseEntityHandler.
Definition at line 45 of file door_interaction_handler.h.
References door_placement_mode_.
Referenced by yaze::editor::InteractionCoordinator::DrawGhostPreviews(), yaze::editor::InteractionCoordinator::DrawSelectionHighlights(), yaze::editor::InteractionCoordinator::HandleClick(), yaze::editor::InteractionCoordinator::HandleMouseWheel(), and yaze::editor::InteractionCoordinator::IsPlacementActive().
|
overridevirtual |
Handle mouse click at canvas position.
| canvas_x | Unscaled X position relative to canvas origin |
| canvas_y | Unscaled Y position relative to canvas origin |
Implements yaze::editor::BaseEntityHandler.
Definition at line 48 of file door_interaction_handler.cc.
References ClearSelection(), yaze::editor::BaseEntityHandler::ctx_, door_placement_mode_, drag_current_pos_, drag_grab_offset_from_anchor_, drag_start_pos_, yaze::editor::InteractionContext::GetCurrentRoomConst(), yaze::zelda3::Room::GetDoors(), GetEntityAtPosition(), yaze::editor::BaseEntityHandler::HasValidContext(), is_dragging_, yaze::editor::BaseEntityHandler::IsWithinBounds(), PlaceDoorAtSnappedPosition(), and SelectDoor().
Referenced by yaze::editor::InteractionCoordinator::HandleClick(), and yaze::editor::InteractionCoordinator::TrySelectEntityAtCursor().
|
overridevirtual |
Handle mouse drag.
| current_pos | Current unscaled room-pixel position |
| delta | Mouse movement since last frame (screen pixels) |
Implements yaze::editor::BaseEntityHandler.
Definition at line 84 of file door_interaction_handler.cc.
References drag_current_pos_, is_dragging_, and selected_door_index_.
Referenced by yaze::editor::InteractionCoordinator::HandleDrag().
|
overridevirtual |
Handle mouse release.
Called when left mouse button is released after a drag.
Implements yaze::editor::BaseEntityHandler.
Definition at line 91 of file door_interaction_handler.cc.
References yaze::editor::BaseEntityHandler::ctx_, yaze::zelda3::DoorPositionManager::DetectWallFromPosition(), drag_current_pos_, drag_start_pos_, GetCurrentDragAnchorPosition(), yaze::editor::BaseEntityHandler::GetCurrentRoom(), is_dragging_, yaze::zelda3::DoorPositionManager::IsValidPosition(), yaze::editor::kDoors, mutation_status_, yaze::editor::InteractionContext::NotifyInvalidateCache(), yaze::editor::InteractionContext::NotifyMutation(), PreflightDoors(), selected_door_index_, and yaze::zelda3::DoorPositionManager::SnapToNearestPosition().
Referenced by yaze::editor::InteractionCoordinator::HandleRelease().
| bool yaze::editor::DoorInteractionHandler::HandleOverlayClick | ( | int | canvas_x, |
| int | canvas_y ) |
Definition at line 155 of file door_interaction_handler.cc.
References BuildPairBadgeOverlay(), yaze::editor::BaseEntityHandler::GetCanvasTransform(), yaze::editor::BaseEntityHandler::GetCurrentRoom(), yaze::editor::BaseEntityHandler::HasValidContext(), is_dragging_, NavigateToPairBadge(), yaze::editor::DungeonCanvasTransform::RoomPixelsToScreen(), yaze::editor::DungeonCanvasTransform::RoomSizeToScreen(), yaze::editor::DungeonCanvasTransform::scale(), and selected_door_index_.
Referenced by yaze::editor::InteractionCoordinator::HandleClick().
|
overridevirtual |
Draw ghost preview during placement.
Called every frame when placement mode is active. Shows preview of entity at cursor position.
Implements yaze::editor::BaseEntityHandler.
Definition at line 205 of file door_interaction_handler.cc.
References detected_door_direction_, door_placement_mode_, yaze::editor::DrawPlacementCapacityBadge(), yaze::zelda3::East, yaze::editor::BaseEntityHandler::GetCanvasTransform(), yaze::editor::BaseEntityHandler::GetCurrentRoom(), yaze::zelda3::GetDoorDirectionName(), yaze::zelda3::DoorPositionManager::GetDoorEditorBounds(), yaze::zelda3::GetDoorTypeName(), yaze::editor::GetPlacementAccentColor(), yaze::editor::GetPlacementCapacityStatusText(), yaze::editor::GetPlacementCapacityTooltipSuffix(), GetPlacementGhostCapacityState(), yaze::editor::BaseEntityHandler::GetPointerScreenPosition(), yaze::editor::AgentUI::GetTheme(), yaze::editor::BaseEntityHandler::HasValidContext(), yaze::zelda3::kMaxDoors, kNormal, yaze::zelda3::North, preview_door_type_, yaze::editor::DungeonCanvasTransform::RoomPixelsToScreen(), yaze::editor::DungeonCanvasTransform::RoomSizeToScreen(), yaze::editor::DungeonCanvasTransform::scale(), yaze::editor::DungeonCanvasTransform::ScreenToRoomPixelCoordinates(), snapped_door_position_, yaze::zelda3::South, UpdateSnappedPosition(), and yaze::zelda3::West.
Referenced by yaze::editor::InteractionCoordinator::DrawGhostPreviews().
|
overridevirtual |
Draw selection highlight for selected entities.
Called every frame to show selection state.
Implements yaze::editor::BaseEntityHandler.
Definition at line 313 of file door_interaction_handler.cc.
References BuildPairBadgeOverlay(), yaze::editor::BaseEntityHandler::ctx_, yaze::zelda3::DoorPositionManager::DetectWallSection(), DrawSnapIndicators(), yaze::editor::BaseEntityHandler::GetCanvasTransform(), GetCurrentDragAnchorPosition(), yaze::editor::BaseEntityHandler::GetCurrentRoom(), yaze::zelda3::DoorPositionManager::GetDoorEditorBounds(), yaze::editor::AgentUI::GetTheme(), yaze::editor::BaseEntityHandler::HasValidContext(), is_dragging_, yaze::editor::InteractionContext::on_door_pair_navigation, yaze::editor::DungeonCanvasTransform::RoomPixelsToScreen(), yaze::editor::DungeonCanvasTransform::RoomSizeToScreen(), yaze::editor::DungeonCanvasTransform::scale(), selected_door_index_, and yaze::zelda3::DoorPositionManager::SnapToNearestPosition().
Referenced by yaze::editor::InteractionCoordinator::DrawSelectionHighlights().
|
overridevirtual |
Get entity at canvas position.
| canvas_x | Unscaled X position relative to canvas origin |
| canvas_y | Unscaled Y position relative to canvas origin |
Implements yaze::editor::BaseEntityHandler.
Definition at line 535 of file door_interaction_handler.cc.
References yaze::editor::BaseEntityHandler::ctx_, yaze::editor::InteractionContext::GetCurrentRoomConst(), yaze::zelda3::Room::GetDoors(), yaze::editor::BaseEntityHandler::HasValidContext(), and yaze::editor::BaseEntityHandler::IsWithinBounds().
Referenced by yaze::editor::InteractionCoordinator::GetEntitiesAtPosition(), and HandleClick().

|
inline |
Set door type for placement.
Definition at line 65 of file door_interaction_handler.h.
References preview_door_type_.
|
inline |
Get current door type for placement.
Definition at line 70 of file door_interaction_handler.h.
References preview_door_type_.
Referenced by yaze::editor::DoorEditorContent::DrawContent().
| void yaze::editor::DoorInteractionHandler::DrawSnapIndicators | ( | ) |
Draw snap position indicators during door drag.
Shows valid snap positions along the detected wall.
Definition at line 840 of file door_interaction_handler.cc.
References yaze::zelda3::DoorPositionManager::DetectWallSection(), yaze::editor::BaseEntityHandler::GetCanvasTransform(), GetCurrentDragAnchorPosition(), yaze::editor::BaseEntityHandler::GetCurrentRoom(), yaze::zelda3::DoorPositionManager::GetDoorEditorBounds(), yaze::zelda3::DoorPositionManager::GetSectionStartPosition(), yaze::editor::AgentUI::GetTheme(), yaze::editor::BaseEntityHandler::HasValidContext(), is_dragging_, preview_door_type_, yaze::editor::DungeonCanvasTransform::RoomPixelsToScreen(), yaze::editor::DungeonCanvasTransform::RoomSizeToScreen(), selected_door_index_, and yaze::zelda3::DoorPositionManager::SnapToNearestPosition().
Referenced by DrawSelectionHighlight(), and yaze::editor::InteractionCoordinator::DrawSelectionHighlights().
| void yaze::editor::DoorInteractionHandler::SelectDoor | ( | size_t | index | ) |
Select door at index.
Definition at line 559 of file door_interaction_handler.cc.
References yaze::editor::BaseEntityHandler::ctx_, yaze::editor::InteractionContext::NotifyEntityChanged(), and selected_door_index_.
Referenced by yaze::editor::InteractionCoordinator::ApplySelection(), HandleClick(), yaze::editor::InteractionCoordinator::SelectEntity(), yaze::editor::InteractionCoordinator::SetSelectedEntities(), and yaze::editor::InteractionCoordinator::UpdateEntitySelection().

| void yaze::editor::DoorInteractionHandler::ClearSelection | ( | ) |
Clear door selection.
Definition at line 564 of file door_interaction_handler.cc.
References is_dragging_, and selected_door_index_.
Referenced by BeginPlacement(), yaze::editor::InteractionCoordinator::ClearAllEntitySelections(), DeleteAll(), DeleteSelected(), yaze::editor::InteractionCoordinator::HandleClick(), HandleClick(), yaze::editor::InteractionCoordinator::SelectEntitiesInRect(), yaze::editor::InteractionCoordinator::SetSelectedEntities(), and yaze::editor::InteractionCoordinator::UpdateEntitySelection().
|
inline |
Check if a door is selected.
Definition at line 92 of file door_interaction_handler.h.
References selected_door_index_.
Referenced by yaze::editor::InteractionCoordinator::DrawSelectionHighlights(), yaze::editor::InteractionCoordinator::GetSelectedEntityType(), yaze::editor::InteractionCoordinator::HandleDrag(), and yaze::editor::InteractionCoordinator::HasEntitySelection().
|
inline |
Get selected door index.
Definition at line 97 of file door_interaction_handler.h.
References selected_door_index_.
Referenced by yaze::editor::InteractionCoordinator::GetSelectedEntity(), and yaze::editor::InteractionCoordinator::TrySelectEntityAtCursor().
| void yaze::editor::DoorInteractionHandler::DeleteSelected | ( | ) |
Delete selected door.
Definition at line 591 of file door_interaction_handler.cc.
References ClearSelection(), yaze::editor::BaseEntityHandler::ctx_, yaze::editor::BaseEntityHandler::GetCurrentRoom(), yaze::editor::BaseEntityHandler::HasValidContext(), yaze::editor::kDoors, mutation_status_, yaze::editor::InteractionContext::NotifyEntityChanged(), yaze::editor::InteractionContext::NotifyInvalidateCache(), yaze::editor::InteractionContext::NotifyMutation(), PreflightDoors(), and selected_door_index_.
| void yaze::editor::DoorInteractionHandler::DeleteAll | ( | ) |
Definition at line 618 of file door_interaction_handler.cc.
References ClearSelection(), yaze::editor::BaseEntityHandler::ctx_, yaze::editor::BaseEntityHandler::GetCurrentRoom(), yaze::editor::BaseEntityHandler::HasValidContext(), yaze::editor::kDoors, mutation_status_, yaze::editor::InteractionContext::NotifyEntityChanged(), yaze::editor::InteractionContext::NotifyInvalidateCache(), yaze::editor::InteractionContext::NotifyMutation(), and PreflightDoors().
| bool yaze::editor::DoorInteractionHandler::NudgeSelected | ( | int | delta_x, |
| int | delta_y ) |
Definition at line 641 of file door_interaction_handler.cc.
References yaze::editor::BaseEntityHandler::ctx_, yaze::zelda3::East, yaze::editor::BaseEntityHandler::GetCurrentRoom(), yaze::editor::BaseEntityHandler::HasValidContext(), yaze::zelda3::DoorPositionManager::IsValidPosition(), yaze::editor::kDoors, yaze::zelda3::DoorPositionManager::kMaxDoorPositions, mutation_status_, yaze::zelda3::North, yaze::editor::InteractionContext::NotifyEntityChanged(), yaze::editor::InteractionContext::NotifyInvalidateCache(), yaze::editor::InteractionContext::NotifyMutation(), PreflightDoors(), selected_door_index_, yaze::zelda3::South, and yaze::zelda3::West.
| bool yaze::editor::DoorInteractionHandler::MutateDoorType | ( | size_t | index, |
| zelda3::DoorType | new_type ) |
Change the type of a door in place, re-encoding ROM bytes.
Preserves the door's position and direction. Routes through NotifyMutation(kDoors) so the editor captures an undo snapshot.
Definition at line 699 of file door_interaction_handler.cc.
References yaze::editor::BaseEntityHandler::GetCurrentRoom(), mutation_status_, and UpdateDoor().
Referenced by yaze::editor::DoorEditorContent::DrawContent().

| bool yaze::editor::DoorInteractionHandler::UpdateDoor | ( | size_t | index, |
| zelda3::DoorType | type, | ||
| zelda3::DoorDirection | direction, | ||
| uint8_t | position ) |
Definition at line 710 of file door_interaction_handler.cc.
References yaze::editor::BaseEntityHandler::ctx_, yaze::editor::BaseEntityHandler::GetCurrentRoom(), yaze::editor::BaseEntityHandler::HasValidContext(), yaze::zelda3::DoorPositionManager::IsValidPosition(), yaze::editor::kDoors, mutation_status_, yaze::editor::InteractionContext::NotifyEntityChanged(), yaze::editor::InteractionContext::NotifyInvalidateCache(), yaze::editor::InteractionContext::NotifyMutation(), and PreflightDoors().
Referenced by yaze::editor::anonymous_namespace{dungeon_entity_inspector.cc}::DrawDoor(), and MutateDoorType().
|
inline |
Definition at line 126 of file door_interaction_handler.h.
References door_mutation_preflight_.
Referenced by yaze::editor::DungeonEditorV2::ConfigureViewerUndoHooks().
|
inline |
Definition at line 129 of file door_interaction_handler.h.
References mutation_status_.
|
inline |
Definition at line 130 of file door_interaction_handler.h.
References mutation_error_callback_.
|
inline |
True if the most recent PlaceDoorAtSnappedPosition was blocked.
Definition at line 136 of file door_interaction_handler.h.
References kNone, and placement_block_reason_.
|
inline |
Definition at line 139 of file door_interaction_handler.h.
References placement_block_reason_.
|
inline |
Definition at line 142 of file door_interaction_handler.h.
References kNone, and placement_block_reason_.
| DoorInteractionHandler::GhostCapacityState yaze::editor::DoorInteractionHandler::GetPlacementGhostCapacityState | ( | ) | const |
Definition at line 198 of file door_interaction_handler.cc.
References yaze::editor::BaseEntityHandler::GetCurrentRoom(), yaze::editor::GetPlacementCapacityState(), and yaze::zelda3::kMaxDoors.
Referenced by DrawGhostPreview().

|
private |
Definition at line 569 of file door_interaction_handler.cc.
References yaze::editor::BaseEntityHandler::ctx_, yaze::editor::InteractionContext::current_room_id, door_mutation_preflight_, yaze::editor::BaseEntityHandler::GetCurrentRoom(), yaze::editor::BaseEntityHandler::HasValidContext(), mutation_error_callback_, and mutation_status_.
Referenced by DeleteAll(), DeleteSelected(), HandleRelease(), NudgeSelected(), PlaceDoorAtSnappedPosition(), and UpdateDoor().

|
private |
Place door at snapped position.
Definition at line 751 of file door_interaction_handler.cc.
References yaze::zelda3::Room::Door::byte1, yaze::zelda3::Room::Door::byte2, yaze::editor::BaseEntityHandler::ctx_, yaze::zelda3::DoorPositionManager::DetectWallFromPosition(), yaze::zelda3::Room::Door::direction, yaze::zelda3::Room::Door::EncodeBytes(), yaze::editor::BaseEntityHandler::GetCurrentRoom(), yaze::editor::BaseEntityHandler::HasValidContext(), yaze::zelda3::DoorPositionManager::IsValidPosition(), kDoorLimit, yaze::editor::kDoors, kInvalidPosition, kInvalidRoom, yaze::zelda3::kMaxDoors, kNone, kStorageValidation, mutation_status_, yaze::editor::InteractionContext::NotifyInvalidateCache(), yaze::editor::InteractionContext::NotifyMutation(), placement_block_reason_, yaze::zelda3::Room::Door::position, PreflightDoors(), preview_door_type_, yaze::zelda3::DoorPositionManager::SnapToNearestPosition(), yaze::editor::BaseEntityHandler::TriggerSuccessToast(), and yaze::zelda3::Room::Door::type.
Referenced by HandleClick().
|
private |
Update snapped position based on cursor.
Definition at line 819 of file door_interaction_handler.cc.
References detected_door_direction_, yaze::zelda3::DoorPositionManager::DetectWallFromPosition(), snapped_door_position_, and yaze::zelda3::DoorPositionManager::SnapToNearestPosition().
Referenced by DrawGhostPreview().

|
private |
Definition at line 832 of file door_interaction_handler.cc.
References drag_current_pos_, and drag_grab_offset_from_anchor_.
Referenced by DrawSelectionHighlight(), DrawSnapIndicators(), and HandleRelease().
|
private |
Definition at line 396 of file door_interaction_handler.cc.
References yaze::editor::DoorInteractionHandler::PairBadgeOverlay::color, yaze::editor::BaseEntityHandler::ctx_, yaze::editor::InteractionContext::current_room_id, yaze::zelda3::Room::Door::direction, yaze::editor::DungeonConnectionTargetRoom(), yaze::zelda3::East, yaze::editor::DungeonRoomStore::GetIfLoaded(), is_dragging_, yaze::zelda3::IsRoomConnectionDoorType(), yaze::editor::kLower, yaze::editor::kUpper, yaze::editor::DoorInteractionHandler::PairBadgeOverlay::label, yaze::editor::NeighborRoomId(), yaze::zelda3::NormalDoor, yaze::zelda3::NormalDoorLower, yaze::zelda3::North, yaze::editor::OppositeDir(), yaze::editor::PlanDungeonDoorConnection(), yaze::zelda3::Room::Door::position, yaze::zelda3::DoorPositionManager::PositionToTileCoords(), yaze::editor::InteractionContext::rooms, yaze::editor::DoorInteractionHandler::PairBadgeOverlay::screen_pos, yaze::editor::DoorInteractionHandler::PairBadgeOverlay::screen_size, selected_door_index_, yaze::zelda3::South, yaze::editor::DoorInteractionHandler::PairBadgeOverlay::target_door_index, yaze::editor::DoorInteractionHandler::PairBadgeOverlay::target_room_id, yaze::editor::DoorInteractionHandler::PairBadgeOverlay::target_tile_x, yaze::editor::DoorInteractionHandler::PairBadgeOverlay::target_tile_y, yaze::zelda3::Room::Door::type, and yaze::zelda3::West.
Referenced by DrawSelectionHighlight(), and HandleOverlayClick().
|
private |
Definition at line 526 of file door_interaction_handler.cc.
References yaze::editor::BaseEntityHandler::ctx_, yaze::editor::InteractionContext::on_door_pair_navigation, yaze::editor::DoorInteractionHandler::PairBadgeOverlay::target_door_index, yaze::editor::DoorInteractionHandler::PairBadgeOverlay::target_room_id, yaze::editor::DoorInteractionHandler::PairBadgeOverlay::target_tile_x, and yaze::editor::DoorInteractionHandler::PairBadgeOverlay::target_tile_y.
Referenced by HandleOverlayClick().
|
private |
Definition at line 160 of file door_interaction_handler.h.
Referenced by BeginPlacement(), CancelPlacement(), DrawGhostPreview(), HandleClick(), and IsPlacementActive().
|
private |
Definition at line 161 of file door_interaction_handler.h.
Referenced by clear_placement_blocked(), PlaceDoorAtSnappedPosition(), placement_block_reason(), and was_placement_blocked().
|
private |
Definition at line 162 of file door_interaction_handler.h.
Referenced by DrawGhostPreview(), DrawSnapIndicators(), GetDoorType(), PlaceDoorAtSnappedPosition(), and SetDoorType().
|
private |
Definition at line 163 of file door_interaction_handler.h.
Referenced by CancelPlacement(), DrawGhostPreview(), and UpdateSnappedPosition().
|
private |
Definition at line 164 of file door_interaction_handler.h.
Referenced by CancelPlacement(), DrawGhostPreview(), and UpdateSnappedPosition().
|
private |
Definition at line 167 of file door_interaction_handler.h.
Referenced by BuildPairBadgeOverlay(), ClearSelection(), DeleteSelected(), DrawSelectionHighlight(), DrawSnapIndicators(), GetSelectedIndex(), HandleDrag(), HandleOverlayClick(), HandleRelease(), HasSelection(), NudgeSelected(), and SelectDoor().
|
private |
Definition at line 168 of file door_interaction_handler.h.
Referenced by BuildPairBadgeOverlay(), ClearSelection(), DrawSelectionHighlight(), DrawSnapIndicators(), HandleClick(), HandleDrag(), HandleOverlayClick(), and HandleRelease().
|
private |
Definition at line 169 of file door_interaction_handler.h.
Referenced by HandleClick(), and HandleRelease().
|
private |
Definition at line 170 of file door_interaction_handler.h.
Referenced by GetCurrentDragAnchorPosition(), HandleClick(), HandleDrag(), and HandleRelease().
|
private |
Definition at line 174 of file door_interaction_handler.h.
Referenced by GetCurrentDragAnchorPosition(), and HandleClick().
|
private |
Definition at line 176 of file door_interaction_handler.h.
Referenced by PreflightDoors(), and SetDoorMutationPreflight().
|
private |
Definition at line 177 of file door_interaction_handler.h.
Referenced by PreflightDoors(), and SetMutationErrorCallback().
|
private |
Definition at line 178 of file door_interaction_handler.h.
Referenced by DeleteAll(), DeleteSelected(), HandleRelease(), MutateDoorType(), mutation_status(), NudgeSelected(), PlaceDoorAtSnappedPosition(), PreflightDoors(), and UpdateDoor().