All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Modules Pages
Enumerations | Functions

Common tilt-flow menu API. More...


enum  Sifteo::MenuState


void Sifteo::Menu::anchor (uint8_t item, bool hopUp=false, int8_t panTarget=-1)
void Sifteo::Menu::init (VideoBuffer &, const MenuAssets *, MenuItem *)
 Initialize or reinitialize a Menu using the provided VideoBuffer, assets, and items.
 Sifteo::Menu::Menu (VideoBuffer &, const MenuAssets *, MenuItem *)
 Construct an initialized Menu, using the provided VideoBuffer, assets, and items.

Detailed Description

Common tilt-flow menu API.

Enumeration Type Documentation

Menu execution states: Start: animate in menu. -> Static. Static: steady state. -> Tilting, Finish. Tilting: cube is being tilted. -> Inertia. Inertia: menu is coasting. -> Tilting, Static. Finish: item selected, animate out menu. -> Start. Hop Up: inverse of Finish, item hops back into menu. -> Static

Function Documentation

void Sifteo::Menu::anchor ( uint8_t  item,
bool  hopUp = false,
int8_t  panTarget = -1 

Set the menu anchor.

The anchor item is the active item in the menu when the menu starts. If the menu has already started, calling this method affects the future invocations of the same menu since running the event pump after an item is pressed restarts the menu.