1#ifndef YAZE_APP_EDITOR_DUNGEON_INTERACTION_INTERACTION_COORDINATOR_H_
2#define YAZE_APP_EDITOR_DUNGEON_INTERACTION_INTERACTION_COORDINATOR_H_
111 void HandleDrag(ImVec2 current_pos, ImVec2 delta);
Abstract base class for entity interaction handlers.
Handles door placement and interaction in the dungeon editor.
Coordinates interaction mode switching and dispatches to handlers.
const DoorInteractionHandler & door_handler() const
ItemInteractionHandler & item_handler()
SelectedEntity GetSelectedEntity() const
bool TrySelectEntityAtCursor(int canvas_x, int canvas_y)
Try to select entity at cursor position.
void HandleRelease()
Handle mouse release.
Mode GetSelectedEntityType() const
Get the type of currently selected entity.
InteractionContext * ctx_
ItemInteractionHandler item_handler_
const TileObjectHandler & tile_handler() const
void ClearEntitySelection()
void CancelCurrentMode()
Cancel current mode and return to select mode.
Mode GetCurrentMode() const
Get current interaction mode.
SpriteInteractionHandler & sprite_handler()
void SetContext(InteractionContext *ctx)
Set the shared interaction context.
BaseEntityHandler * GetActiveHandler()
Get active handler based on current mode.
void DeleteSelectedEntity()
Delete currently selected entity.
bool IsPlacementActive() const
Check if any placement mode is active.
bool HandleClick(int canvas_x, int canvas_y)
Handle click at canvas position.
DoorInteractionHandler door_handler_
void SelectEntity(EntityType type, size_t index)
void DrawPostPlacementOverlays()
Draw post-placement success toasts for all handlers (unconditional)
const SpriteInteractionHandler & sprite_handler() const
bool HandleMouseWheel(float delta)
TileObjectHandler & tile_handler()
TileObjectHandler tile_handler_
void DrawSelectionHighlights()
Draw selection highlights for all entity types.
const ItemInteractionHandler & item_handler() const
DoorInteractionHandler & door_handler()
void SetMode(Mode mode)
Set interaction mode.
Mode
Available interaction modes.
void ClearAllEntitySelections()
Clear all entity selections.
void DrawGhostPreviews()
Draw ghost previews for active placement mode.
bool HasEntitySelection() const
SpriteInteractionHandler sprite_handler_
std::optional< SelectedEntity > GetEntityAtPosition(int canvas_x, int canvas_y) const
void HandleDrag(ImVec2 current_pos, ImVec2 delta)
Handle drag operation.
Handles pot item placement and interaction in the dungeon editor.
Handles sprite placement and interaction in the dungeon editor.
Handles functional mutations and queries for tile objects.
EntityType
Type of entity that can be selected in the dungeon editor.
Shared context for all interaction handlers.
Represents a selected entity in the dungeon editor.