Exemplo n.º 1
0
static void init_action_menu() {
  // Create the root level and secondary custom patterns level
  s_root_level = action_menu_level_create(2);
  
  // Set up the actions for this level, using action context to pass types
  action_menu_level_add_action(s_root_level, "Enable/Disable", action_toggle_performed_callback,
                               NULL);
  action_menu_level_add_action(s_root_level, "Delete", action_reset_performed_callback,
                               NULL);
  
}
Exemplo n.º 2
0
static void init_action_menu() {
  // Create the root level
  s_root_level = action_menu_level_create(NUM_ITEMS);

#ifdef PBL_COLOR
  // Set up the actions for this level, using action context to pass colors
  action_menu_level_add_action(s_root_level, "Red", action_performed_callback, &GColorRed);
  action_menu_level_add_action(s_root_level, "Blue", action_performed_callback, &GColorBlue);
  action_menu_level_add_action(s_root_level, "Yellow", action_performed_callback, &GColorChromeYellow);
  action_menu_level_add_action(s_root_level, "Green", action_performed_callback, &GColorGreen);
  action_menu_level_add_action(s_root_level, "White", action_performed_callback, &GColorWhite);
#else
  // Set up the actions for this level, using action context to pass colors
  action_menu_level_add_action(s_root_level, "Black", action_performed_callback, &GColorBlack);
  action_menu_level_add_action(s_root_level, "White", action_performed_callback, &GColorWhite);
  action_menu_level_add_action(s_root_level, "Gray", action_performed_callback, &GColorLightGray);
#endif

  
}
Exemplo n.º 3
0
static void init_action_menu() {
  // Create the root level
  s_root_level = action_menu_level_create(27);

  // Set up the actions for this level, using action context to pass types
  action_menu_level_add_action(s_root_level, "Clear", action_performed_callback, 
                              (void *) clear);
  action_menu_level_add_action(s_root_level, "A", action_performed_callback, 
                              (void *) A);
  action_menu_level_add_action(s_root_level, "B", action_performed_callback, 
                              (void *) B);
  action_menu_level_add_action(s_root_level, "C", action_performed_callback, 
                              (void *) C);
  action_menu_level_add_action(s_root_level, "D", action_performed_callback, 
                              (void *) D);
  action_menu_level_add_action(s_root_level, "E", action_performed_callback, 
                              (void *) E);
  action_menu_level_add_action(s_root_level, "F", action_performed_callback, 
                              (void *) F);
  action_menu_level_add_action(s_root_level, "G", action_performed_callback, 
                              (void *) G);
  action_menu_level_add_action(s_root_level, "H", action_performed_callback, 
                              (void *) H);
  action_menu_level_add_action(s_root_level, "I", action_performed_callback, 
                              (void *) I);
  action_menu_level_add_action(s_root_level, "J", action_performed_callback, 
                              (void *) J);
  action_menu_level_add_action(s_root_level, "K", action_performed_callback, 
                              (void *) K);
  action_menu_level_add_action(s_root_level, "L", action_performed_callback, 
                              (void *) L);
  action_menu_level_add_action(s_root_level, "M", action_performed_callback, 
                              (void *) M);
  action_menu_level_add_action(s_root_level, "N", action_performed_callback, 
                              (void *) N);
  action_menu_level_add_action(s_root_level, "O", action_performed_callback, 
                              (void *) O);
  action_menu_level_add_action(s_root_level, "P", action_performed_callback, 
                              (void *) P);
  action_menu_level_add_action(s_root_level, "Q", action_performed_callback, 
                              (void *) Q);
  action_menu_level_add_action(s_root_level, "R", action_performed_callback, 
                              (void *) R);
  action_menu_level_add_action(s_root_level, "S", action_performed_callback, 
                              (void *) S);
  action_menu_level_add_action(s_root_level, "T", action_performed_callback, 
                              (void *) T);
  action_menu_level_add_action(s_root_level, "U", action_performed_callback, 
                              (void *) U);
  action_menu_level_add_action(s_root_level, "V", action_performed_callback, 
                              (void *) V);
  action_menu_level_add_action(s_root_level, "W", action_performed_callback, 
                              (void *) W);
  action_menu_level_add_action(s_root_level, "X", action_performed_callback, 
                              (void *) X);
  action_menu_level_add_action(s_root_level, "Y", action_performed_callback, 
                              (void *) Y);
  action_menu_level_add_action(s_root_level, "Z", action_performed_callback, 
                              (void *) Z);
}
Exemplo n.º 4
0
// Add a look action to the sub-menu.
static void add_look_action(ActionMenuLevel *look_level, const char *label, LookDirection dir) {
  LookActionData *data = (LookActionData *)malloc(sizeof(LookActionData));
  data->dir = dir;
  action_menu_level_add_action(look_level, label, look_action_callback, data);
}
Exemplo n.º 5
0
static void initActionMenu() {
  s_action_menu = action_menu_level_create(16);
  action_menu_level_add_action(s_action_menu, "Open", action_menu_callback, (void*)CmdOpen);
  action_menu_level_add_action(s_action_menu, "Close", action_menu_callback, (void*)CmdClose);
}