-
-
Notifications
You must be signed in to change notification settings - Fork 3
Description
Feature Request: Improve Tile Selection and Drag-and-Drop Interaction
I used GPT to help word and elaborate might change some of these goals.
Currently, the "Update Position" functionality is a bit finicky, especially when tiles overlap. The behavior makes it challenging to control which tile is being dragged and dropped. Here's how it works right now:
-
Clicking on a tile selects it and any overlapping tiles at that pixel.
-
The selection remains active until the mouse button is released.
-
While dragging, a generated texture of the selected tiles is displayed and moved around, but the actual position isn't updated until the mouse button is released.
-
The system remembers the last selected tiles, allowing you to view stats for them.
-
Visual Feedback: A shader is used to add a red glow around the non-transparent pixels of the texture we generated for selected tiles.
- While this works, there’s room for improvement to make the selection process more intuitive and aligned with tools like Photoshop. For example, Photoshop uses a border that alternates light and dark pixels in a pattern (often referred to as a "marching ants" effect) for better visibility of selected areas.
Goals
To make the selection and drag-and-drop process more user-friendly while maintaining visual clarity for overlapping tiles and improving the overall feedback mechanism.
Tasks
-
Select Cursor
- Regular Arrow clicking selects things.
- Control Click to add to selection.
- Alt Click to add to selection
-
Square Select Cursor
- So you can drag a square around things to select more things.
- Control Click + Drag to add anything in the bounding square to selection.
-
Move Cursor
- Overlapping Arrow cursor that moves the current selection.
-
Improve Visual Feedback for Selection
- Keep the current shader-based red glow?
- Implement an alternative visual, like Photoshop's "marching ants" border, to highlight selected areas more clearly.
- Make the selection show till selection is cleared.
-
Improve Control Panel
- Show the selected tiles as ImageButtons.
- Where we can toggle selection off individual tiles off by clicking them.
- Maybe move this bit into it's own ImGui::Window.
- Instead of just dumping all the info about the tiles into the control panel. we should make info dump tool tips.
- We'd want to hold generation of them till after we are hovered.
- So we'll add a lambda overload for toop_tip function. So we can handle drawing things other than text.
-
Refine Drag-and-Drop Interaction
- Continue using the generated texture for real-time feedback during dragging.
- Ensure the drag-and-drop interaction scales effectively when selecting and moving multiple tiles.
-
Advanced Selection Features
- Add functionality to cycle through overlapping tiles (e.g., by clicking repeatedly on the same spot).
- Provide a way to prioritize tile selection visually when multiple tiles overlap at a single pixel.
-
Optional: Advanced Feedback Options
- Include user-configurable settings for selection feedback (e.g., choose between red glow and marching ants).
- Add animations or subtle effects to make selection transitions more noticeable.
Challenges
- Describing Visual Styles: The "marching ants" effect is a good start, but finding the most effective and performance-friendly method is key.
- Performance Considerations: Ensure new visual feedback mechanisms do not degrade performance, especially when dealing with many overlapping tiles or complex maps.
- Usability: The new visuals and selection options must feel natural and intuitive to users while improving clarity in dense or overlapping tile scenarios.