Update start screen, and add Help ... entry.

This commit is contained in:
Themaister 2013-10-05 11:05:28 +02:00
parent 1ff48fcd38
commit 2d0131ddab
3 changed files with 57 additions and 16 deletions

View File

@ -88,6 +88,10 @@ int menu_set_settings(unsigned setting, unsigned action)
switch (setting)
{
case RGUI_START_SCREEN:
if (action == RGUI_ACTION_OK)
rgui_list_push(rgui->menu_stack, "", RGUI_START_SCREEN, 0);
break;
case RGUI_SETTINGS_REWIND_ENABLE:
if (action == RGUI_ACTION_OK ||
action == RGUI_ACTION_LEFT ||

View File

@ -277,6 +277,7 @@ static void rgui_settings_populate_entries(rgui_handle_t *rgui)
#endif
rgui_list_push(rgui->selection_buf, "RetroArch Config", RGUI_SETTINGS_CONFIG, 0);
rgui_list_push(rgui->selection_buf, "Save New Config", RGUI_SETTINGS_SAVE_CONFIG, 0);
rgui_list_push(rgui->selection_buf, "Help", RGUI_START_SCREEN, 0);
rgui_list_push(rgui->selection_buf, "Quit RetroArch", RGUI_SETTINGS_QUIT_RARCH, 0);
}
@ -549,26 +550,61 @@ static int rgui_custom_bind_iterate(rgui_handle_t *rgui, rgui_action_t action)
static int rgui_start_screen_iterate(rgui_handle_t *rgui, rgui_action_t action)
{
render_text(rgui);
render_messagebox(rgui,
"-- Welcome to RetroArch --\n"
char msg[1024];
char desc[6][64];
static const unsigned binds[] = {
RETRO_DEVICE_ID_JOYPAD_UP,
RETRO_DEVICE_ID_JOYPAD_DOWN,
RETRO_DEVICE_ID_JOYPAD_A,
RETRO_DEVICE_ID_JOYPAD_B,
RARCH_MENU_TOGGLE,
RARCH_QUIT_KEY,
};
for (unsigned i = 0; i < ARRAY_SIZE(binds); i++)
{
if (driver.input && driver.input->set_keybinds)
{
struct platform_bind key_label;
strlcpy(key_label.desc, "Unknown", sizeof(key_label.desc));
key_label.joykey = g_settings.input.binds[0][binds[i]].joykey;
driver.input->set_keybinds(&key_label, 0, 0, 0, 1ULL << KEYBINDS_ACTION_GET_BIND_LABEL);
strlcpy(desc[i], key_label.desc, sizeof(desc[i]));
}
else
{
const struct retro_keybind *bind = &g_settings.input.binds[0][binds[i]];
input_get_bind_string(desc[i], bind, sizeof(desc[i]));
}
}
snprintf(msg, sizeof(msg),
"-- Welcome to RetroArch / RGUI --\n"
" \n" // strtok_r doesn't split empty strings.
#if !defined(RARCH_CONSOLE) && !defined(RARCH_MOBILE)
"Default keyboard controls: \n"
" Arrow keys: Navigate \n"
" X: Accept/OK \n"
" Z: Back \n"
" F1: Enter/Exit RGUI \n"
" ESC: Exit RetroArch \n"
" \n"
#endif
"To play a game: \n"
" Load a libretro core (Core).\n"
" Load a ROM (Load Game). \n"
"Basic RGUI controls:\n"
" Scroll (Up): %-20s\n"
" Scroll (Down): %-20s\n"
" Accept/OK: %-20s\n"
" Back: %-20s\n"
"Enter/Exit RGUI: %-20s\n"
" Exit RetroArch: %-20s\n"
" \n"
"Press Accept/OK to continue.");
"To play a game:\n"
"Load a libretro core (Core).\n"
"Load a ROM (Load Game). \n"
" \n"
"See Path Options to set directories\n"
"for faster access to files.\n"
" \n"
"Press Accept/OK to continue.",
desc[0], desc[1], desc[2], desc[3], desc[4], desc[5]);
render_messagebox(rgui, msg);
if (action == RGUI_ACTION_OK)
rgui_list_pop(rgui->menu_stack, &rgui->selection_ptr);

View File

@ -569,6 +569,7 @@ static void render_text(rgui_handle_t *rgui)
case RGUI_SETTINGS_OPTIONS:
case RGUI_SETTINGS_CUSTOM_BIND_ALL:
case RGUI_SETTINGS_CUSTOM_BIND_DEFAULT_ALL:
case RGUI_START_SCREEN:
strlcpy(type_str, "...", sizeof(type_str));
break;
#ifdef HAVE_OVERLAY