diff --git a/dep/imgui/include/IconsEmoji.h b/dep/imgui/include/IconsEmoji.h index 991e3a871..480bae42c 100644 --- a/dep/imgui/include/IconsEmoji.h +++ b/dep/imgui/include/IconsEmoji.h @@ -31,3 +31,9 @@ #define ICON_EMOJI_PROHIBITED "\xf0\x9f\x9a\xab" #define ICON_EMOJI_CALENDAR "\xF0\x9F\x93\x85" #define ICON_EMOJI_HOURGLASS "\xe2\x8f\xb3" +#define ICON_EMOJI_TROPHY "\xf0\x9f\x8f\x86" +#define ICON_EMOJI_GLOBE "\xf0\x9f\x8c\x8e" +#define ICON_EMOJI_BOOKS "\xf0\x9f\x93\x9a" +#define ICON_EMOJI_STAR "\xe2\xad\x90" +#define ICON_EMOJI_RULER "\xf0\x9f\x93\x8f" +#define ICON_EMOJI_CLOCK_FIVE_OCLOCK "\xf0\x9f\x95\x94" diff --git a/src/core/fullscreen_ui.cpp b/src/core/fullscreen_ui.cpp index af7371e5a..128504c6c 100644 --- a/src/core/fullscreen_ui.cpp +++ b/src/core/fullscreen_ui.cpp @@ -8200,7 +8200,8 @@ void FullscreenUI::DrawGameList(const ImVec2& heading_size) { const bool display_as_language = (selected_entry->dbentry && selected_entry->dbentry->HasAnyLanguage()); ImGui::PushFont(UIStyle.Font, UIStyle.MediumFontSize, UIStyle.BoldFontWeight); - ImGui::TextUnformatted(display_as_language ? FSUI_CSTR("Language: ") : FSUI_CSTR("Region: ")); + ImGuiFullscreen::TextUnformatted( + FSUI_ICONVSTR(ICON_EMOJI_GLOBE, display_as_language ? FSUI_CSTR("Language: ") : FSUI_CSTR("Region: "))); ImGui::PopFont(); ImGui::SameLine(); ImGui::Image(GetCachedTexture(selected_entry->GetLanguageIconName(), 23, 16), LayoutScale(23.0f, 16.0f)); @@ -8224,7 +8225,7 @@ void FullscreenUI::DrawGameList(const ImVec2& heading_size) if (!selected_entry->dbentry->genre.empty()) { ImGui::PushFont(UIStyle.Font, UIStyle.MediumFontSize, UIStyle.BoldFontWeight); - ImGui::TextUnformatted(FSUI_CSTR("Genre: ")); + ImGuiFullscreen::TextUnformatted(FSUI_ICONVSTR(ICON_EMOJI_BOOKS, FSUI_VSTR("Genre: "))); ImGui::PopFont(); ImGui::SameLine(); ImGui::PushStyleColor(ImGuiCol_Text, subtitle_text_color); @@ -8236,7 +8237,7 @@ void FullscreenUI::DrawGameList(const ImVec2& heading_size) if (selected_entry->dbentry->release_date != 0) { ImGui::PushFont(UIStyle.Font, UIStyle.MediumFontSize, UIStyle.BoldFontWeight); - ImGui::TextUnformatted(FSUI_CSTR("Release Date: ")); + ImGuiFullscreen::TextUnformatted(FSUI_ICONVSTR(ICON_EMOJI_CALENDAR, FSUI_VSTR("Release Date: "))); ImGui::PopFont(); ImGui::SameLine(); ImGui::PushStyleColor(ImGuiCol_Text, subtitle_text_color); @@ -8249,7 +8250,7 @@ void FullscreenUI::DrawGameList(const ImVec2& heading_size) if (selected_entry->num_achievements > 0) { ImGui::PushFont(UIStyle.Font, UIStyle.MediumFontSize, UIStyle.BoldFontWeight); - ImGui::TextUnformatted(FSUI_CSTR("Achievements: ")); + ImGuiFullscreen::TextUnformatted(FSUI_ICONVSTR(ICON_EMOJI_TROPHY, "Achievements: ")); ImGui::PopFont(); ImGui::SameLine(); ImGui::PushStyleColor(ImGuiCol_Text, subtitle_text_color); @@ -8267,7 +8268,7 @@ void FullscreenUI::DrawGameList(const ImVec2& heading_size) // compatibility ImGui::PushFont(UIStyle.Font, UIStyle.MediumFontSize, UIStyle.BoldFontWeight); - ImGui::TextUnformatted(FSUI_CSTR("Compatibility: ")); + ImGuiFullscreen::TextUnformatted(FSUI_ICONSTR(ICON_EMOJI_STAR, FSUI_VSTR("Compatibility: "))); ImGui::PopFont(); ImGui::SameLine(); ImGui::Image(GetCachedTexture(selected_entry->GetCompatibilityIconFileName(), 88, 16), LayoutScale(88.0f, 16.0f)); @@ -8280,14 +8281,14 @@ void FullscreenUI::DrawGameList(const ImVec2& heading_size) // play time ImGui::PushFont(UIStyle.Font, UIStyle.MediumFontSize, UIStyle.BoldFontWeight); - ImGui::TextUnformatted(FSUI_CSTR("Time Played: ")); + ImGuiFullscreen::TextUnformatted(FSUI_ICONSTR(ICON_EMOJI_HOURGLASS, FSUI_VSTR("Time Played: "))); ImGui::PopFont(); ImGui::SameLine(); ImGui::PushStyleColor(ImGuiCol_Text, subtitle_text_color); ImGui::TextUnformatted(GameList::FormatTimespan(selected_entry->total_played_time).c_str()); ImGui::PopStyleColor(); ImGui::PushFont(UIStyle.Font, UIStyle.MediumFontSize, UIStyle.BoldFontWeight); - ImGui::TextUnformatted(FSUI_CSTR("Last Played: ")); + ImGuiFullscreen::TextUnformatted(FSUI_ICONSTR(ICON_EMOJI_CLOCK_FIVE_OCLOCK, FSUI_CSTR("Last Played: "))); ImGui::PopFont(); ImGui::SameLine(); ImGui::PushStyleColor(ImGuiCol_Text, subtitle_text_color); @@ -8298,7 +8299,7 @@ void FullscreenUI::DrawGameList(const ImVec2& heading_size) if (selected_entry->file_size >= 0) { ImGui::PushFont(UIStyle.Font, UIStyle.MediumFontSize, UIStyle.BoldFontWeight); - ImGui::TextUnformatted(FSUI_CSTR("File Size: ")); + ImGuiFullscreen::TextUnformatted(FSUI_ICONSTR(ICON_EMOJI_OPEN_THE_FOLDER, FSUI_VSTR("File Size: "))); ImGui::PopFont(); ImGui::SameLine(); ImGui::PushStyleColor(ImGuiCol_Text, subtitle_text_color); diff --git a/src/util/imgui_fullscreen.cpp b/src/util/imgui_fullscreen.cpp index 480f9a51c..046dd546e 100644 --- a/src/util/imgui_fullscreen.cpp +++ b/src/util/imgui_fullscreen.cpp @@ -1796,6 +1796,11 @@ void ImGuiFullscreen::TextAlignedMultiLine(float align_x, const char* text, cons ImGui::ItemAdd(bb, 0); } +void ImGuiFullscreen::TextUnformatted(std::string_view text) +{ + ImGui::TextUnformatted(IMSTR_START_END(text)); +} + void ImGuiFullscreen::MenuHeading(std::string_view title, bool draw_line /*= true*/) { const float line_thickness = draw_line ? LayoutScale(1.0f) : 0.0f; diff --git a/src/util/imgui_fullscreen.h b/src/util/imgui_fullscreen.h index 990dfd8b0..e1aed39c4 100644 --- a/src/util/imgui_fullscreen.h +++ b/src/util/imgui_fullscreen.h @@ -303,6 +303,7 @@ void RenderAutoLabelText(ImDrawList* draw_list, ImFont* font, float font_size, f const ImVec2& pos_min, const ImVec2& pos_max, u32 color, std::string_view text, char separator = ':', float shadow_offset = LayoutScale(LAYOUT_SHADOW_OFFSET)); void TextAlignedMultiLine(float align_x, const char* text, const char* text_end = nullptr, float wrap_width = -1.0f); +void TextUnformatted(std::string_view text); void MenuHeading(std::string_view title, bool draw_line = true); bool MenuHeadingButton(std::string_view title, std::string_view value = {}, bool enabled = true, bool draw_line = true); bool MenuButton(std::string_view title, std::string_view summary, bool enabled = true,