void sound_gui() { // SDL_Event ev; u32 keys; int action; set_yesno_string(quiet_data, quiet); set_dsp_string(); set_sq_string(); exit_sound = 0; while( !exit_sound ) { status_timer = 0; sprintf(msg, "Sound Options"); draw_gui(sound_gui_items, sound_current); // SDL_WaitEvent(&ev); /* TODO: respond to SDL_QUIT events */ hidScanInput(); while(!hidKeysHeld()) hidScanInput(); keys = hidKeysHeld(); action = gui_navigation(keys); //&ev); if(action == GUI_NO_ACTION) continue; sound_current = gui_handle_action(action, &exit_sound, sound_gui_items, sound_current); } }
void interface_gui() { SDL_Event ev; int action; set_yesno_string(enable_keyboard_data, KeyboardEnabled); set_yesno_string(enable_mouse_data, MouseEnabled); set_yesno_string(enable_joystick_data, UserJoystickEnabled); set_yesno_string(enable_stelladaptor_data, StelladaptorEnabled); set_yesno_string(show_fps_data, ShowLineCount); set_yesno_string(mouse_rude_data, MouseRude); set_yesno_string(grab_input_data, GrabInput); set_theme_string(); exit_interface = 0; while( !exit_interface ) { status_timer = 0; sprintf(msg, "Interface Options"); draw_gui(interface_gui_items, interface_current); SDL_WaitEvent(&ev); /* TODO: respond to SDL_QUIT events */ action = gui_navigation(&ev); if(action == GUI_NO_ACTION) continue; interface_current = gui_handle_action(action, &exit_interface, interface_gui_items, interface_current); } }
void hand_quiet() { quiet = !quiet; set_yesno_string(quiet_data, quiet); }
void hand_show_fps() { ShowLineCount = !ShowLineCount; set_yesno_string(show_fps_data, ShowLineCount); }
void hand_grab_input() { GrabInput = !GrabInput; set_yesno_string(grab_input_data, GrabInput); }
void hand_mouse_rude() { MouseRude = !MouseRude; set_yesno_string(mouse_rude_data, MouseRude); }
void hand_enable_stelladaptor() { StelladaptorEnabled = !StelladaptorEnabled; set_yesno_string(enable_stelladaptor_data, StelladaptorEnabled); }
void hand_enable_joystick() { UserJoystickEnabled = !UserJoystickEnabled; set_yesno_string(enable_joystick_data, UserJoystickEnabled); JoystickEnabled = UserJoystickEnabled; gui_SetVideoMode(); /* because joystick detection happens when we set video mode */ }
void hand_enable_mouse() { MouseEnabled = !MouseEnabled; set_yesno_string(enable_mouse_data, MouseEnabled); }
void hand_enable_keyboard() { KeyboardEnabled = !KeyboardEnabled; set_yesno_string(enable_keyboard_data, KeyboardEnabled); }