pub trait SystemMenu<Api: Api + Copy> {
// Required methods
fn remove_all_menu_items(&self);
fn set_menu_image(&self, bitmap: impl AnyBitmap, x_offset: c_int);
}Required Methods§
Removes all custom menu items from the system menu.
Equivalent to sys::ffi::playdate_sys::removeAllMenuItems
A game can optionally provide an image to be displayed alongside the system menu. bitmap must be a 400x240 LCDBitmap. All important content should be in the left half of the image in an area 200 pixels wide, as the menu will obscure the rest. The right side of the image will be visible briefly as the menu animates in and out.
Optionally, a non-zero xoffset, can be provided. This must be a number between 0 and 200 and will cause the menu image to animate to a position offset left by xoffset pixels as the menu is animated in.
This function could be called in response to the kEventPause event in your implementation
of event_handler().
Equivalent to sys::ffi::playdate_sys::setMenuImage
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.