click to drag, release to put card down

This commit is contained in:
~d6 2024-07-28 11:23:07 -04:00
parent 6b5fb40165
commit 68d8fc725d
3 changed files with 10 additions and 7 deletions

View File

@ -7,7 +7,7 @@
## controls
- Use the mouse to move the pointer
- Click to pick up cards; click again to drop them
- Click to pick up cards; release to drop them
- Press *Esc* to restart the game
- Press *Return* to print internal game state
@ -46,8 +46,10 @@ $ uxnemu kodiak.rom
**Is dragging cards buggy?**
You don't need to hold down the mouse button when dragging a card.
Just click once to pick up and click again to release.
Previous versions of the game had you click once to pick up a card and
pick up again to release. This doesn't work very well with touch
screens so it was changed to a more normal click to hold, release to
drop.
**Is this harder than other solitaire games?**

Binary file not shown.

View File

@ -271,7 +271,7 @@
@on-mouse ( -> brk )
on-move
on-click-down
( on-click-up )
on-click-up
.Mouse/state DEI .prev/mouse-state STZ
BRK
@ -336,7 +336,6 @@
.Mouse/state DEI ( state^ )
.prev/mouse-state LDZ #ff EOR AND ( down^ )
#01 AND ?&ok JMP2r &ok
.dragging LDZ ?release
maybe-select-stock ?&skip
maybe-select-waste ?&found
maybe-select-tableau ?&found
@ -555,10 +554,12 @@
POP2 POP POP2r #00 JMP2r ( 0^ )
( @on-click-up ( -> )
@on-click-up ( -> )
.Mouse/state DEI #ff EOR ( not-state^ )
.prev/mouse-state LDZ AND ( up^ )
#01 AND ?{ JMP2r } JMP2r ( TODO: anything to do here? ) )
#01 AND ?&ok JMP2r &ok
.dragging LDZ ?release
JMP2r
@on-key ( -> brk )
on-press on-release