From abefb308b6e816a205a56f34ca7394996703ad93 Mon Sep 17 00:00:00 2001 From: sonninnos <45124675+sonninnos@users.noreply.github.com> Date: Thu, 16 Nov 2023 19:41:03 +0200 Subject: [PATCH] (GLUI) Icon corrections (#15914) --- intl/msg_hash_us.h | 14 +++---- menu/drivers/materialui.c | 83 ++++++++++++++++++++++----------------- menu/menu_displaylist.c | 16 ++++---- 3 files changed, 62 insertions(+), 51 deletions(-) diff --git a/intl/msg_hash_us.h b/intl/msg_hash_us.h index 07cddf6b20d0..3ee86773e291 100644 --- a/intl/msg_hash_us.h +++ b/intl/msg_hash_us.h @@ -9364,7 +9364,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_SHADER_PRESET, - "Load" + "Load Preset" ) MSG_HASH( MENU_ENUM_SUBLABEL_VIDEO_SHADER_PRESET, @@ -9376,23 +9376,23 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_SHADER_PRESET_PREPEND, - "Prepend" + "Prepend Preset" ) MSG_HASH( MENU_ENUM_SUBLABEL_VIDEO_SHADER_PRESET_PREPEND, - "Prepend Preset to currently loaded" + "Prepend preset to the currently loaded preset." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_SHADER_PRESET_APPEND, - "Append" + "Append Preset" ) MSG_HASH( MENU_ENUM_SUBLABEL_VIDEO_SHADER_PRESET_APPEND, - "Append Preset to currently loaded" + "Append preset to the currently loaded preset." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_SHADER_PRESET_SAVE, - "Save" + "Save Preset" ) MSG_HASH( MENU_ENUM_SUBLABEL_VIDEO_SHADER_PRESET_SAVE, @@ -9400,7 +9400,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_SHADER_PRESET_REMOVE, - "Remove" + "Remove Preset" ) MSG_HASH( MENU_ENUM_SUBLABEL_VIDEO_SHADER_PRESET_REMOVE, diff --git a/menu/drivers/materialui.c b/menu/drivers/materialui.c index f877fa68754d..cc3694dccbbc 100644 --- a/menu/drivers/materialui.c +++ b/menu/drivers/materialui.c @@ -2106,10 +2106,18 @@ static const char *materialui_texture_path(unsigned id) return "remove.png"; case MUI_TEXTURE_START_CORE: return "start_core.png"; + case MUI_TEXTURE_STATE_SLOT: + return "state_slot.png"; case MUI_TEXTURE_LOAD_STATE: return "load_state.png"; case MUI_TEXTURE_SAVE_STATE: return "save_state.png"; + case MUI_TEXTURE_UNDO_LOAD_STATE: + return "undo_load_state.png"; + case MUI_TEXTURE_UNDO_SAVE_STATE: + return "undo_save_state.png"; + case MUI_TEXTURE_REPLAY_SLOT: + return "state_slot.png"; case MUI_TEXTURE_PLAY_REPLAY: return "load_state.png"; case MUI_TEXTURE_RECORD_REPLAY: @@ -2122,12 +2130,6 @@ static const char *materialui_texture_path(unsigned id) return "eject.png"; case MUI_TEXTURE_CHECKMARK: return "menu_check.png"; - case MUI_TEXTURE_UNDO_LOAD_STATE: - return "undo_load_state.png"; - case MUI_TEXTURE_UNDO_SAVE_STATE: - return "undo_save_state.png"; - case MUI_TEXTURE_STATE_SLOT: - return "state_slot.png"; case MUI_TEXTURE_TAKE_SCREENSHOT: return "take_screenshot.png"; case MUI_TEXTURE_CONFIGURATIONS: @@ -10595,7 +10597,10 @@ static void materialui_list_insert( node->icon_texture_index = MUI_TEXTURE_RESUME; node->icon_type = MUI_ICON_TYPE_INTERNAL; } - else if (string_is_equal(label, msg_hash_to_str(MENU_ENUM_LABEL_CLOSE_CONTENT))) + else if (string_is_equal(label, msg_hash_to_str(MENU_ENUM_LABEL_CLOSE_CONTENT)) + || string_is_equal(label, msg_hash_to_str(MENU_ENUM_LABEL_QUICK_MENU_STOP_RECORDING)) + || string_is_equal(label, msg_hash_to_str(MENU_ENUM_LABEL_QUICK_MENU_STOP_STREAMING)) + ) { node->icon_texture_index = MUI_TEXTURE_CLOSE; node->icon_type = MUI_ICON_TYPE_INTERNAL; @@ -10617,12 +10622,15 @@ static void materialui_list_insert( node->icon_type = MUI_ICON_TYPE_INTERNAL; } else if ( string_is_equal(label, msg_hash_to_str(MENU_ENUM_LABEL_CORE_LIST)) - || string_is_equal(label, msg_hash_to_str(MENU_ENUM_LABEL_CORE_INFORMATION))) + || string_is_equal(label, msg_hash_to_str(MENU_ENUM_LABEL_CORE_INFORMATION)) + || string_is_equal(label, msg_hash_to_str(MENU_ENUM_LABEL_CONTENT_INFO_CORE_NAME))) { node->icon_texture_index = MUI_TEXTURE_CORES; node->icon_type = MUI_ICON_TYPE_INTERNAL; } - else if (string_is_equal(label, msg_hash_to_str(MENU_ENUM_LABEL_RUN))) + else if (string_is_equal(label, msg_hash_to_str(MENU_ENUM_LABEL_RUN)) + || string_is_equal(label, msg_hash_to_str(MENU_ENUM_LABEL_CHEAT_START_OR_CONT)) + ) { node->icon_texture_index = MUI_TEXTURE_RUN; node->icon_type = MUI_ICON_TYPE_INTERNAL; @@ -10641,6 +10649,7 @@ static void materialui_list_insert( || string_is_equal(label, msg_hash_to_str(MENU_ENUM_LABEL_PLAYLIST_MANAGER_RESET_CORES)) || string_is_equal(label, msg_hash_to_str(MENU_ENUM_LABEL_PLAYLIST_MANAGER_CLEAN_PLAYLIST)) || string_is_equal(label, msg_hash_to_str(MENU_ENUM_LABEL_SHADER_APPLY_CHANGES)) + || string_is_equal(label, msg_hash_to_str(MENU_ENUM_LABEL_CHEAT_APPLY_CHANGES)) ) { node->icon_texture_index = MUI_TEXTURE_RENAME; @@ -10665,13 +10674,6 @@ static void materialui_list_insert( node->icon_texture_index = MUI_TEXTURE_START_CORE; node->icon_type = MUI_ICON_TYPE_INTERNAL; } - else if ( string_is_equal(label, msg_hash_to_str(MENU_ENUM_LABEL_LOAD_STATE)) - || string_is_equal(label, msg_hash_to_str(MENU_ENUM_LABEL_OVERRIDE_FILE_LOAD)) - || string_is_equal(label, msg_hash_to_str(MENU_ENUM_LABEL_SWITCH_INSTALLED_CORES_PFD))) - { - node->icon_texture_index = MUI_TEXTURE_LOAD_STATE; - node->icon_type = MUI_ICON_TYPE_INTERNAL; - } else if (string_is_equal(label, msg_hash_to_str(MENU_ENUM_LABEL_PLAY_REPLAY))) { node->icon_texture_index = MUI_TEXTURE_PLAY_REPLAY; @@ -10710,10 +10712,22 @@ static void materialui_list_insert( node->icon_texture_index = MUI_TEXTURE_DISK; node->icon_type = MUI_ICON_TYPE_INTERNAL; } + else if ( string_is_equal(label, msg_hash_to_str(MENU_ENUM_LABEL_LOAD_STATE)) + || string_is_equal(label, msg_hash_to_str(MENU_ENUM_LABEL_OVERRIDE_FILE_LOAD)) + || string_is_equal(label, msg_hash_to_str(MENU_ENUM_LABEL_CHEAT_FILE_LOAD)) + || string_is_equal(label, msg_hash_to_str(MENU_ENUM_LABEL_CHEAT_FILE_LOAD_APPEND)) + || string_is_equal(label, msg_hash_to_str(MENU_ENUM_LABEL_VIDEO_SHADER_PRESET)) + || string_is_equal(label, msg_hash_to_str(MENU_ENUM_LABEL_SWITCH_INSTALLED_CORES_PFD))) + { + node->icon_texture_index = MUI_TEXTURE_LOAD_STATE; + node->icon_type = MUI_ICON_TYPE_INTERNAL; + } else if ( string_is_equal(label, msg_hash_to_str(MENU_ENUM_LABEL_SAVESTATE_LIST)) || string_is_equal(label, msg_hash_to_str(MENU_ENUM_LABEL_SAVE_STATE)) || string_is_equal(label, msg_hash_to_str(MENU_ENUM_LABEL_OVERRIDE_FILE_SAVE_AS)) + || string_is_equal(label, msg_hash_to_str(MENU_ENUM_LABEL_CHEAT_FILE_SAVE_AS)) + || string_is_equal(label, msg_hash_to_str(MENU_ENUM_LABEL_VIDEO_SHADER_PRESET_SAVE)) || string_is_equal(label, msg_hash_to_str(MENU_ENUM_LABEL_SAVE_CURRENT_CONFIG_OVERRIDE_CORE)) || string_is_equal(label, msg_hash_to_str(MENU_ENUM_LABEL_SAVE_CURRENT_CONFIG_OVERRIDE_CONTENT_DIR)) || string_is_equal(label, msg_hash_to_str(MENU_ENUM_LABEL_SAVE_CURRENT_CONFIG_OVERRIDE_GAME)) @@ -10732,6 +10746,7 @@ static void materialui_list_insert( else if ( string_is_equal(label, msg_hash_to_str(MENU_ENUM_LABEL_UNDO_SAVE_STATE)) || string_is_equal(label, msg_hash_to_str(MENU_ENUM_LABEL_OVERRIDE_UNLOAD)) + || string_is_equal(label, msg_hash_to_str(MENU_ENUM_LABEL_CHEAT_RELOAD_CHEATS)) ) { node->icon_texture_index = MUI_TEXTURE_UNDO_SAVE_STATE; @@ -10779,6 +10794,8 @@ static void materialui_list_insert( || string_is_equal(label, msg_hash_to_str(MENU_ENUM_LABEL_REMOVE_CURRENT_CONFIG_OVERRIDE_CONTENT_DIR)) || string_is_equal(label, msg_hash_to_str(MENU_ENUM_LABEL_REMOVE_CURRENT_CONFIG_OVERRIDE_GAME)) || string_is_equal(label, msg_hash_to_str(MENU_ENUM_LABEL_VIDEO_SHADER_PRESET_REMOVE)) + || string_is_equal(label, msg_hash_to_str(MENU_ENUM_LABEL_CHEAT_DELETE)) + || string_is_equal(label, msg_hash_to_str(MENU_ENUM_LABEL_CHEAT_DELETE_ALL)) ) { node->icon_texture_index = MUI_TEXTURE_REMOVE; @@ -10820,6 +10837,14 @@ static void materialui_list_insert( || string_is_equal(label, msg_hash_to_str(MENU_ENUM_LABEL_SCAN_FILE)) || string_is_equal(label, msg_hash_to_str(MENU_ENUM_LABEL_MANUAL_CONTENT_SCAN_LIST)) || string_is_equal(label, msg_hash_to_str(MENU_ENUM_LABEL_ADD_CONTENT_LIST)) + || string_is_equal(label, msg_hash_to_str(MENU_ENUM_LABEL_CHEAT_ADD_NEW_TOP)) + || string_is_equal(label, msg_hash_to_str(MENU_ENUM_LABEL_CHEAT_ADD_NEW_BOTTOM)) + || string_is_equal(label, msg_hash_to_str(MENU_ENUM_LABEL_CHEAT_ADD_NEW_AFTER)) + || string_is_equal(label, msg_hash_to_str(MENU_ENUM_LABEL_CHEAT_ADD_NEW_BEFORE)) + || string_is_equal(label, msg_hash_to_str(MENU_ENUM_LABEL_CHEAT_COPY_AFTER)) + || string_is_equal(label, msg_hash_to_str(MENU_ENUM_LABEL_CHEAT_COPY_BEFORE)) + || string_is_equal(label, msg_hash_to_str(MENU_ENUM_LABEL_VIDEO_SHADER_PRESET_PREPEND)) + || string_is_equal(label, msg_hash_to_str(MENU_ENUM_LABEL_VIDEO_SHADER_PRESET_APPEND)) ) { node->icon_texture_index = MUI_TEXTURE_ADD; @@ -10832,6 +10857,12 @@ static void materialui_list_insert( node->icon_texture_index = MUI_TEXTURE_QUIT; node->icon_type = MUI_ICON_TYPE_INTERNAL; } + else if (string_is_equal(label, msg_hash_to_str(MENU_ENUM_LABEL_VIDEO_SHADER_PARAMETERS)) + && type < MENU_SETTINGS_SHADER_PARAMETER_0) + { + node->icon_texture_index = MUI_TEXTURE_SETTINGS; + node->icon_type = MUI_ICON_TYPE_INTERNAL; + } /* TODO/FIXME - all this should go away and be refactored so that we don't have to do * all this manually inside this menu driver */ else if ( @@ -10907,14 +10938,9 @@ static void materialui_list_insert( || string_is_equal(label, msg_hash_to_str(MENU_ENUM_LABEL_DOWNLOAD_CORE_CONTENT_DIRS)) || string_is_equal(label, msg_hash_to_str(MENU_ENUM_LABEL_DOWNLOAD_CORE_SYSTEM_FILES)) || string_is_equal(label, msg_hash_to_str(MENU_ENUM_LABEL_SET_CORE_ASSOCIATION)) - || string_is_equal(label, msg_hash_to_str(MENU_ENUM_LABEL_VIDEO_SHADER_PRESET_SAVE)) - || string_is_equal(label, msg_hash_to_str(MENU_ENUM_LABEL_VIDEO_SHADER_PRESET_SAVE_AS)) || string_is_equal(label, msg_hash_to_str(MENU_ENUM_LABEL_VIDEO_SHADER_PRESET_REMOVE)) || string_is_equal(label, msg_hash_to_str(MENU_ENUM_LABEL_SHADER_APPLY_CHANGES)) || string_is_equal(label, msg_hash_to_str(MENU_ENUM_LABEL_CHEAT_APPLY_CHANGES)) - || string_is_equal(label, msg_hash_to_str(MENU_ENUM_LABEL_VIDEO_SHADER_PRESET)) - || string_is_equal(label, msg_hash_to_str(MENU_ENUM_LABEL_VIDEO_SHADER_PRESET_PREPEND)) - || string_is_equal(label, msg_hash_to_str(MENU_ENUM_LABEL_VIDEO_SHADER_PRESET_APPEND)) || string_is_equal(label, msg_hash_to_str(MENU_ENUM_LABEL_NETPLAY_LOBBY_FILTERS)) || string_is_equal(label, msg_hash_to_str(MENU_ENUM_LABEL_NETPLAY_REFRESH_ROOMS)) || string_is_equal(label, msg_hash_to_str(MENU_ENUM_LABEL_NETPLAY_REFRESH_LAN)) @@ -10924,24 +10950,9 @@ static void materialui_list_insert( || string_is_equal(label, msg_hash_to_str(MENU_ENUM_LABEL_NETPLAY_BAN)) || string_is_equal(label, msg_hash_to_str(MENU_ENUM_LABEL_INPUT_META_CHEAT_SEARCH)) || string_is_equal(label, msg_hash_to_str(MENU_ENUM_LABEL_CHEAT_SEARCH_SETTINGS)) - || string_is_equal(label, msg_hash_to_str(MENU_ENUM_LABEL_CHEAT_START_OR_CONT)) || string_is_equal(label, msg_hash_to_str(MENU_ENUM_LABEL_INPUT_META_CHEAT_SEARCH)) || string_is_equal(label, msg_hash_to_str(MENU_ENUM_LABEL_THUMBNAILS_MATERIALUI)) || string_is_equal(label, msg_hash_to_str(MENU_ENUM_LABEL_LEFT_THUMBNAILS_MATERIALUI)) - || string_is_equal(label, msg_hash_to_str(MENU_ENUM_LABEL_VIDEO_SHADER_NUM_PASSES)) - || string_is_equal(label, msg_hash_to_str(MENU_ENUM_LABEL_CHEAT_FILE_LOAD)) - || string_is_equal(label, msg_hash_to_str(MENU_ENUM_LABEL_CHEAT_FILE_LOAD_APPEND)) - || string_is_equal(label, msg_hash_to_str(MENU_ENUM_LABEL_CHEAT_FILE_SAVE_AS)) - || string_is_equal(label, msg_hash_to_str(MENU_ENUM_LABEL_CHEAT_RELOAD_CHEATS)) - || string_is_equal(label, msg_hash_to_str(MENU_ENUM_LABEL_CHEAT_ADD_NEW_TOP)) - || string_is_equal(label, msg_hash_to_str(MENU_ENUM_LABEL_CHEAT_ADD_NEW_BOTTOM)) - || string_is_equal(label, msg_hash_to_str(MENU_ENUM_LABEL_CHEAT_DELETE_ALL)) - || string_is_equal(label, msg_hash_to_str(MENU_ENUM_LABEL_CHEAT_ADD_NEW_AFTER)) - || string_is_equal(label, msg_hash_to_str(MENU_ENUM_LABEL_CHEAT_ADD_NEW_BEFORE)) - || string_is_equal(label, msg_hash_to_str(MENU_ENUM_LABEL_CHEAT_COPY_AFTER)) - || string_is_equal(label, msg_hash_to_str(MENU_ENUM_LABEL_CHEAT_COPY_BEFORE)) - || string_is_equal(label, msg_hash_to_str(MENU_ENUM_LABEL_CHEAT_DELETE)) - || string_is_equal(label, msg_hash_to_str(MENU_ENUM_LABEL_VIDEO_SHADER_PARAMETERS)) || string_is_equal(label, msg_hash_to_str(MENU_ENUM_LABEL_PLAYLIST_MANAGER_LIST)) || string_is_equal(label, msg_hash_to_str(MENU_ENUM_LABEL_CORE_MANAGER_LIST)) || string_is_equal(label, msg_hash_to_str(MENU_ENUM_LABEL_SETTINGS)) diff --git a/menu/menu_displaylist.c b/menu/menu_displaylist.c index f384749d631c..a34578c047ee 100644 --- a/menu/menu_displaylist.c +++ b/menu/menu_displaylist.c @@ -7883,6 +7883,14 @@ unsigned menu_displaylist_build_list( MENU_ENUM_LABEL_CHEAT_START_OR_CONT, MENU_SETTING_ACTION, 0, 0, NULL)) count++; + if (MENU_DISPLAYLIST_PARSE_SETTINGS_ENUM(list, + MENU_ENUM_LABEL_CHEAT_APPLY_AFTER_LOAD, + PARSE_ONLY_BOOL, false) == 0) + count++; + if (MENU_DISPLAYLIST_PARSE_SETTINGS_ENUM(list, + MENU_ENUM_LABEL_CHEAT_APPLY_AFTER_TOGGLE, + PARSE_ONLY_BOOL, false) == 0) + count++; if (menu_entries_append(list, msg_hash_to_str(MENU_ENUM_LABEL_VALUE_CHEAT_FILE_LOAD), msg_hash_to_str(MENU_ENUM_LABEL_CHEAT_FILE_LOAD), @@ -7925,14 +7933,6 @@ unsigned menu_displaylist_build_list( MENU_ENUM_LABEL_CHEAT_DELETE_ALL, MENU_SETTING_ACTION, 0, 0, NULL)) count++; - if (MENU_DISPLAYLIST_PARSE_SETTINGS_ENUM(list, - MENU_ENUM_LABEL_CHEAT_APPLY_AFTER_LOAD, - PARSE_ONLY_BOOL, false) == 0) - count++; - if (MENU_DISPLAYLIST_PARSE_SETTINGS_ENUM(list, - MENU_ENUM_LABEL_CHEAT_APPLY_AFTER_TOGGLE, - PARSE_ONLY_BOOL, false) == 0) - count++; } if (menu_entries_append(list,