Skip to content

Commit

Permalink
gui: info message is confusing
Browse files Browse the repository at this point in the history
  • Loading branch information
nishinji committed Dec 15, 2023
1 parent 62a72bd commit 39adc56
Show file tree
Hide file tree
Showing 11 changed files with 33 additions and 19 deletions.
4 changes: 2 additions & 2 deletions lang/system/en-gb.xml
Original file line number Diff line number Diff line change
Expand Up @@ -703,8 +703,8 @@ You will need to move your old folder to the new location manually.</reset_emu_p
<info_bar_description>Check the box to show an info bar inside the app selector.</info_bar_description>
<user_lang>GUI Language</user_lang>
<select_user_lang>Select your user language.</select_user_lang>
<display_info_message>Display Info Message</display_info_message>
<display_info_message_description>Uncheck the box to display info message in log only.</display_info_message_description>
<display_compatibility_update>Display Compatibility Update</display_compatibility_update>
<display_compatibility_update_description>Uncheck the box to display compatibility update in log only.</display_compatibility_update_description>
<display_system_apps>Display System Apps</display_system_apps>
<display_system_apps_description>Uncheck the box to disable the display of system apps on the home screen.
They will be shown in the main menu bar only.</display_system_apps_description>
Expand Down
4 changes: 2 additions & 2 deletions lang/system/en.xml
Original file line number Diff line number Diff line change
Expand Up @@ -703,8 +703,8 @@ You will need to move your old folder to the new location manually.</reset_emu_p
<info_bar_description>Check the box to show an info bar inside the app selector.</info_bar_description>
<user_lang>GUI Language</user_lang>
<select_user_lang>Select your user language.</select_user_lang>
<display_info_message>Display Info Message</display_info_message>
<display_info_message_description>Uncheck the box to display info message in log only.</display_info_message_description>
<display_compatibility_update>Display Compatibility Update</display_compatibility_update>
<display_compatibility_update_description>Uncheck the box to display compatibility update in log only.</display_compatibility_update_description>
<display_system_apps>Display System Apps</display_system_apps>
<display_system_apps_description>Uncheck the box to disable the display of system apps on the home screen.
They will be shown in the main menu bar only.</display_system_apps_description>
Expand Down
4 changes: 2 additions & 2 deletions lang/system/zh-s.xml
Original file line number Diff line number Diff line change
Expand Up @@ -700,8 +700,8 @@
<info_bar_description>勾选此项在应用程序选择页面内显示信息栏。</info_bar_description>
<user_lang>图形用户界面语言</user_lang>
<select_user_lang>选择您的用户语言。</select_user_lang>
<display_info_message>显示信息消息</display_info_message>
<display_info_message_description>取消勾选此项只在日志中显示信息消息。</display_info_message_description>
<display_compatibility_update>显示信息消息</display_compatibility_update>
<display_compatibility_update_description>取消勾选此项只在日志中显示信息消息。</display_compatibility_update_description>
<display_system_apps>显示系统应用程序</display_system_apps>
<display_system_apps_description>取消勾选此项禁用从主画面中显示的系统应用程序。
它们将仅显示在主菜单栏中。</display_system_apps_description>
Expand Down
4 changes: 2 additions & 2 deletions lang/system/zh-t.xml
Original file line number Diff line number Diff line change
Expand Up @@ -700,8 +700,8 @@
<info_bar_description>勾選此項在應用程式選擇頁面顯示信息欄。</info_bar_description>
<user_lang>圖形化使用者介面語言</user_lang>
<select_user_lang>選擇您的使用者語言。</select_user_lang>
<display_info_message>顯示資訊消息</display_info_message>
<display_info_message_description>取消勾選此項只在日志中顯示資訊消息。</display_info_message_description>
<display_compatibility_update>顯示資訊消息</display_compatibility_update>
<display_compatibility_update_description>取消勾選此項只在日志中顯示資訊消息。</display_compatibility_update_description>
<display_system_apps>顯示系統應用程式</display_system_apps>
<display_system_apps_description>取消勾選此項禁用從主頁畫面中顯示的系統應用程式。
它們將僅顯示在主選單欄中。</display_system_apps_description>
Expand Down
4 changes: 2 additions & 2 deletions lang/user/id.xml
Original file line number Diff line number Diff line change
Expand Up @@ -660,8 +660,8 @@ Kamu perlu memindahkan folder lama ke lokasi baru secara manual.</reset_emu_path
<gui_description>Centang kotak untuk menampilkan GUI setelah mem-boot aplikasi.</gui_description>
<show_info_bar>Info Bar Terlihat</show_info_bar>
<info_bar_description>Centang kotak untuk menampilkan bar info di dalam pemilih aplikasi.</info_bar_description>
<display_info_message>Tampilkan Pesan Info</display_info_message>
<display_info_message_description>Hapus centang pada kotak untuk menampilkan pesan info di log saja.</display_info_message_description>
<display_compatibility_update>Tampilkan Pesan Info</display_compatibility_update>
<display_compatibility_update_description>Hapus centang pada kotak untuk menampilkan pesan info di log saja.</display_compatibility_update_description>
<display_system_apps>Tampilkan System Aplikasi</display_system_apps>
<display_system_apps_description>Hapus centang pada kotak untuk menonaktifkan tampilan aplikasi sistem di layar beranda.
Mereka hanya akan ditampilkan di bar menu utama.</display_system_apps_description>
Expand Down
4 changes: 2 additions & 2 deletions lang/user/ms.xml
Original file line number Diff line number Diff line change
Expand Up @@ -679,8 +679,8 @@ Awak perlu mengalihkan folder lama awak ke lokasi baharu secara manual.</reset_e
<gui_description>Tandai kotak untuk menunjukkan GUI selepas boot apl.</gui_description>
<show_info_bar>Bar Maklumat Kelihatan</show_info_bar>
<info_bar_description>Tandai kotak untuk menunjukkan bar maklumat dalam pemilih apl.</info_bar_description>
<display_info_message>Paparkan Mesej Maklumat</display_info_message>
<display_info_message_description>Nyahtanda kotak untuk memaparkan mesej maklumat dalam log sahaja.</display_info_message_description>
<display_compatibility_update>Paparkan Mesej Maklumat</display_compatibility_update>
<display_compatibility_update_description>Nyahtanda kotak untuk memaparkan mesej maklumat dalam log sahaja.</display_compatibility_update_description>
<display_system_apps>Paparan Apl Sistem</display_system_apps>
<display_system_apps_description>Nyahtanda kotak untuk melumpuhkan paparan apl sistem pada skrin utama.
Ia akan ditunjukkan dalam bar menu utama sahaja.</display_system_apps_description>
Expand Down
2 changes: 1 addition & 1 deletion vita3k/config/include/config/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ enum PerfomanceOverleyPosition {
code(std::string, "user-id", std::string{}, user_id) \
code(bool, "user-auto-connect", false, auto_user_login) \
code(std::string, "user-lang", std::string{}, user_lang) \
code(bool, "display-info-message", true, display_info_message) \
code(bool, "display-info-message", true, display_compatibility_update) \
code(bool, "show-welcome", true, show_welcome) \
code(bool, "check-for-updates", true, check_for_updates) \
code(bool, "asia-font-support", false, asia_font_support) \
Expand Down
5 changes: 5 additions & 0 deletions vita3k/gui/include/gui/state.h
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,10 @@ struct HelpMenuState {
bool welcome_dialog = false;
};

struct InformationState {
bool information_dialog = false;
};

} // namespace gui

enum class TrophyAnimationStage {
Expand Down Expand Up @@ -280,6 +284,7 @@ struct GuiState {
gui::HelpMenuState help_menu;
gui::VitaAreaState vita_area;
gui::AppsSelector app_selector;
gui::InformationState info;

compat::CompatState compat;
LangState lang;
Expand Down
13 changes: 11 additions & 2 deletions vita3k/gui/src/gui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,12 @@
#include <fstream>
#include <string>
#include <vector>
#include <config/functions.h>

namespace gui {

void draw_info_message(GuiState &gui, EmuEnvState &emuenv) {
if (emuenv.io.title_id.empty() && emuenv.cfg.display_info_message) {
if (emuenv.io.title_id.empty()) {
const ImVec2 display_size(emuenv.viewport_size.x, emuenv.viewport_size.y);
const ImVec2 RES_SCALE(display_size.x / emuenv.res_width_dpi_scale, display_size.y / emuenv.res_height_dpi_scale);
const ImVec2 SCALE(RES_SCALE.x * emuenv.dpi_scale, RES_SCALE.y * emuenv.dpi_scale);
Expand All @@ -75,9 +76,13 @@ void draw_info_message(GuiState &gui, EmuEnvState &emuenv) {
ImGui::TextWrapped("%s", gui.info_message.msg.c_str());
ImGui::SetCursorPosY(WINDOW_SIZE.y - BUTTON_SIZE.y - (42.0f * SCALE.y));
ImGui::Separator();
ImGui::Spacing();
if (ImGui::Checkbox("show_next_time", &emuenv.cfg.display_compatibility_update))
config::serialize_config(emuenv.cfg, emuenv.cfg.config_path);
ImGui::Spacing();
ImGui::SetCursorPos(ImVec2((ImGui::GetWindowWidth() / 2.f) - (BUTTON_SIZE.x / 2.f), WINDOW_SIZE.y - BUTTON_SIZE.y - (24.0f * SCALE.y)));
if (ImGui::Button(emuenv.common_dialog.lang.common["ok"].c_str(), BUTTON_SIZE) || ImGui::IsKeyPressed(static_cast<ImGuiKey>(emuenv.cfg.keyboard_button_cross)))
gui.info_message = {};
gui.info.information_dialog = false;
ImGui::EndChild();

ImGui::PopStyleVar();
Expand Down Expand Up @@ -723,6 +728,8 @@ void init(GuiState &gui, EmuEnvState &emuenv) {

if (emuenv.cfg.show_welcome)
gui.help_menu.welcome_dialog = true;
if (emuenv.cfg.display_compatibility_update)
gui.info.information_dialog = true;

get_sys_apps_title(gui, emuenv);

Expand Down Expand Up @@ -846,6 +853,8 @@ void draw_ui(GuiState &gui, EmuEnvState &emuenv) {
draw_about_dialog(gui, emuenv);
if (gui.help_menu.welcome_dialog)
draw_welcome_dialog(gui, emuenv);
if (emuenv.io.title_id.empty() && gui.info.information_dialog)
draw_info_message(gui, emuenv);

ImGui::PopFont();

Expand Down
4 changes: 2 additions & 2 deletions vita3k/gui/src/settings_dialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -942,9 +942,9 @@ void draw_settings_dialog(GuiState &gui, EmuEnvState &emuenv) {
if (ImGui::IsItemHovered())
ImGui::SetTooltip("%s", lang.gui["select_user_lang"].c_str());
ImGui::Spacing();
ImGui::Checkbox(lang.gui["display_info_message"].c_str(), &emuenv.cfg.display_info_message);
ImGui::Checkbox(lang.gui["display_compatibility_update"].c_str(), &emuenv.cfg.display_compatibility_update);
if (ImGui::IsItemHovered())
ImGui::SetTooltip("%s", lang.gui["display_info_message_description"].c_str());
ImGui::SetTooltip("%s", lang.gui["display_compatibility_update_description"].c_str());
ImGui::SameLine();
ImGui::Checkbox(lang.gui["display_system_apps"].c_str(), &emuenv.cfg.display_system_apps);
if (ImGui::IsItemHovered())
Expand Down
4 changes: 2 additions & 2 deletions vita3k/lang/include/lang/state.h
Original file line number Diff line number Diff line change
Expand Up @@ -621,8 +621,8 @@ struct LangState {
{ "info_bar_description", "Check the box to show an info bar inside the app selector." },
{ "user_lang", "GUI Language" },
{ "select_user_lang", "Select your user language." },
{ "display_info_message", "Display Info Message" },
{ "display_info_message_description", "Uncheck the box to display info message in log only." },
{ "display_compatibility_update", "Display Compatibility Update" },
{ "display_compatibility_update_description", "Uncheck the box to display compatibility update in log only." },
{ "display_system_apps", "Display System Apps" },
{ "display_system_apps_description", "Uncheck the box to disable the display of system apps on the home screen.\nThey will be shown in the main menu bar only." },
{ "show_live_area_screen", "Live Area App Screen" },
Expand Down

0 comments on commit 39adc56

Please sign in to comment.