While enabling mouse input:
POKE(0x5F2D, flags) -- where flags are:
0x1 Enable
0x2 Mouse buttons trigger btn(4)..btn(6)
STAT(34) -- Mouse buttons (bitfield) with
0x1: Left
0x2: Right
0x4: middle
poke(0x5f2d, 3) function _update() if (stat(34)==1) print("l") if (stat(34)==2) print("r") if (stat(34)==4) print("m") if (btn(4)) print(4) if (btn(5)) print(5) if (btn(6)) print(6) if (btn(🅾️)) print('🅾️') if (btn(❎)) print('❎') end |
Left mouse button (1) triggers button 5 (❎)
Right mouse button (2) triggers button 4 (🅾️)
Shouldn't this be the other way round?
I tried your program, @ultrabrite. I was reading the documentation regarding 0x5f2d
it does not state exactly in what order they go.
https://www.lexaloffle.com/dl/docs/pico-8_manual.html#Mouse_and_Keyboard_Input
0x2 Mouse buttons trigger btn(4)..btn(6)
I think it would be preferred to be the way you are saying as at least in Blitz 0 is left button and 1 is right button.
So it would stand to reason that 🅾️ #4 is left and ❎ #5 is right instead of the opposite as it is now.
Hmm ... I would add to this that the middle mouse button should always bring up the menu if not configured otherwise and using the roller could allow the selector to go up and down in the menu options.
This click and roller and mouse buttons would carry over to SPLORE as well using as ultrabrite suggests, left button to press 🅾️ and in this case right button to press ESC. Rolling to select ⬆️ and ⬇️. Clicking the middle button again would press P for additional menu options for this particular cart. Clicking the middle again would be like pressing ESC.
Basically, allow full SPLORE capability on the tab it is on via the mouse which at this time - any mouse clicks and roller are currently ignored.
[Please log in to post a comment]