yaze 0.3.2
Link to the Past ROM Editor
 
Loading...
Searching...
No Matches
yaze::editor::DungeonObjectInteraction Class Reference

Handles object selection, placement, and interaction within the dungeon canvas. More...

#include <dungeon_object_interaction.h>

Public Types

using PlacementPolicy = TileObjectHandler::PlacementPolicy
 

Public Member Functions

 DungeonObjectInteraction (gui::Canvas *canvas)
 
void SetContext (const InteractionContext &ctx)
 Set the unified interaction context.
 
InteractionCoordinator & entity_coordinator ()
 Get the interaction coordinator for entity handling.
 
const InteractionCoordinator & entity_coordinator () const
 
MutationDomain last_mutation_domain () const
 
MutationDomain last_invalidation_domain () const
 
void SetRom (Rom *rom)
 
void HandleCanvasMouseInput ()
 
void CheckForObjectSelection ()
 
void PlaceObjectAtPosition (int room_x, int room_y)
 
void DrawSelectionHighlights ()
 
void DrawHoverHighlight (const std::vector< zelda3::RoomObject > &objects)
 
void DrawGhostPreview ()
 
std::pair< int, int > RoomToCanvasCoordinates (int room_x, int room_y) const
 
std::pair< int, int > CanvasToRoomCoordinates (int canvas_x, int canvas_y) const
 
bool IsWithinCanvasBounds (int canvas_x, int canvas_y, int margin=32) const
 
void SetCurrentRoom (DungeonRoomStore *rooms, int room_id)
 
void SetPreviewObject (const zelda3::RoomObject &object, bool loaded)
 
void SetPlacementPolicy (PlacementPolicy policy)
 
PlacementPolicy GetPlacementPolicy () const
 
const zelda3::RoomObject * GetPlacementPreview () const
 
bool SetPlacementPreviewSize (uint8_t size)
 
bool SetPlacementPreviewLayer (int layer)
 
bool BeginPlacementFromSelection ()
 
void SetCurrentPaletteGroup (const gfx::PaletteGroup &group, bool force_refresh=false)
 
InteractionModeManager & mode_manager ()
 
const InteractionModeManager & mode_manager () const
 
bool IsObjectLoaded () const
 
void CancelPlacement ()
 
void HandleMouseRelease ()
 
void SetDoorPlacementMode (bool enabled, zelda3::DoorType type=zelda3::DoorType::NormalDoor)
 
bool IsDoorPlacementActive () const
 
void SetPreviewDoorType (zelda3::DoorType type)
 
zelda3::DoorType GetPreviewDoorType () const
 
void CancelDoorPlacement ()
 
void SetSpritePlacementMode (bool enabled, uint8_t sprite_id=0)
 
bool IsSpritePlacementActive () const
 
void SetPreviewSpriteId (uint8_t id)
 
uint8_t GetPreviewSpriteId () const
 
void CancelSpritePlacement ()
 
void SetItemPlacementMode (bool enabled, uint8_t item_id=0)
 
bool IsItemPlacementActive () const
 
void SetPreviewItemId (uint8_t id)
 
uint8_t GetPreviewItemId () const
 
void CancelItemPlacement ()
 
std::vector< size_t > GetSelectedObjectIndices () const
 
void SetSelectedObjects (const std::vector< size_t > &indices)
 
bool IsObjectSelectActive () const
 
void ClearSelection ()
 
bool IsObjectSelected (size_t index) const
 
size_t GetSelectionCount () const
 
void SetSelectionChangeCallback (std::function< void()> callback)
 
void SetObjectSelectionVisibilityPredicate (std::function< bool(int, const zelda3::RoomObject &)> predicate)
 
void HandleScrollWheelResize ()
 
bool NudgeSelected (int delta_x, int delta_y)
 
absl::Status HandleDeleteSelected ()
 
void HandleDeleteAllObjects ()
 
absl::Status HandleCopySelected ()
 
absl::Status HandlePasteObjects ()
 
absl::Status HandleDuplicateSelected ()
 
absl::Status HandlePasteAt (int pixel_x, int pixel_y)
 
const absl::Status & selection_edit_status () const
 
void SetSharedSelectionClipboard (DungeonSelectionClipboard *clipboard)
 
bool HasClipboardData () const
 
bool SetObjectId (size_t index, int16_t id)
 
bool SetObjectSize (size_t index, uint8_t size)
 
bool SetObjectLayer (size_t index, zelda3::RoomObject::LayerType layer)
 
bool CanAssignSelectedObjectsToLayer (int target_layer) const
 
bool SendSelectedToLayer (int target_layer)
 
void SendSelectedToFront ()
 
void SendSelectedToBack ()
 
void BringSelectedForward ()
 
void SendSelectedBackward ()
 
void SetLayerFilter (int layer)
 
int GetLayerFilter () const
 
bool IsLayerFilterActive () const
 
bool IsMaskModeActive () const
 
const char * GetLayerFilterName () const
 
void SetLayersMerged (bool merged)
 
bool AreLayersMerged () const
 
void HandleLayerKeyboardShortcuts ()
 
void SetObjectPlacedCallback (std::function< void(const zelda3::RoomObject &)> callback)
 
void SetCacheInvalidationCallback (std::function< void()> callback)
 
void SetMutationCallback (std::function< void()> callback)
 
void SetSelectionEditCallbacks (std::function< absl::Status(const DungeonSelectionEditPlan &, bool)> edit, std::function< void()> finish, std::function< void(const absl::Status &)> error={})
 
void FinishSelectionGesture ()
 
void SetEditorSystem (zelda3::DungeonEditorSystem *system)
 
void SelectEntity (EntityType type, size_t index)
 
void ClearEntitySelection ()
 
bool HasEntitySelection () const
 
SelectedEntity GetSelectedEntity () const
 
void DrawEntitySelectionHighlights ()
 
void DrawDoorSnapIndicators ()
 
void SetEntityChangedCallback (std::function< void()> callback)
 
void SetDoorPairNavigationCallback (std::function< void(int, std::optional< size_t >, int, int)> callback)
 

Private Member Functions

void CompleteObjectPlacement (const zelda3::RoomObject &object)
 
DungeonCanvasTransform GetCanvasTransform () const
 
std::pair< int, int > CalculateObjectBounds (const zelda3::RoomObject &object)
 
void HandleLeftClick (const ImVec2 &canvas_mouse_pos)
 
void UpdateCollisionPainting (const ImVec2 &canvas_mouse_pos)
 
void UpdateWaterFillPainting (const ImVec2 &canvas_mouse_pos)
 
void HandleObjectSelectionStart (const ImVec2 &canvas_mouse_pos)
 
void HandleEmptySpaceClick (const ImVec2 &canvas_mouse_pos)
 
void FinishPaintStroke ()
 
bool HandleKeyboardNudge ()
 
DungeonSelectionClipboard & clipboard ()
 
const DungeonSelectionClipboard & clipboard () const
 

Private Attributes

gui::Canvas * canvas_
 
zelda3::DungeonEditorSystem * editor_system_ = nullptr
 
DungeonRoomStore * rooms_ = nullptr
 
int current_room_id_ = 0
 
InteractionContext interaction_context_
 
InteractionCoordinator entity_coordinator_
 
InteractionModeManager mode_manager_
 
gfx::PaletteGroup current_palette_group_
 
DungeonSelectionClipboard selection_clipboard_
 
DungeonSelectionClipboard * shared_selection_clipboard_ = nullptr
 
ObjectSelection selection_
 
std::function< void(const zelda3::RoomObject &) object_placed_callback_ )
 

Detailed Description

Handles object selection, placement, and interaction within the dungeon canvas.

This component manages mouse interactions for object selection (similar to OverworldEditor), object placement, drag operations, and multi-object selection.

Definition at line 44 of file dungeon_object_interaction.h.

Member Typedef Documentation

◆ PlacementPolicy

Constructor & Destructor Documentation

◆ DungeonObjectInteraction()

Member Function Documentation

◆ SetContext()

void yaze::editor::DungeonObjectInteraction::SetContext ( const InteractionContext & ctx)
inline

Set the unified interaction context.

This is the preferred method for configuring the interaction handler. It propagates context to all sub-handlers.

Definition at line 67 of file dungeon_object_interaction.h.

References yaze::editor::InteractionContext::canvas, canvas_, entity_coordinator_, interaction_context_, yaze::editor::InteractionContext::selection, selection_, and yaze::editor::InteractionCoordinator::SetContext().

Here is the call graph for this function:

◆ entity_coordinator() [1/2]

InteractionCoordinator & yaze::editor::DungeonObjectInteraction::entity_coordinator ( )
inline

Get the interaction coordinator for entity handling.

Use this for advanced entity operations (doors, sprites, items).

Definition at line 79 of file dungeon_object_interaction.h.

References entity_coordinator_.

Referenced by yaze::editor::DungeonCanvasViewer::ApplyDoorConnection(), yaze::editor::DungeonCanvasViewer::ApplyRoomTransfer(), yaze::editor::BuildDungeonSelectionSnapshot(), yaze::editor::DungeonEditorV2::ConfigureViewerUndoHooks(), yaze::editor::DungeonCanvasViewer::DrawChangePingOverlay(), yaze::editor::ObjectSelectorContent::DrawContent(), yaze::editor::DoorEditorContent::DrawContent(), yaze::editor::SpriteEditorPanel::DrawContent(), yaze::editor::anonymous_namespace{dungeon_entity_inspector.cc}::DrawDoor(), yaze::editor::DungeonCanvasViewer::DrawDungeonCanvas(), yaze::editor::DrawDungeonEntityInspector(), yaze::editor::anonymous_namespace{dungeon_entity_inspector.cc}::DrawItem(), yaze::editor::DungeonCanvasViewer::DrawMinecartCanvas(), yaze::editor::ItemEditorPanel::DrawPlacementControls(), yaze::editor::SpriteEditorPanel::DrawPlacementControls(), yaze::editor::ItemEditorPanel::DrawRoomItems(), yaze::editor::SpriteEditorPanel::DrawRoomSprites(), yaze::editor::DungeonWorkbenchContent::DrawSelectedObjectActions(), yaze::editor::anonymous_namespace{dungeon_entity_inspector.cc}::DrawSprite(), yaze::editor::DungeonCanvasViewer::GetObjectUnderContextCursor(), yaze::editor::DungeonCanvasViewer::HandleRoomCanvasDropTargets(), yaze::editor::DungeonCanvasViewer::HandleRoomCanvasNavigation(), yaze::editor::DungeonCanvasViewer::HandleTouchLongPressContextMenu(), yaze::editor::DoorEditorContent::HasMatchingViewer(), yaze::editor::ItemEditorPanel::HasMatchingViewer(), yaze::editor::DungeonCanvasViewer::PreviewDoorConnection(), yaze::editor::DungeonCanvasViewer::PreviewRoomTransfer(), yaze::editor::DungeonCanvasViewer::RefreshRomBackedState(), yaze::editor::DungeonEditorV2::RefreshRoomMetadataViews(), yaze::editor::DungeonCanvasViewer::RenderPotItems(), and yaze::editor::DungeonCanvasViewer::RenderSprites().

◆ entity_coordinator() [2/2]

const InteractionCoordinator & yaze::editor::DungeonObjectInteraction::entity_coordinator ( ) const
inline

Definition at line 80 of file dungeon_object_interaction.h.

References entity_coordinator_.

◆ last_mutation_domain()

MutationDomain yaze::editor::DungeonObjectInteraction::last_mutation_domain ( ) const
inline

◆ last_invalidation_domain()

MutationDomain yaze::editor::DungeonObjectInteraction::last_invalidation_domain ( ) const
inline

◆ SetRom()

◆ HandleCanvasMouseInput()

◆ CheckForObjectSelection()

void yaze::editor::DungeonObjectInteraction::CheckForObjectSelection ( )

◆ PlaceObjectAtPosition()

void yaze::editor::DungeonObjectInteraction::PlaceObjectAtPosition ( int room_x,
int room_y )

Definition at line 569 of file dungeon_object_interaction.cc.

◆ DrawSelectionHighlights()

◆ DrawHoverHighlight()

◆ DrawGhostPreview()

void yaze::editor::DungeonObjectInteraction::DrawGhostPreview ( )

◆ RoomToCanvasCoordinates()

std::pair< int, int > yaze::editor::DungeonObjectInteraction::RoomToCanvasCoordinates ( int room_x,
int room_y ) const

Definition at line 608 of file dungeon_object_interaction.cc.

◆ CanvasToRoomCoordinates()

std::pair< int, int > yaze::editor::DungeonObjectInteraction::CanvasToRoomCoordinates ( int canvas_x,
int canvas_y ) const

Definition at line 614 of file dungeon_object_interaction.cc.

Referenced by UpdateCollisionPainting().

◆ IsWithinCanvasBounds()

bool yaze::editor::DungeonObjectInteraction::IsWithinCanvasBounds ( int canvas_x,
int canvas_y,
int margin = 32 ) const

Definition at line 620 of file dungeon_object_interaction.cc.

◆ SetCurrentRoom()

◆ SetPreviewObject()

void yaze::editor::DungeonObjectInteraction::SetPreviewObject ( const zelda3::RoomObject & object,
bool loaded )

◆ SetPlacementPolicy()

void yaze::editor::DungeonObjectInteraction::SetPlacementPolicy ( PlacementPolicy policy)
inline

◆ GetPlacementPolicy()

PlacementPolicy yaze::editor::DungeonObjectInteraction::GetPlacementPolicy ( ) const
inline

◆ GetPlacementPreview()

◆ SetPlacementPreviewSize()

bool yaze::editor::DungeonObjectInteraction::SetPlacementPreviewSize ( uint8_t size)
inline

◆ SetPlacementPreviewLayer()

bool yaze::editor::DungeonObjectInteraction::SetPlacementPreviewLayer ( int layer)
inline

◆ BeginPlacementFromSelection()

bool yaze::editor::DungeonObjectInteraction::BeginPlacementFromSelection ( )

Definition at line 595 of file dungeon_object_interaction.cc.

◆ SetCurrentPaletteGroup()

◆ mode_manager() [1/2]

◆ mode_manager() [2/2]

const InteractionModeManager & yaze::editor::DungeonObjectInteraction::mode_manager ( ) const
inline

Definition at line 158 of file dungeon_object_interaction.h.

References mode_manager_.

◆ IsObjectLoaded()

bool yaze::editor::DungeonObjectInteraction::IsObjectLoaded ( ) const
inline

◆ CancelPlacement()

◆ HandleMouseRelease()

void yaze::editor::DungeonObjectInteraction::HandleMouseRelease ( )

◆ SetDoorPlacementMode()

◆ IsDoorPlacementActive()

bool yaze::editor::DungeonObjectInteraction::IsDoorPlacementActive ( ) const
inline

◆ SetPreviewDoorType()

void yaze::editor::DungeonObjectInteraction::SetPreviewDoorType ( zelda3::DoorType type)
inline

Definition at line 175 of file dungeon_object_interaction.h.

References yaze::editor::InteractionModeManager::GetModeState(), mode_manager_, and yaze::editor::ModeState::preview_door_type.

Here is the call graph for this function:

◆ GetPreviewDoorType()

zelda3::DoorType yaze::editor::DungeonObjectInteraction::GetPreviewDoorType ( ) const
inline

◆ CancelDoorPlacement()

void yaze::editor::DungeonObjectInteraction::CancelDoorPlacement ( )
inline

◆ SetSpritePlacementMode()

void yaze::editor::DungeonObjectInteraction::SetSpritePlacementMode ( bool enabled,
uint8_t sprite_id = 0 )

◆ IsSpritePlacementActive()

bool yaze::editor::DungeonObjectInteraction::IsSpritePlacementActive ( ) const
inline

◆ SetPreviewSpriteId()

void yaze::editor::DungeonObjectInteraction::SetPreviewSpriteId ( uint8_t id)
inline

Definition at line 193 of file dungeon_object_interaction.h.

References yaze::editor::InteractionModeManager::GetModeState(), mode_manager_, and yaze::editor::ModeState::preview_sprite_id.

Here is the call graph for this function:

◆ GetPreviewSpriteId()

uint8_t yaze::editor::DungeonObjectInteraction::GetPreviewSpriteId ( ) const
inline

Definition at line 196 of file dungeon_object_interaction.h.

References yaze::editor::InteractionModeManager::GetModeState(), mode_manager_, and yaze::editor::ModeState::preview_sprite_id.

Here is the call graph for this function:

◆ CancelSpritePlacement()

void yaze::editor::DungeonObjectInteraction::CancelSpritePlacement ( )
inline

◆ SetItemPlacementMode()

void yaze::editor::DungeonObjectInteraction::SetItemPlacementMode ( bool enabled,
uint8_t item_id = 0 )

◆ IsItemPlacementActive()

bool yaze::editor::DungeonObjectInteraction::IsItemPlacementActive ( ) const
inline

◆ SetPreviewItemId()

void yaze::editor::DungeonObjectInteraction::SetPreviewItemId ( uint8_t id)
inline

Definition at line 210 of file dungeon_object_interaction.h.

References yaze::editor::InteractionModeManager::GetModeState(), mode_manager_, and yaze::editor::ModeState::preview_item_id.

Here is the call graph for this function:

◆ GetPreviewItemId()

uint8_t yaze::editor::DungeonObjectInteraction::GetPreviewItemId ( ) const
inline

Definition at line 213 of file dungeon_object_interaction.h.

References yaze::editor::InteractionModeManager::GetModeState(), mode_manager_, and yaze::editor::ModeState::preview_item_id.

Here is the call graph for this function:

◆ CancelItemPlacement()

void yaze::editor::DungeonObjectInteraction::CancelItemPlacement ( )
inline

◆ GetSelectedObjectIndices()

◆ SetSelectedObjects()

◆ IsObjectSelectActive()

bool yaze::editor::DungeonObjectInteraction::IsObjectSelectActive ( ) const
inline

◆ ClearSelection()

◆ IsObjectSelected()

bool yaze::editor::DungeonObjectInteraction::IsObjectSelected ( size_t index) const
inline

Definition at line 237 of file dungeon_object_interaction.h.

References yaze::editor::ObjectSelection::IsObjectSelected(), and selection_.

Here is the call graph for this function:

◆ GetSelectionCount()

size_t yaze::editor::DungeonObjectInteraction::GetSelectionCount ( ) const
inline

◆ SetSelectionChangeCallback()

void yaze::editor::DungeonObjectInteraction::SetSelectionChangeCallback ( std::function< void()> callback)
inline

Definition at line 243 of file dungeon_object_interaction.h.

References selection_, and yaze::editor::ObjectSelection::SetSelectionChangedCallback().

Here is the call graph for this function:

◆ SetObjectSelectionVisibilityPredicate()

void yaze::editor::DungeonObjectInteraction::SetObjectSelectionVisibilityPredicate ( std::function< bool(int, const zelda3::RoomObject &)> predicate)
inline

◆ HandleScrollWheelResize()

void yaze::editor::DungeonObjectInteraction::HandleScrollWheelResize ( )

◆ NudgeSelected()

bool yaze::editor::DungeonObjectInteraction::NudgeSelected ( int delta_x,
int delta_y )

Definition at line 374 of file dungeon_object_interaction.cc.

◆ HandleDeleteSelected()

◆ HandleDeleteAllObjects()

void yaze::editor::DungeonObjectInteraction::HandleDeleteAllObjects ( )

◆ HandleCopySelected()

absl::Status yaze::editor::DungeonObjectInteraction::HandleCopySelected ( )

Definition at line 701 of file dungeon_object_interaction.cc.

References yaze::editor::CopyDungeonSelection().

Referenced by yaze::editor::DungeonCanvasViewer::HandleTouchLongPressContextMenu().

Here is the call graph for this function:

◆ HandlePasteObjects()

absl::Status yaze::editor::DungeonObjectInteraction::HandlePasteObjects ( )

Definition at line 755 of file dungeon_object_interaction.cc.

◆ HandleDuplicateSelected()

◆ HandlePasteAt()

◆ selection_edit_status()

const absl::Status & yaze::editor::DungeonObjectInteraction::selection_edit_status ( ) const
inline

Definition at line 268 of file dungeon_object_interaction.h.

References entity_coordinator_, and yaze::editor::InteractionCoordinator::selection_edit_status().

Here is the call graph for this function:

◆ SetSharedSelectionClipboard()

void yaze::editor::DungeonObjectInteraction::SetSharedSelectionClipboard ( DungeonSelectionClipboard * clipboard)
inline

Definition at line 271 of file dungeon_object_interaction.h.

References clipboard(), and shared_selection_clipboard_.

Referenced by yaze::editor::DungeonEditorV2::ConfigureViewerUndoHooks().

Here is the call graph for this function:

◆ HasClipboardData()

bool yaze::editor::DungeonObjectInteraction::HasClipboardData ( ) const
inline

Definition at line 274 of file dungeon_object_interaction.h.

References clipboard(), and yaze::editor::DungeonSelectionClipboard::empty().

Here is the call graph for this function:

◆ SetObjectId()

bool yaze::editor::DungeonObjectInteraction::SetObjectId ( size_t index,
int16_t id )

Definition at line 791 of file dungeon_object_interaction.cc.

◆ SetObjectSize()

bool yaze::editor::DungeonObjectInteraction::SetObjectSize ( size_t index,
uint8_t size )

Definition at line 797 of file dungeon_object_interaction.cc.

◆ SetObjectLayer()

bool yaze::editor::DungeonObjectInteraction::SetObjectLayer ( size_t index,
zelda3::RoomObject::LayerType layer )

Definition at line 803 of file dungeon_object_interaction.cc.

◆ CanAssignSelectedObjectsToLayer()

bool yaze::editor::DungeonObjectInteraction::CanAssignSelectedObjectsToLayer ( int target_layer) const

Definition at line 814 of file dungeon_object_interaction.cc.

References yaze::zelda3::UsesRoomObjectStream().

Here is the call graph for this function:

◆ SendSelectedToLayer()

bool yaze::editor::DungeonObjectInteraction::SendSelectedToLayer ( int target_layer)

Definition at line 837 of file dungeon_object_interaction.cc.

◆ SendSelectedToFront()

void yaze::editor::DungeonObjectInteraction::SendSelectedToFront ( )

◆ SendSelectedToBack()

void yaze::editor::DungeonObjectInteraction::SendSelectedToBack ( )

◆ BringSelectedForward()

void yaze::editor::DungeonObjectInteraction::BringSelectedForward ( )

Definition at line 855 of file dungeon_object_interaction.cc.

◆ SendSelectedBackward()

void yaze::editor::DungeonObjectInteraction::SendSelectedBackward ( )

Definition at line 860 of file dungeon_object_interaction.cc.

◆ SetLayerFilter()

void yaze::editor::DungeonObjectInteraction::SetLayerFilter ( int layer)
inline

Definition at line 299 of file dungeon_object_interaction.h.

References selection_, and yaze::editor::ObjectSelection::SetLayerFilter().

Here is the call graph for this function:

◆ GetLayerFilter()

int yaze::editor::DungeonObjectInteraction::GetLayerFilter ( ) const
inline

Definition at line 300 of file dungeon_object_interaction.h.

References yaze::editor::ObjectSelection::GetLayerFilter(), and selection_.

Here is the call graph for this function:

◆ IsLayerFilterActive()

bool yaze::editor::DungeonObjectInteraction::IsLayerFilterActive ( ) const
inline

Definition at line 301 of file dungeon_object_interaction.h.

References yaze::editor::ObjectSelection::IsLayerFilterActive(), and selection_.

Here is the call graph for this function:

◆ IsMaskModeActive()

bool yaze::editor::DungeonObjectInteraction::IsMaskModeActive ( ) const
inline

Definition at line 302 of file dungeon_object_interaction.h.

References yaze::editor::ObjectSelection::IsMaskModeActive(), and selection_.

Referenced by yaze::editor::DungeonCanvasViewer::DrawRoomCanvasContent().

Here is the call graph for this function:

◆ GetLayerFilterName()

const char * yaze::editor::DungeonObjectInteraction::GetLayerFilterName ( ) const
inline

Definition at line 303 of file dungeon_object_interaction.h.

References yaze::editor::ObjectSelection::GetLayerFilterName(), and selection_.

Here is the call graph for this function:

◆ SetLayersMerged()

void yaze::editor::DungeonObjectInteraction::SetLayersMerged ( bool merged)
inline

Definition at line 306 of file dungeon_object_interaction.h.

References selection_, and yaze::editor::ObjectSelection::SetLayersMerged().

Referenced by yaze::editor::DungeonCanvasViewer::DrawLayerControls().

Here is the call graph for this function:

◆ AreLayersMerged()

bool yaze::editor::DungeonObjectInteraction::AreLayersMerged ( ) const
inline

Definition at line 307 of file dungeon_object_interaction.h.

References yaze::editor::ObjectSelection::AreLayersMerged(), and selection_.

Here is the call graph for this function:

◆ HandleLayerKeyboardShortcuts()

void yaze::editor::DungeonObjectInteraction::HandleLayerKeyboardShortcuts ( )

Definition at line 865 of file dungeon_object_interaction.cc.

Referenced by HandleCanvasMouseInput().

◆ SetObjectPlacedCallback()

void yaze::editor::DungeonObjectInteraction::SetObjectPlacedCallback ( std::function< void(const zelda3::RoomObject &)> callback)
inline

◆ SetCacheInvalidationCallback()

void yaze::editor::DungeonObjectInteraction::SetCacheInvalidationCallback ( std::function< void()> callback)
inline

◆ SetMutationCallback()

void yaze::editor::DungeonObjectInteraction::SetMutationCallback ( std::function< void()> callback)
inline

◆ SetSelectionEditCallbacks()

void yaze::editor::DungeonObjectInteraction::SetSelectionEditCallbacks ( std::function< absl::Status(const DungeonSelectionEditPlan &, bool)> edit,
std::function< void()> finish,
std::function< void(const absl::Status &)> error = {} )
inline

◆ FinishSelectionGesture()

void yaze::editor::DungeonObjectInteraction::FinishSelectionGesture ( )
inline

Definition at line 333 of file dungeon_object_interaction.h.

References entity_coordinator_, and yaze::editor::InteractionCoordinator::FinishSelectionGesture().

Here is the call graph for this function:

◆ SetEditorSystem()

void yaze::editor::DungeonObjectInteraction::SetEditorSystem ( zelda3::DungeonEditorSystem * system)
inline

◆ SelectEntity()

◆ ClearEntitySelection()

void yaze::editor::DungeonObjectInteraction::ClearEntitySelection ( )

Definition at line 971 of file dungeon_object_interaction.cc.

◆ HasEntitySelection()

◆ GetSelectedEntity()

◆ DrawEntitySelectionHighlights()

void yaze::editor::DungeonObjectInteraction::DrawEntitySelectionHighlights ( )

◆ DrawDoorSnapIndicators()

void yaze::editor::DungeonObjectInteraction::DrawDoorSnapIndicators ( )

Definition at line 987 of file dungeon_object_interaction.cc.

◆ SetEntityChangedCallback()

void yaze::editor::DungeonObjectInteraction::SetEntityChangedCallback ( std::function< void()> callback)
inline

◆ SetDoorPairNavigationCallback()

void yaze::editor::DungeonObjectInteraction::SetDoorPairNavigationCallback ( std::function< void(int, std::optional< size_t >, int, int)> callback)
inline

◆ CompleteObjectPlacement()

void yaze::editor::DungeonObjectInteraction::CompleteObjectPlacement ( const zelda3::RoomObject & object)
private

Definition at line 586 of file dungeon_object_interaction.cc.

Referenced by DungeonObjectInteraction().

◆ GetCanvasTransform()

DungeonCanvasTransform yaze::editor::DungeonObjectInteraction::GetCanvasTransform ( ) const
inlineprivate

Definition at line 367 of file dungeon_object_interaction.h.

References canvas_, yaze::gui::Canvas::global_scale(), yaze::gui::Canvas::scrolling(), and yaze::gui::Canvas::zero_point().

Referenced by HandleCanvasMouseInput().

Here is the call graph for this function:

◆ CalculateObjectBounds()

std::pair< int, int > yaze::editor::DungeonObjectInteraction::CalculateObjectBounds ( const zelda3::RoomObject & object)
private

Definition at line 809 of file dungeon_object_interaction.cc.

References yaze::zelda3::DimensionService::Get(), and yaze::zelda3::DimensionService::GetPixelDimensions().

Here is the call graph for this function:

◆ HandleLeftClick()

◆ UpdateCollisionPainting()

◆ UpdateWaterFillPainting()

void yaze::editor::DungeonObjectInteraction::UpdateWaterFillPainting ( const ImVec2 & canvas_mouse_pos)
private

Definition at line 199 of file dungeon_object_interaction.cc.

References yaze::core::FeatureFlags::get().

Referenced by HandleCanvasMouseInput().

Here is the call graph for this function:

◆ HandleObjectSelectionStart()

void yaze::editor::DungeonObjectInteraction::HandleObjectSelectionStart ( const ImVec2 & canvas_mouse_pos)
private

Definition at line 265 of file dungeon_object_interaction.cc.

Referenced by HandleLeftClick().

◆ HandleEmptySpaceClick()

void yaze::editor::DungeonObjectInteraction::HandleEmptySpaceClick ( const ImVec2 & canvas_mouse_pos)
private

Definition at line 282 of file dungeon_object_interaction.cc.

Referenced by HandleLeftClick().

◆ FinishPaintStroke()

void yaze::editor::DungeonObjectInteraction::FinishPaintStroke ( )
private

Definition at line 301 of file dungeon_object_interaction.cc.

◆ HandleKeyboardNudge()

bool yaze::editor::DungeonObjectInteraction::HandleKeyboardNudge ( )
private

Definition at line 334 of file dungeon_object_interaction.cc.

Referenced by HandleCanvasMouseInput().

◆ clipboard() [1/2]

DungeonSelectionClipboard & yaze::editor::DungeonObjectInteraction::clipboard ( )
inlineprivate

◆ clipboard() [2/2]

const DungeonSelectionClipboard & yaze::editor::DungeonObjectInteraction::clipboard ( ) const
inlineprivate

Member Data Documentation

◆ canvas_

gui::Canvas* yaze::editor::DungeonObjectInteraction::canvas_
private

◆ editor_system_

zelda3::DungeonEditorSystem* yaze::editor::DungeonObjectInteraction::editor_system_ = nullptr
private

Definition at line 373 of file dungeon_object_interaction.h.

Referenced by SetEditorSystem().

◆ rooms_

DungeonRoomStore* yaze::editor::DungeonObjectInteraction::rooms_ = nullptr
private

Definition at line 374 of file dungeon_object_interaction.h.

Referenced by UpdateCollisionPainting().

◆ current_room_id_

int yaze::editor::DungeonObjectInteraction::current_room_id_ = 0
private

Definition at line 375 of file dungeon_object_interaction.h.

Referenced by UpdateCollisionPainting().

◆ interaction_context_

◆ entity_coordinator_

◆ mode_manager_

◆ current_palette_group_

gfx::PaletteGroup yaze::editor::DungeonObjectInteraction::current_palette_group_
private

Definition at line 397 of file dungeon_object_interaction.h.

Referenced by SetCurrentPaletteGroup().

◆ selection_clipboard_

DungeonSelectionClipboard yaze::editor::DungeonObjectInteraction::selection_clipboard_
private

Definition at line 408 of file dungeon_object_interaction.h.

Referenced by clipboard(), and clipboard().

◆ shared_selection_clipboard_

DungeonSelectionClipboard* yaze::editor::DungeonObjectInteraction::shared_selection_clipboard_ = nullptr
private

Definition at line 409 of file dungeon_object_interaction.h.

Referenced by clipboard(), clipboard(), and SetSharedSelectionClipboard().

◆ selection_

◆ object_placed_callback_

std::function<void(const zelda3::RoomObject&) yaze::editor::DungeonObjectInteraction::object_placed_callback_)
private

Definition at line 415 of file dungeon_object_interaction.h.

Referenced by SetObjectPlacedCallback().


The documentation for this class was generated from the following files: