Esempio n. 1
0
static MenuData* create_options_menu_controls(MenuData *parent) {
	MenuData *m = create_options_menu_base("Controls");

	add_menu_entry(m, "Move up", do_nothing,
		bind_keybinding(CONFIG_KEY_UP)
	);

	add_menu_entry(m, "Move down", do_nothing,
		bind_keybinding(CONFIG_KEY_DOWN)
	);

	add_menu_entry(m, "Move left", do_nothing,
		bind_keybinding(CONFIG_KEY_LEFT)
	);

	add_menu_entry(m, "Move right", do_nothing,
		bind_keybinding(CONFIG_KEY_RIGHT)
	);

	add_menu_separator(m);

	add_menu_entry(m, "Shoot", do_nothing,
		bind_keybinding(CONFIG_KEY_SHOT)
	);

	add_menu_entry(m, "Focus", do_nothing,
		bind_keybinding(CONFIG_KEY_FOCUS)
	);

	add_menu_entry(m, "Use Spell Card", do_nothing,
		bind_keybinding(CONFIG_KEY_BOMB)
	);

	add_menu_entry(m, "Power Surge / Discharge", do_nothing,
		bind_keybinding(CONFIG_KEY_SPECIAL)
	);

	add_menu_separator(m);

	add_menu_entry(m, "Toggle fullscreen", do_nothing,
		bind_keybinding(CONFIG_KEY_FULLSCREEN)
	);

	add_menu_entry(m, "Take a screenshot", do_nothing,
		bind_keybinding(CONFIG_KEY_SCREENSHOT)
	);

	add_menu_entry(m, "Skip dialog", do_nothing,
		bind_keybinding(CONFIG_KEY_SKIP)
	);

	add_menu_separator(m);

	add_menu_entry(m, "Toggle audio", do_nothing,
		bind_keybinding(CONFIG_KEY_TOGGLE_AUDIO)
	);

	add_menu_separator(m);

	add_menu_entry(m, "Stop the game immediately", do_nothing,
		bind_keybinding(CONFIG_KEY_STOP)
	);

	add_menu_entry(m, "Restart the game immediately", do_nothing,
		bind_keybinding(CONFIG_KEY_RESTART)
	);

#ifdef DEBUG
	add_menu_separator(m);

	add_menu_entry(m, "Toggle God mode", do_nothing,
		bind_keybinding(CONFIG_KEY_IDDQD)
	);

	add_menu_entry(m, "Skip stage", do_nothing,
		bind_keybinding(CONFIG_KEY_HAHAIWIN)
	);

	add_menu_entry(m, "Power up", do_nothing,
		bind_keybinding(CONFIG_KEY_POWERUP)
	);

	add_menu_entry(m, "Power down", do_nothing,
		bind_keybinding(CONFIG_KEY_POWERDOWN)
	);

	add_menu_entry(m, "Disable background rendering (HoM effect)", do_nothing,
		bind_keybinding(CONFIG_KEY_NOBACKGROUND)
	);

	add_menu_entry(m, "Toggle collision areas overlay", do_nothing,
		bind_keybinding(CONFIG_KEY_HITAREAS)
	);
#endif

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

	return m;
}
Esempio n. 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);
}