Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
dev_menu
In-game developer menu for Piston and gfx-rs
Usage
A Menu
instance can be intitialized to operate on some particular type, for example a "Settings" struct:
...
let mut menu = Menu new;
Menu items display in a vertical list, and the selection can be changed with the up and down arrow keys.
Items can be added to the menu with add_item
. An ActionItem
, when selected, executes a given closure when the spacebar or left or right arrow keys are hit. For example, it can be used to toggle a boolean setting as follows:
menu.add_item;
A SliderItem
, when selected, can be used to increment or decrement a particular value while the right or left arrow keys are held down, using a pair of accessor closures to get or set the value within the settings object. It will also display the current value to the right of the label. For example:
menu.add_item;
To update and render the menu, using the Piston event loop:
for e in window.events