servatrice/cockatrice
Basile Clement 6d032c378f
Improve drag & drop behavior (#4963)
* Improve drag & drop behavior

This patch tweaks the drag & drop behavior (in particular, the grid
placement) to be more intuitive. More precisely, with this patch the
drag & drop will:

 - Only use the "hot spot" (i.e. position of the cursor on the card)
   for zones where the card is actually displayed around the cursor (in
   particular, not on the table where the card snaps to the grid).

 - Use better boundaries computed with respect to the center of the
   card (rather than its top left corner) for determining which grid
   cell a card should go to

 - Align behavior of the preview and the actual effect when overflow of
   the 3-card stacks occurs

 - Avoid visual glitches where the cursor ends up outside of the card or
   at incorrect offsets when moving the mouse too fast (which translates
   to overflows of the hot spot computation)

* Address review comments

 - Use simpler computation for restricting hotSpot range
 - Prevent dropping cards onto full 3-card slots
2024-01-01 16:51:36 -05:00
..
resources Rename "stack until found" feature (#4871) 2023-10-25 18:43:57 +02:00
sounds Add cmake format (#4618) 2022-05-08 21:22:43 +02:00
src Improve drag & drop behavior (#4963) 2024-01-01 16:51:36 -05:00
themes Add cmake format (#4618) 2022-05-08 21:22:43 +02:00
translations Updates for project Cockatrice and language de (#4942) 2023-11-18 12:10:11 +01:00
.qdevelop icon_draw and icon_untap added, icon_general and icon_messages modified 2009-07-31 13:37:16 +02:00
CMakeLists.txt Support WebP format for Card Images (#4950) 2023-12-09 00:52:14 -05:00
cockatrice.desktop Updated Spanish translation 2011-07-16 11:38:57 +02:00
cockatrice.qrc TOTD: Exchange Gitter for Discord, Fix date format (#4920) 2023-10-24 14:26:38 +02:00
cockatrice.rc Included uninstaller for Windows version 2010-09-17 15:26:07 +02:00
cockatrice_en@source.ts Update translation source strings (#4918) 2023-10-18 00:29:56 +02:00