pd-rs / crankstart

A barely functional, wildly incomplete and basically undocumented Rust crate whose aim is to let you write Games for the Playdate handheld gaming system in Rust.
MIT License
235 stars 24 forks source link

Access to system menu API #31

Closed tjkirch closed 10 months ago

tjkirch commented 1 year ago

It would be great to have access to the system menu API.

As a game gets more complex, it can be hard to represent the desired interactions with just the two face buttons on the Playdate. Also, some interactions are not directly related to the gameplay, but allow the user to take alternate paths, like going back to a title menu or changing game options quickly. The system menu API lets you add menu items, checkmark options, and options lists to the system menu.

There was an attempt to add this in https://github.com/pd-rs/crankstart/pull/16 but it was closed due to inactivity after questions were raised about the callback functions. There were two ideas for progression: "make menu items like sprites", or "design an API for Rust that doesn't require an immediate callback per item and keep all the references to menu items internal to Crankstart".