Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PICO-8 Standalone - Mouse/Menu key Improvements and fixes in SDL2 lib #1535

Merged
merged 4 commits into from
May 9, 2024

Conversation

XK9274
Copy link
Member

@XK9274 XK9274 commented Apr 1, 2024

Mouse can be tested in this cart (which is also available through splore):
https://www.lexaloffle.com/bbs/?tid=3467

  • Fixes menu button handling so it doesn't exit on "PRESSED" event (fixes being unable to screenshot, change brightness etc) (may take 2 presses)
  • Fixes mouse bounds from previous regression in PICO8 Wrapper improvements #1425
  • Adds option flags to onioncfg.json to:
    • Hide the mouse icon
    • Set custom mouse bounds in the config (mostly for testing purposes)
    • Remove the mouse hotkey altogether so it can be rebound to something else

These values will default to:

#define MMIYOO_DEFAULT_MOUSE_HOTKEY         0
#define MMIYOO_DEFAULT_MOUSE_ICON           0
#define MMIYOO_DEFAULT_MOUSE_MINX           40
#define MMIYOO_DEFAULT_MOUSE_MINY           0
#define MMIYOO_DEFAULT_MOUSE_MAXX           280
#define MMIYOO_DEFAULT_MOUSE_MAXY           236

If they do not exist in the json config file.

Which should look like:

  "mouse":{
    "scaleFactor":1,
    "acceleration":4.0,
    "accelerationRate":1.5,
    "maxAcceleration":4.0,
    "incrementModifier":1.0,
    "disableMouseHotkey":0,
    "disableMouseIcon":1,
    "minx":40,
    "miny":0,
    "maxx":280,
    "maxy":236
  },

When:

    "disableMouseHotkey":1,

Is set, L2 can be rebound to a different key with:

  "customkeys":{
    "A":"Z",
    "B":"X",
    "X":"ESCAPE",
    "Y":"D",
    "L1":"D",
    "L2":"D", <<<<<<<<<<
    "R1":"D",
    "R2":"D",
    "LeftDpad":"LEFT",
    "RightDpad":"RIGHT",
    "UpDpad":"UP",
    "DownDpad":"DOWN",
    "Start":"RETURN",
    "Select":"D",
    "Menu":"D"
  },

@XK9274 XK9274 changed the title Mouse/Menu key Improvements and fixes for Pico-8 SDL2 lib PICO-8 Standalone - Mouse/Menu key Improvements and fixes in SDL2 lib Apr 1, 2024
@XK9274 XK9274 linked an issue Apr 1, 2024 that may be closed by this pull request
3 tasks
@XK9274 XK9274 requested a review from schmurtzm April 9, 2024 20:53
@XK9274 XK9274 self-assigned this Apr 17, 2024
@XK9274 XK9274 added the bug in onion Something isn't working label Apr 17, 2024
@XK9274 XK9274 added this to the v4.4 milestone Apr 17, 2024
@Aemiii91 Aemiii91 added this pull request to the merge queue May 9, 2024
Merged via the queue into main with commit dfc7375 May 9, 2024
1 check passed
@Aemiii91 Aemiii91 deleted the pico-8_improvements branch May 9, 2024 20:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug in onion Something isn't working
Projects
Status: Done / Ready for release
Development

Successfully merging this pull request may close these issues.

Mouse doesn't go all the way left on Pico-8 Standalone
2 participants