Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines
(+4)

Thanks for sharing- this looks fantastic!

If you'd like to override the default behavior of the arrow keys, you can define a deck-level (or card-level) replacement for the "navigate[]" event handler. The default handler looks like:

on navigate x do
 if x~"right" go["Next"] end
 if x~"left"  go["Prev"] end
end

Replacing it with an empty handler will make the arrow keys do nothing while in Interact mode:

on navigate do
end

In your case, you've already set up buttons all over your deck with WASD shortcuts, so we could also write a deck-level replacement navigate[] handler which searches for and "clicks" those buttons appropriately in response to cursor keys. On touch devices this should also allow you to navigate by using swipe gestures!

on navigate x do
 s:(("left","right","up","down") dict "adws")[x]
 w:first extract value where value..shortcut=s from deck.card.widgets
 w.event["click"]
end

How's that? There's a bit more detail on navigate[] and other events in the reference manual

(+1)

that's very helpful, thank you!!