Beispiel #1
0
MenuData* create_options_menu(void) {
	MenuData *m = create_options_menu_base("Options");
	OptionBinding *b;

	add_menu_entry(m, "Player name", do_nothing,
		b = bind_stroption(CONFIG_PLAYERNAME)
	);

	add_menu_separator(m);

	add_menu_entry(m, "Save replays", do_nothing,
		b = bind_option(CONFIG_SAVE_RPY, bind_common_onoffplus_get, bind_common_onoffplus_set)
	);	bind_addvalue(b, "always");
		bind_addvalue(b, "never");
		bind_addvalue(b, "ask");

	add_menu_entry(m, "Auto-restart in Spell Practice", do_nothing,
		b = bind_option(CONFIG_SPELLSTAGE_AUTORESTART,  bind_common_onoff_get, bind_common_onoff_set)
	);	bind_onoff(b);

	add_menu_entry(m, "Power in Spell and Stage Practice", do_nothing,
		b = bind_option(CONFIG_PRACTICE_POWER, bind_power_get, bind_power_set)
	);	bind_addvalue(b, "0.0");
		bind_addvalue(b, "1.0");
		bind_addvalue(b, "2.0");
		bind_addvalue(b, "3.0");
		bind_addvalue(b, "4.0");

	add_menu_entry(m, "Shoot by default", do_nothing,
		b = bind_option(CONFIG_SHOT_INVERTED,   bind_common_onoff_get, bind_common_onoff_set)
	);	bind_onoff(b);

	add_menu_entry(m, "Boss healthbar style", do_nothing,
		b = bind_option(CONFIG_HEALTHBAR_STYLE,   bind_common_int_get, bind_common_int_set)
	);	bind_addvalue(b, "classic");
		bind_addvalue(b, "modern");

	add_menu_entry(m, "Floating score text visibility", do_nothing,
		b = bind_scale(CONFIG_SCORETEXT_ALPHA, 0, 1, 0.05)
	);

	add_menu_separator(m);

	add_menu_entry(m, "SFX Volume", do_nothing,
		b = bind_scale(CONFIG_SFX_VOLUME, 0, 1, 0.05)
	);	b->dependence = audio_output_works;

	add_menu_entry(m, "BGM Volume", do_nothing,
		b = bind_scale(CONFIG_BGM_VOLUME, 0, 1, 0.05)
	);	b->dependence = audio_output_works;

	add_menu_entry(m, "Mute audio", do_nothing,
		b = bind_option(CONFIG_MUTE_AUDIO,  bind_common_onoff_get, bind_common_onoff_set)
	);	bind_onoff(b);

	add_menu_separator(m);
	add_menu_entry(m, "Video options…", enter_options_menu_video, NULL);
	add_menu_entry(m, "Customize controls…", enter_options_menu_controls, NULL);
	add_menu_entry(m, "Gamepad & Joystick options…", enter_options_menu_gamepad, NULL);
	add_menu_separator(m);

	add_menu_entry(m, "Back", menu_action_close, NULL);

	return m;
}
Beispiel #2
0
void create_options_menu(MenuData *m) {
	OptionBinding *b;
	
	create_menu(m);
	m->type = MT_Transient;
	m->ondestroy = destroy_options_menu;
	m->context = NULL;
	
	#define bind_onoff(b) bind_addvalue(b, "on"); bind_addvalue(b, "off")
	
	add_menu_entry(m, "Player Name", do_nothing, NULL);
		b = bind_stroption(m, "playername", PLAYERNAME);
		
	add_menu_separator(m);
		allocate_binding(m);
	
	add_menu_entry(m, "Video Mode", do_nothing, NULL);
		b = bind_resolution(m);
	
	add_menu_entry(m, "Fullscreen", do_nothing, NULL);
		b = bind_option(m, "fullscreen", FULLSCREEN, bind_common_onoffget, bind_fullscreen_set);
			bind_onoff(b);
			
	add_menu_entry(m, "Audio", do_nothing, NULL);
		b = bind_option(m, "disable_audio", NO_AUDIO, bind_common_onoffget_inverted,
													  bind_noaudio_set);
			bind_onoff(b);
		
	add_menu_entry(m, "Shaders", do_nothing, NULL);
		b = bind_option(m, "disable_shader", NO_SHADER, bind_common_onoffget_inverted,
														bind_noshader_set);
			bind_onoff(b);
			
	add_menu_entry(m, "Stage Background", do_nothing, NULL);
		b = bind_option(m, "disable_stagebg", NO_STAGEBG, bind_common_intget,
														  bind_common_intset);
			bind_addvalue(b, "on");
			bind_addvalue(b, "off");
			bind_addvalue(b, "auto");
	
	add_menu_entry(m, "Minimum FPS", do_nothing, NULL);
		b = bind_option(m, "disable_stagebg_auto_fpslimit", NO_STAGEBG_FPSLIMIT, bind_common_intget,
																				 bind_common_intset);
			bind_setvaluerange(b, 20, 60);
			bind_setdependence(b, bind_stagebg_fpslimit_dependence);
	
	add_menu_entry(m, "Save Replays", do_nothing, NULL);
		b = bind_option(m, "save_rpy", SAVE_RPY, bind_saverpy_get,
												 bind_saverpy_set);
			bind_addvalue(b, "on");
			bind_addvalue(b, "off");
			bind_addvalue(b, "ask");
	
	add_menu_separator(m);
		allocate_binding(m);
	
	add_menu_entry(m, "Move up", do_nothing, NULL);
		bind_keybinding(m, "key_up", KEY_UP);
	
	add_menu_entry(m, "Move down", do_nothing, NULL);
		bind_keybinding(m, "key_down", KEY_DOWN);
		
	add_menu_entry(m, "Move left", do_nothing, NULL);
		bind_keybinding(m, "key_left", KEY_LEFT);
		
	add_menu_entry(m, "Move right", do_nothing, NULL);
		bind_keybinding(m, "key_right", KEY_RIGHT);
	
	add_menu_separator(m);
		allocate_binding(m);
	
	add_menu_entry(m, "Fire", do_nothing, NULL);
		bind_keybinding(m, "key_shot", KEY_SHOT);
		
	add_menu_entry(m, "Focus", do_nothing, NULL);
		bind_keybinding(m, "key_focus", KEY_FOCUS);
	
	add_menu_entry(m, "Bomb", do_nothing, NULL);
		bind_keybinding(m, "key_bomb", KEY_BOMB);
		
	add_menu_separator(m);
		allocate_binding(m);
	
	add_menu_entry(m, "Toggle fullscreen", do_nothing, NULL);
		bind_keybinding(m, "key_fullscreen", KEY_FULLSCREEN);
		
	add_menu_entry(m, "Take a screenshot", do_nothing, NULL);
		bind_keybinding(m, "key_screenshot", KEY_SCREENSHOT);
	
	add_menu_entry(m, "Skip dialog", do_nothing, NULL);
		bind_keybinding(m, "key_skip", KEY_SKIP);
	
	add_menu_separator(m);
		allocate_binding(m);
		
	add_menu_entry(m, "Return to the main menu", backtomain, m);
		allocate_binding(m);
}