gui/lang: add some common text.

This commit is contained in:
Zangetsu38
2021-03-29 04:49:57 +02:00
committed by Nicolas Jallamion
parent 8bcd651b37
commit d367be7368
23 changed files with 388 additions and 66 deletions
+27
View File
@@ -37,6 +37,14 @@
</app_context>
<common>
<cancel>Cancel</cancel>
<delete>Delete</delete>
<file_corrupted>The file is corrupt.</file_corrupted>
<no>No</no>
<select_all>Select All</select_all>
<select>Select</select>
<please_wait>Please wait...</please_wait>
<yes>Yes</yes>
<wday>
<day>sunday</day>
<day>monday</day>
@@ -60,8 +68,27 @@
<month>November</month>
<month>December</month>
</ymonth>
<small_ymonth>
<month>january</month>
<month>february</month>
<month>march</month>
<month>april</month>
<month>may</month>
<month>june</month>
<month>july</month>
<month>august</month>
<month>september</month>
<month>october</month>
<month>november</month>
<month>december</month>
</small_ymonthnth>
<hidden_trophy>Hidden Trophy</hidden_trophy>
<one_hour_ago>1 Hour Ago</one_hour_ago>
<one_minute_ago>1 Minute Ago</one_minute_ago>
<bronze>Bronze</bronze>
<gold>Gold</gold>
<platinum>Platinum</platinum>
<silver>Silver</silver>
<hours_ago>{} Hours Ago</hours_ago>
<minutes_ago>{} Minutes Ago</minutes_ago>
</common>
+27
View File
@@ -37,6 +37,14 @@
</app_context>
<common>
<cancel>Cancelar</cancel>
<delete>Eliminar</delete>
<file_corrupted>El archivo está dañado.</file_corrupted>
<no>No</no>
<select_all>Seleccionar todo</select_all>
<select>Seleccionar</select>
<please_wait>Espera un momento...</please_wait>
<yes></yes>
<wday>
<day>domingo</day>
<day>lunes</day>
@@ -60,8 +68,27 @@
<month>Noviembre</month>
<month>Diciembre</month>
</ymonth>
<small_ymonth>
<month>enero</month>
<month>febrero</month>
<month>marzo</month>
<month>abril</month>
<month>mayo</month>
<month>junio</month>
<month>julio</month>
<month>agosto</month>
<month>septiembre</month>
<month>octubre</month>
<month>noviembre</month>
<month>diciembre</month>
</small_ymonth>
<hidden_trophy>Trofeo oculto</hidden_trophy>
<one_hour_ago>Hace 1 hora</one_hour_ago>
<one_minute_ago>Hace 1 minuto</one_minute_ago>
<bronze>Bronce</bronze>
<gold>Oro</gold>
<platinum>Platino</platinum>
<silver>Plata</silver>
<hours_ago>Hace {} horas</hours_ago>
<minutes_ago>Hace {} minutos</minutes_ago>
</common>
+27
View File
@@ -37,6 +37,14 @@
</app_context>
<common>
<cancel>Annuler</cancel>
<delete>Supprimer</delete>
<file_corrupted>Le fichier est corrompu.</file_corrupted>
<no>Non</no>
<select_all>Sélectionner tout</select_all>
<select>Sélectionner</select>
<please_wait>Merci de patienter...</please_wait>
<yes>Oui</yes>
<wday>
<day>dimanche</day>
<day>lundi</day>
@@ -60,8 +68,27 @@
<month>Novembre</month>
<month>Décembre</month>
</ymonth>
<small_ymonth>
<month>janvier</month>
<month>février</month>
<month>mars</month>
<month>avril</month>
<month>mai</month>
<month>juin</month>
<month>juillet</month>
<month>août</month>
<month>septembre</month>
<month>octobre</month>
<month>novembre</month>
<month>décembre</month>
</small_ymonth>
<hidden_trophy>Trophée masqué</hidden_trophy>
<one_hour_ago>Il y a 1 heure</one_hour_ago>
<one_minute_ago>Il y a 1 minute</one_minute_ago>
<bronze>Bronze</bronze>
<gold>Or</gold>
<platinum>Platine</platinum>
<silver>Argent</silver>
<hours_ago>Il y a {} heures</hours_ago>
<minutes_ago>Il y a {} minutes</minutes_ago>
</common>
+27
View File
@@ -42,6 +42,14 @@
</app_context>
<common>
<cancel>Annulla</cancel>
<delete>Elimina</delete>
<file_corrupted>Il file è danneggiato.</file_corrupted>
<no>No</no>
<select_all>Seleziona tutto</select_all>
<select>Seleziona</select>
<please_wait>Attendi...</please_wait>
<yes></yes>
<wday>
<day>domenica</day>
<day>lunedi</day>
@@ -65,8 +73,27 @@
<month>Novembre</month>
<month>Dicembre</month>
</ymonth>
<small_ymonth>
<month>gennaio</month>
<month>febbraio</month>
<month>marzo</month>
<month>aprile</month>
<month>maggio</month>
<month>giugno</month>
<month>luglio</month>
<month>agosto</month>
<month>settembre</month>
<month>ottobre</month>
<month>novembre</month>
<month>dicembre</month>
</small_ymonth>
<hidden_trophy>Trofeo nascosto</hidden_trophy>
<one_hour_ago>1 ora fa</one_hour_ago>
<one_minute_ago>1 minuto fa</one_minute_ago>
<bronze>Bronzo</bronze>
<gold>Oro</gold>
<platinum>Platino</platinum>
<silver>Argento</silver>
<hours_ago>{} ore fa</hours_ago>
<minutes_ago>{} minuti fa</minutes_ago>
</common>
+28 -1
View File
@@ -14,6 +14,14 @@
</app_context>
<common>
<cancel>キャンセル</cancel>
<delete>削除</delete>
<file_corrupted>ファイルが壊れています。</file_corrupted>
<no>いいえ</no>
<select_all>すべて選択</select_all>
<select>選択</select>
<please_wait>しばらくお待ちください...</please_wait>
<yes>はい</yes>
<wday>
<day>日曜日</day>
<day>月曜日</day>
@@ -23,7 +31,7 @@
<day>金曜日</day>
<day>土曜日</day>
</wday>
<ymonth>
<ymonth>
<month>1月</month>
<month>2月</month>
<month>3月</month>
@@ -37,8 +45,27 @@
<month>11月</month>
<month>12月</month>
</ymonth>
<small_ymonth>
<month>1月</month>
<month>2月</month>
<month>3月</month>
<month>4月</month>
<month>5月</month>
<month>6月</month>
<month>7月</month>
<month>8月</month>
<month>9月</month>
<month>10月</month>
<month>11月</month>
<month>12月</month>
</small_ymonth>
<hidden_trophy>隠しトロフィー</hidden_trophy>
<one_hour_ago>1時間前</one_hour_ago>
<one_minute_ago>1分前</one_minute_ago>
<bronze>ブロンズ</bronze>
<gold>ゴールド</gold>
<platinum>プラチナ</platinum>
<silver>シルバー</silver>
<hours_ago>{}時間前</hours_ago>
<minutes_ago>{}分前</minutes_ago>
</common>
+27
View File
@@ -14,6 +14,14 @@
</app_context>
<common>
<cancel>취소</cancel>
<delete>삭제</delete>
<file_corrupted>파일이 손상되어 있습니다.</file_corrupted>
<no>아니요</no>
<select_all>모두 선택</select_all>
<select>선택</select>
<please_wait>잠시 기다려 주십시오...</please_wait>
<yes></yes>
<wday>
<day>일요일</day>
<day>월요일</day>
@@ -37,8 +45,27 @@
<month>11월</month>
<month>12월</month>
</ymonth>
<small_ymonth>
<month>1월</month>
<month>2월</month>
<month>3월</month>
<month>4월</month>
<month>5월</month>
<month>6월</month>
<month>7월</month>
<month>8월</month>
<month>9월</month>
<month>10월</month>
<month>11월</month>
<month>12월</month>
</small_ymonth>
<hidden_trophy>숨겨진 트로피</hidden_trophy>
<one_hour_ago>1 시간 전</one_hour_ago>
<one_minute_ago>1 분 전</one_minute_ago>
<bronze>브론즈</bronze>
<gold>골드</gold>
<platinum>플래티넘</platinum>
<silver>실버</silver>
<hours_ago>{} 시간 전</hours_ago>
<minutes_ago>{} 분 전</minutes_ago>
</common>
+27
View File
@@ -37,6 +37,14 @@
</app_context>
<common>
<cancel>Annuleren</cancel>
<delete>Verwijderen</delete>
<file_corrupted>Het bestand is beschadigd.</file_corrupted>
<no>Nee</no>
<select_all>Alles selecteren</select_all>
<select>Selecteren</select>
<please_wait>Een ogenblik geduld...</please_wait>
<yes>Ja</yes>
<wday>
<day>zondag</day>
<day>maandag</day>
@@ -60,8 +68,27 @@
<month>November</month>
<month>December</month>
</ymonth>
<small_ymonth>
<month>januari</month>
<month>februari</month>
<month>maart</month>
<month>april</month>
<month>mei</month>
<month>juni</month>
<month>juli</month>
<month>augustus</month>
<month>september</month>
<month>oktober</month>
<month>november</month>
<month>december</month>
</small_ymonth>
<hidden_trophy>Verborgen trofee</hidden_trophy>
<one_hour_ago>1 uur geleden</one_hour_ago>
<one_minute_ago>1 minuut geleden</one_minute_ago>
<bronze>Brons</bronze>
<gold>Goud</gold>
<platinum>Platina</platinum>
<silver>Zilver</silver>
<hours_ago>{} uur geleden</hours_ago>
<minutes_ago>{} minuten geleden</minutes_ago>
</common>
+27
View File
@@ -37,6 +37,14 @@
</app_context>
<common>
<cancel>Отмена</cancel>
<delete>Удалить</delete>
<file_corrupted>Файл поврежден.</file_corrupted>
<no>Нет</no>
<select_all>Выбрать все</select_all>
<select>Выбрать</select>
<please_wait>Подождите...</please_wait>
<yes>Да</yes>
<wday>
<day>воскресенье</day>
<day>понедельник</day>
@@ -60,8 +68,27 @@
<month>Ноябрь</month>
<month>Декабрь</month>
</ymonth>
<small_ymonth>
<month>января</month>
<month>февраля</month>
<month>марта</month>
<month>апреля</month>
<month>мая</month>
<month>июня</month>
<month>июля</month>
<month>августа</month>
<month>сентября</month>
<month>октября</month>
<month>ноября</month>
<month>декабря</month>
</small_ymonth>
<hidden_trophy>Скрытый приз</hidden_trophy>
<one_hour_ago>1 час назад</one_hour_ago>
<one_minute_ago>1 мин. назад</one_minute_ago>
<bronze>Бронзаs</bronze>
<gold>Золото</gold>
<platinum>Платина</platinum>
<silver>Серебро</silver>
<hours_ago>{} час. назад</hours_ago>
<minutes_ago>{} мин. назад</minutes_ago>
</common>
+27
View File
@@ -37,6 +37,14 @@
</app_context>
<common>
<cancel>取消</cancel>
<delete>删除</delete>
<file_corrupted>文件已损坏。</file_corrupted>
<no></no>
<select_all>全部选择</select_all>
<select>选择</select>
<please_wait>请稍等…</please_wait>
<yes></yes>
<wday>
<day>星期日</day>
<day>星期一</day>
@@ -60,8 +68,27 @@
<month>11月</month>
<month>12月</month>
</ymonth>
<small_ymonth>
<month>1月</month>
<month>2月</month>
<month>3月</month>
<month>4月</month>
<month>5月</month>
<month>6月</month>
<month>7月</month>
<month>8月</month>
<month>9月</month>
<month>10月</month>
<month>11月</month>
<month>12月</month>
</small_ymonth>
<hidden_trophy>隐藏奖杯</hidden_trophy>
<one_hour_ago>1小时前</one_hour_ago>
<one_minute_ago>1分钟前</one_minute_ago>
<bronze>Bronze(铜)</bronze>
<gold>Gold(金)</gold>
<platinum>Platinum(白金)</platinum>
<silver>Silver(银)</silver>
<hours_ago>{}小时前</hours_ago>
<minutes_ago>{}分钟前</minutes_ago>
</common>
+27
View File
@@ -37,6 +37,14 @@
</app_context>
<common>
<cancel>取消</cancel>
<delete>刪除</delete>
<file_corrupted>檔案已毀損。</file_corrupted>
<no></no>
<select_all>全選</select_all>
<select>選擇</select>
<please_wait>請稍候……</please_wait>
<yes></yes>
<wday>
<day>星期日</day>
<day>星期一</day>
@@ -60,8 +68,27 @@
<month>11月</month>
<month>12月</month>
</ymonth>
<small_ymonth>
<month>1月</month>
<month>2月</month>
<month>3月</month>
<month>4月</month>
<month>5月</month>
<month>6月</month>
<month>7月</month>
<month>8月</month>
<month>9月</month>
<month>10月</month>
<month>11月</month>
<month>12月</month>
</small_ymonth>
<hidden_trophy>隱藏獎盃</hidden_trophy>
<one_hour_ago>1小時前</one_hour_ago>
<one_minute_ago>1分鐘前</one_minute_ago>
<bronze>Bronze(銅)</bronze>
<gold>Gold(金)</gold>
<platinum>Platinum(白金)</platinum>
<silver>Silver(銀)</silver>
<hours_ago>{}小時前</hours_ago>
<minutes_ago>{}分鐘前</minutes_ago>
</common>
+1
View File
@@ -90,6 +90,7 @@ struct SavedataState {
};
struct DialogLang {
std::map<std::string, std::string> common;
std::map<std::string, std::string> trophy;
std::map<std::string, std::string> save_data;
};
+1
View File
@@ -157,6 +157,7 @@ struct Lang {
struct Common {
std::vector<std::string> wday;
std::vector<std::string> ymonth;
std::vector<std::string> small_ymonth;
std::map<std::string, std::string> common;
};
Common common;
+4 -3
View File
@@ -111,6 +111,7 @@ void draw_app_context_menu(GuiState &gui, HostState &host, const std::string &ap
auto lang = gui.lang.app_context;
const auto is_lang = !lang.empty();
auto common = host.common_dialog.lang.common;
// App Context Menu
if (ImGui::BeginPopupContextItem("##app_context_menu")) {
@@ -151,7 +152,7 @@ void draw_app_context_menu(GuiState &gui, HostState &host, const std::string &ap
}
if (!host.cfg.show_live_area_screen && ImGui::MenuItem("Live Area", nullptr, &gui.live_area.live_area_screen))
init_live_area(gui, host);
if (ImGui::BeginMenu("Delete")) {
if (ImGui::BeginMenu(!common["delete"].empty() ? common["delete"].c_str() : "Delete")) {
if (ImGui::MenuItem("Application"))
context_dialog = "app";
if (fs::exists(DLC_PATH) && ImGui::MenuItem("DLC"))
@@ -236,13 +237,13 @@ void draw_app_context_menu(GuiState &gui, HostState &host, const std::string &ap
ImGui::SetTooltip("Deleting a application may take a while\ndepending on its size and your hardware.");
ImGui::SetWindowFontScale(1.4f * scal.x);
ImGui::SetCursorPos(ImVec2((WINDOW_SIZE.x / 2) - (BUTTON_SIZE.x + (20.f * scal.x)), WINDOW_SIZE.y - BUTTON_SIZE.y - (24.0f * scal.y)));
if (ImGui::Button("Cancel", BUTTON_SIZE) || ImGui::IsKeyPressed(host.cfg.keyboard_button_circle)) {
if (ImGui::Button(!common["cancel"].empty() ? common["cancel"].c_str() : "Cancel", BUTTON_SIZE) || ImGui::IsKeyPressed(host.cfg.keyboard_button_circle)) {
context_dialog.clear();
}
ImGui::SameLine();
ImGui::SetCursorPosX((WINDOW_SIZE.x / 2.f) + (20.f * scal.x));
}
if (ImGui::Button("Ok", BUTTON_SIZE) || ImGui::IsKeyPressed(host.cfg.keyboard_button_cross)) {
if (ImGui::Button("OK", BUTTON_SIZE) || ImGui::IsKeyPressed(host.cfg.keyboard_button_cross)) {
if (context_dialog == "app") {
fs::remove_all(DLC_PATH);
fs::remove_all(SAVE_DATA_PATH);
+2 -2
View File
@@ -249,7 +249,7 @@ void draw_app_selector(GuiState &gui, HostState &host) {
if (!host.cfg.apps_list_grid) {
ImGui::Columns(5);
ImGui::SetColumnWidth(0, icon_size + /* padding */ 20.f);
if (ImGui::Button("App Filter"))
if (ImGui::Button("Filter"))
ImGui::OpenPopup("app_filter");
ImGui::NextColumn();
switch (gui.app_selector.title_id_sort_state) {
@@ -353,7 +353,7 @@ void draw_app_selector(GuiState &gui, HostState &host) {
}
ImGui::NextColumn();
} else {
if (ImGui::Button("App Filter"))
if (ImGui::Button("Filter"))
ImGui::OpenPopup("app_filter");
ImGui::SameLine(0, 20.f);
}
+10 -4
View File
@@ -296,6 +296,8 @@ void draw_content_manager(GuiState &gui, HostState &host) {
ImGui::PushStyleVar(ImGuiStyleVar_FrameRounding, 10.f);
ImGui::BeginChild("##content_manager_child", menu == "info" ? SIZE_INFO : SIZE_LIST, false, ImGuiWindowFlags_NoBackground | ImGuiWindowFlags_NoDecoration | ImGuiWindowFlags_NoSavedSettings);
auto common = host.common_dialog.lang.common;
if (menu.empty()) {
title = "Content Manager";
ImGui::SetWindowFontScale(1.2f);
@@ -377,7 +379,7 @@ void draw_content_manager(GuiState &gui, HostState &host) {
ImGui::SetCursorPos(ImVec2(106.f * SCAL.x, ImGui::GetCursorPosY() + (76.f * SCAL.y)));
ImGui::TextColored(GUI_COLOR_TEXT, "Data to be Deleted: %s", size_selected_contents.c_str());
ImGui::SetCursorPos(ImVec2((POPUP_SIZE.x / 2) - (BUTTON_SIZE.x + (10.f * SCAL.x)), POPUP_SIZE.y - BUTTON_SIZE.y - (22.0f * SCAL.y)));
if (ImGui::Button("Cancel", BUTTON_SIZE) || ImGui::IsKeyPressed(host.cfg.keyboard_button_circle)) {
if (ImGui::Button(!common["cancel"].empty() ? common["cancel"].c_str() : "Cancel", BUTTON_SIZE) || ImGui::IsKeyPressed(host.cfg.keyboard_button_circle)) {
popup = false;
}
ImGui::SameLine(0, 20.f * SCAL.x);
@@ -565,7 +567,7 @@ void draw_content_manager(GuiState &gui, HostState &host) {
} else {
ImGui::SetWindowFontScale(1.5f * SCAL.x);
ImGui::GetWindowDrawList()->AddRectFilled(ImVec2(0.f, 482.f * SCAL.y), display_size, IM_COL32(39.f, 42.f, 49.f, 255.f), 0.f, ImDrawCornerFlags_All);
if (ImGui::Button("Cancel", ImVec2(202.f * SCAL.x, 44.f * SCAL.y))) {
if (ImGui::Button(!common["cancel"].empty() ? common["cancel"].c_str() : "Cancel", ImVec2(202.f * SCAL.x, 44.f * SCAL.y))) {
if (!menu.empty()) {
menu.clear();
contents_selected.clear();
@@ -574,8 +576,10 @@ void draw_content_manager(GuiState &gui, HostState &host) {
const auto state = std::find_if(contents_selected.begin(), contents_selected.end(), [&](const auto &c) {
return !c.second;
}) != contents_selected.end();
ImGui::SetWindowFontScale(1.2f * SCAL.x);
ImGui::SetCursorPos(ImVec2(display_size.x - (450.f * SCAL.x), display_size.y - (88.f * SCAL.y)));
if (ImGui::Button(state ? "Select All" : "Clear All", ImVec2(224.f * SCAL.x, 44.f * SCAL.y))) {
const auto select_all = !common["select_all"].empty() ? common["select_all"].c_str() : "Select All";
if (ImGui::Button(state ? select_all : "Clear All", ImVec2(224.f * SCAL.x, 44.f * SCAL.y))) {
for (auto &content : contents_selected) {
if (state)
content.second = true;
@@ -587,8 +591,10 @@ void draw_content_manager(GuiState &gui, HostState &host) {
return cs.second;
}) != contents_selected.end();
ImGui::SameLine();
ImGui::SetWindowFontScale(1.5f * SCAL.x);
ImGui::PushStyleVar(ImGuiStyleVar_SelectableTextAlign, ImVec2(0.5f, 0.5f));
if (is_enable ? ImGui::Button("Delete", ImVec2(202.f * SCAL.x, 44.f * SCAL.y)) && get_size_selected_contents(gui, host) : ImGui::Selectable("Delete", false, ImGuiSelectableFlags_Disabled, ImVec2(194.f * SCAL.x, 36.f * SCAL.y)))
const auto delete_str = !common["delete"].empty() ? common["delete"].c_str() : "Delete";
if (is_enable ? ImGui::Button(delete_str, ImVec2(202.f * SCAL.x, 44.f * SCAL.y)) && get_size_selected_contents(gui, host) : ImGui::Selectable(delete_str, false, ImGuiSelectableFlags_Disabled, ImVec2(194.f * SCAL.x, 36.f * SCAL.y)))
popup = true;
ImGui::PopStyleVar();
}
+11 -4
View File
@@ -388,6 +388,11 @@ static const char *const ymonth[] = {
"July", "August", "September", "October", "November", "December"
};
static const char *const small_ymonth[] = {
"january", "february", "march", "april", "may", "june",
"july", "august", "september", "october", "november", "december"
};
static const char *const wday[] = {
"sunday", "monday", "tuesday", "wednesday",
"thursday", "friday", "saturday"
@@ -402,15 +407,17 @@ std::map<std::string, std::string> get_date_time(GuiState &gui, HostState &host,
const auto month = date_time.tm_mon + 1;
switch (gui.users[host.io.user_id].date_format) {
case DateFormat::YYYY_MM_DD:
date_time_str["detail-date"] = fmt::format("{} {} ({})", month_str, date_time.tm_mday, day_str);
date_time_str["date-start"] = fmt::format("{} {} ({})", month_str, date_time.tm_mday, day_str);
date_time_str["date"] = fmt::format("{}/{}/{}", year, month, date_time.tm_mday);
break;
case DateFormat::DD_MM_YYYY:
date_time_str["detail-date"] = fmt::format("{} {} ({})", date_time.tm_mday, month_str, day_str);
case DateFormat::DD_MM_YYYY: {
const auto small_month_str = !gui.lang.common.small_ymonth.empty() ? gui.lang.common.small_ymonth[date_time.tm_mon] : small_ymonth[date_time.tm_mon];
date_time_str["date-start"] = fmt::format("{} {} ({})", date_time.tm_mday, small_month_str, day_str);
date_time_str["date"] = fmt::format("{}/{}/{}", date_time.tm_mday, month, year);
break;
}
case DateFormat::MM_DD_YYYY:
date_time_str["detail-date"] = fmt::format("{} {} ({})", month_str, date_time.tm_mday, day_str);
date_time_str["date-start"] = fmt::format("{} {} ({})", month_str, date_time.tm_mday, day_str);
date_time_str["date"] = fmt::format("{}/{}/{}", month, date_time.tm_mday, year);
break;
default: break;
+10 -8
View File
@@ -122,18 +122,19 @@ static bool set_notice_info(GuiState &gui, HostState &host, const NoticeList &in
}
init_notice_icon(gui, host, content_path / "sce_sys/icon0.png", info);
} else {
auto common = gui.lang.common.common;
switch (static_cast<np::trophy::SceNpTrophyGrade>(std::stoi(info.group))) {
case np::trophy::SceNpTrophyGrade::SCE_NP_TROPHY_GRADE_PLATINUM:
name = "(Platinum) ";
name = fmt::format("({}) ", !common["platinium"].empty() ? common["platinium"] : "Platinum");
break;
case np::trophy::SceNpTrophyGrade::SCE_NP_TROPHY_GRADE_GOLD:
name = ("Gold");
name = fmt::format("({}) ", !common["gold"].empty() ? common["gold"] : "Gold");
break;
case np::trophy::SceNpTrophyGrade::SCE_NP_TROPHY_GRADE_SILVER:
name = "(Silver) ";
name = fmt::format("({}) ", !common["silver"].empty() ? common["silver"] : "Silver");
break;
case np::trophy::SceNpTrophyGrade::SCE_NP_TROPHY_GRADE_BRONZE:
name = "(Bronze) ";
name = fmt::format("({}) ", !common["bronze"].empty() ? common["bronze"] : "Bronze");
break;
default: break;
}
@@ -458,14 +459,15 @@ static void draw_notice_info(GuiState &gui, HostState &host) {
if (ImGui::BeginPopupModal("Delete All", nullptr, ImGuiWindowFlags_NoDecoration | ImGuiWindowFlags_NoSavedSettings)) {
ImGui::SetWindowFontScale(1.4f * SCAL.x);
const auto notif_deleted = !indicator["notif_deleted"].empty() ? indicator["notif_deleted"].c_str() : "The notifications will be deleted.";
auto common = host.common_dialog.lang.common;
ImGui::SetCursorPos(ImVec2((DELETE_POPUP_SIZE.x / 2.f) - (ImGui::CalcTextSize(notif_deleted).x / 2.f), (DELETE_POPUP_SIZE.y / 2.f) - (46.f * SCAL.y)));
ImGui::TextColored(GUI_COLOR_TEXT, "%s", notif_deleted);
ImGui::SetCursorPos(ImVec2((DELETE_POPUP_SIZE.x / 2) - (BUTTON_SIZE.x + (20.f * SCAL.x)), DELETE_POPUP_SIZE.y - BUTTON_SIZE.y - (24.0f * SCAL.y)));
if (ImGui::Button("Cancel", BUTTON_SIZE) || ImGui::IsKeyPressed(host.cfg.keyboard_button_circle)) {
if (ImGui::Button(!common["cancel"].empty() ? common["cancel"].c_str() : "Cancel", BUTTON_SIZE) || ImGui::IsKeyPressed(host.cfg.keyboard_button_circle)) {
ImGui::CloseCurrentPopup();
}
ImGui::SameLine(0.f, 20.f);
if (ImGui::Button("Ok", BUTTON_SIZE) || ImGui::IsKeyPressed(host.cfg.keyboard_button_cross)) {
if (ImGui::Button("OK", BUTTON_SIZE) || ImGui::IsKeyPressed(host.cfg.keyboard_button_cross)) {
notice_info.clear();
for (auto &notice : gui.notice_info_icon)
notice.second = {};
@@ -510,11 +512,11 @@ void draw_information_bar(GuiState &gui, HostState &host) {
const auto icon_scal_pos = ImVec2((display_size.x / 2.f) - (16.f * SCAL.x) - (decal_icon_pos * SCAL.x) + (a * (38.f * SCAL.x)), display_size.y - (544.f * SCAL.y));
const auto icon_scal_size = ImVec2(icon_scal_pos.x + (32.0f * SCAL.x), icon_scal_pos.y + (32.f * SCAL.y));
if (get_app_icon(gui, gui.apps_list_opened[a])->first == gui.apps_list_opened[a])
ImGui::GetForegroundDrawList()->AddImageRounded(get_app_icon(gui, gui.apps_list_opened[a])->second, icon_scal_pos, icon_scal_size, ImVec2(0, 0), ImVec2(1, 1), IM_COL32_WHITE, 15.f, ImDrawCornerFlags_All);
ImGui::GetForegroundDrawList()->AddImageRounded(get_app_icon(gui, gui.apps_list_opened[a])->second, icon_scal_pos, icon_scal_size, ImVec2(0, 0), ImVec2(1, 1), IM_COL32_WHITE, 15.f * SCAL.x, ImDrawCornerFlags_All);
else
ImGui::GetForegroundDrawList()->AddRectFilled(icon_scal_pos, icon_scal_size, IM_COL32_WHITE, 0.f, ImDrawCornerFlags_All);
if ((gui.current_app_selected < 0) || (gui.apps_list_opened[gui.current_app_selected] != gui.apps_list_opened[a]))
ImGui::GetForegroundDrawList()->AddRectFilled(icon_scal_pos, icon_scal_size, IM_COL32(0.f, 0.f, 0.f, 140.f), 15.f, ImDrawCornerFlags_All);
ImGui::GetForegroundDrawList()->AddRectFilled(icon_scal_pos, icon_scal_size, IM_COL32(0.f, 0.f, 0.f, 140.f), 15.f * SCAL.x, ImDrawCornerFlags_All);
}
}
+18 -1
View File
@@ -132,6 +132,15 @@ void init_lang(GuiState &gui, HostState &host) {
// Common
if (!lang_xml.child("common").empty()) {
const auto common = lang_xml.child("common");
auto &common_dialog = host.common_dialog.lang.common;
common_dialog["cancel"] = common.child("cancel").text().as_string();
common_dialog["delete"] = common.child("delete").text().as_string();
common_dialog["file_corrupted"] = common.child("file_corrupted").text().as_string();
common_dialog["no"] = common.child("no").text().as_string();
common_dialog["select_all"] = common.child("select_all").text().as_string();
common_dialog["select"] = common.child("select").text().as_string();
common_dialog["please_wait"] = common.child("please_wait").text().as_string();
common_dialog["yes"] = common.child("yes").text().as_string();
auto &lang_common = gui.lang.common;
if (!common.child("wday").empty()) {
for (const auto &day : common.child("wday"))
@@ -141,8 +150,17 @@ void init_lang(GuiState &gui, HostState &host) {
for (const auto &month : common.child("ymonth"))
lang_common.ymonth.push_back(month.text().as_string());
}
if (!common.child("small_ymonth").empty()) {
for (const auto &month : common.child("small_ymonth"))
lang_common.small_ymonth.push_back(month.text().as_string());
}
lang_common.common["hidden_trophy"] = common.child("hidden_trophy").text().as_string();
lang_common.common["one_hour_ago"] = common.child("one_hour_ago").text().as_string();
lang_common.common["one_minute_ago"] = common.child("one_minute_ago").text().as_string();
lang_common.common["bronze"] = common.child("bronze").text().as_string();
lang_common.common["gold"] = common.child("gold").text().as_string();
lang_common.common["platinum"] = common.child("platinum").text().as_string();
lang_common.common["silver"] = common.child("silver").text().as_string();
lang_common.common["hours_ago"] = common.child("hours_ago").text().as_string();
lang_common.common["minutes_ago"] = common.child("minutes_ago").text().as_string();
}
@@ -159,7 +177,6 @@ void init_lang(GuiState &gui, HostState &host) {
const auto save_data = dialog.child("save_data");
if (!save_data.child("delete").empty()) {
const auto delete_child = save_data.child("delete");
//lang_save_data["delete"] = delete_child.attribute("name").as_string();
lang_save_data["cancel_deleting"] = delete_child.child("cancel_deleting").text().as_string();
lang_save_data["deletion_complete"] = delete_child.child("deletion_complete").text().as_string();
lang_save_data["delete_saved_data"] = delete_child.child("delete_saved_data").text().as_string();
+10 -9
View File
@@ -519,7 +519,7 @@ void draw_start_screen(GuiState &gui, HostState &host) {
const auto SCAL_DATE_FONT_SIZE = DATE_FONT_SIZE / ImGui::GetFontSize();
auto DATE_TIME = get_date_time(gui, host, const_cast<tm &>(local));
const auto DATE_STR = DATE_TIME["detail-date"];
const auto DATE_STR = DATE_TIME["date-start"];
const auto CALC_DATE_SIZE = ImGui::CalcTextSize(DATE_STR.c_str());
const auto DATE_SIZE = ImVec2(CALC_DATE_SIZE.x * SCAL_DATE_FONT_SIZE, CALC_DATE_SIZE.y * SCAL_DATE_FONT_SIZE * SCAL_PIX_DATE_FONT);
const auto DATE_POS = ImVec2(display_size.x - (start_param["dateLayout"] == "2" ? date["date"].x + DATE_SIZE.x : date["date"].x) * SCAL.x, display_size.y - (date["date"].y * SCAL.y));
@@ -606,6 +606,7 @@ void draw_settings(GuiState &gui, HostState &host) {
const auto is_background = gui.apps_background.find("NPXS10015") != gui.apps_background.end();
auto lang = gui.lang.settings;
const auto is_lang = !lang.empty();
auto common = host.common_dialog.lang.common;
ImGui::SetNextWindowPos(ImVec2(0, MENUBAR_HEIGHT), ImGuiCond_Always);
ImGui::SetNextWindowSize(WINDOW_SIZE, ImGuiCond_Always);
@@ -663,6 +664,7 @@ void draw_settings(GuiState &gui, HostState &host) {
ImGui::Separator();
} else if (settings_menu == "theme_background") {
// Themes & Backgrounds
const auto select = !common["select"].empty() ? common["select"].c_str() : "Select";
if (menu.empty()) {
title = is_lang ? lang["theme_background"] : "Theme & Background";
ImGui::SetWindowFontScale(1.2f);
@@ -754,7 +756,7 @@ void draw_settings(GuiState &gui, HostState &host) {
}
ImGui::SetWindowFontScale(1.2f);
ImGui::SetCursorPos(ImVec2((SIZE_LIST.x / 2.f) - (BUTTON_SIZE.x / 2.f), (SIZE_LIST.y - 82.f) - BUTTON_SIZE.y));
if ((theme_selected != gui.users[host.io.user_id].theme_id) && (ImGui::Button("Select", BUTTON_SIZE) || ImGui::IsKeyPressed(host.cfg.keyboard_button_cross))) {
if ((theme_selected != gui.users[host.io.user_id].theme_id) && (ImGui::Button(select, BUTTON_SIZE) || ImGui::IsKeyPressed(host.cfg.keyboard_button_cross))) {
gui.users[host.io.user_id].start_path.clear();
if (init_theme(gui, host, theme_selected)) {
gui.users[host.io.user_id].theme_id = theme_selected;
@@ -790,10 +792,10 @@ void draw_settings(GuiState &gui, HostState &host) {
ImGui::TextColored(GUI_COLOR_TEXT, delete_str.c_str());
ImGui::SetCursorPos(ImVec2(50.f, POPUP_SIZE.y - (22.f + BUTTON_SIZE.y)));
ImGui::PushStyleVar(ImGuiStyleVar_FrameRounding, 10.f);
if (ImGui::Button("Cancel", BUTTON_SIZE) || ImGui::IsKeyPressed(host.cfg.keyboard_button_circle))
if (ImGui::Button(!common["cancel"].empty() ? common["cancel"].c_str() : "Cancel", BUTTON_SIZE) || ImGui::IsKeyPressed(host.cfg.keyboard_button_circle))
popup.clear();
ImGui::SetCursorPos(ImVec2(ImGui::GetWindowSize().x - 50.f - BUTTON_SIZE.x, POPUP_SIZE.y - (22.f + BUTTON_SIZE.y)));
if (ImGui::Button("Ok", BUTTON_SIZE) || ImGui::IsKeyPressed(host.cfg.keyboard_button_cross)) {
if (ImGui::Button("OK", BUTTON_SIZE) || ImGui::IsKeyPressed(host.cfg.keyboard_button_cross)) {
if (theme_selected == gui.users[host.io.user_id].theme_id) {
gui.users[host.io.user_id].theme_id = "default";
gui.users[host.io.user_id].start_path.clear();
@@ -926,7 +928,7 @@ void draw_settings(GuiState &gui, HostState &host) {
ImGui::Image(gui.themes_preview[gui.users[host.io.user_id].theme_id]["start"], SIZE_PREVIEW);
}
ImGui::SetCursorPos(SELECT_BUTTON_POS);
if ((gui.users[host.io.user_id].start_type != "theme") && (ImGui::Button("Select", BUTTON_SIZE) || ImGui::IsKeyPressed(host.cfg.keyboard_button_cross))) {
if ((gui.users[host.io.user_id].start_type != "theme") && (ImGui::Button(select, BUTTON_SIZE) || ImGui::IsKeyPressed(host.cfg.keyboard_button_cross))) {
gui.users[host.io.user_id].start_path.clear();
gui.users[host.io.user_id].start_type = "theme";
init_theme_start_background(gui, host, gui.users[host.io.user_id].theme_id);
@@ -950,7 +952,7 @@ void draw_settings(GuiState &gui, HostState &host) {
ImGui::Image(gui.themes_preview["default"]["start"], SIZE_PREVIEW);
}
ImGui::SetCursorPos(SELECT_BUTTON_POS);
if ((gui.users[host.io.user_id].start_type != "default") && (ImGui::Button("Select", BUTTON_SIZE) || ImGui::IsKeyPressed(host.cfg.keyboard_button_cross))) {
if ((gui.users[host.io.user_id].start_type != "default") && (ImGui::Button(select, BUTTON_SIZE) || ImGui::IsKeyPressed(host.cfg.keyboard_button_cross))) {
gui.users[host.io.user_id].start_path.clear();
init_theme_start_background(gui, host, "default");
gui.users[host.io.user_id].start_type = "default";
@@ -1090,7 +1092,6 @@ void draw_settings(GuiState &gui, HostState &host) {
title = is_lang ? lang["language"] : "Language";
ImGui::SetWindowFontScale(1.2f);
ImGui::PushStyleVar(ImGuiStyleVar_SelectableTextAlign, ImVec2(0.f, 0.5f));
if (ImGui::Selectable(is_lang ? lang["system_language"].c_str() : "System Language", false, ImGuiSelectableFlags_None, ImVec2(0.f, SIZE_SELECT)))
menu = "select_language";
ImGui::Separator();
@@ -1109,7 +1110,6 @@ void draw_settings(GuiState &gui, HostState &host) {
ImGui::PushStyleVar(ImGuiStyleVar_SelectableTextAlign, ImVec2(0.f, 0.5f));
ImGui::Columns(2, nullptr, false);
ImGui::SetColumnWidth(0, 30.f);
const auto current_sys_lang = LIST_SYS_LANG[host.cfg.sys_lang];
for (const auto &sys_lang : LIST_SYS_LANG) {
ImGui::PushID(sys_lang.c_str());
@@ -1154,6 +1154,7 @@ void draw_settings(GuiState &gui, HostState &host) {
ImGui::EndChild();
ImGui::PopStyleVar();
// Back
ImGui::SetWindowFontScale(1.00f);
ImGui::SetCursorPos(ImVec2(6.f, display_size.y - (84.f * SCAL.y)));
if (ImGui::Button("Back", ImVec2(64.f * SCAL.x, 40.f * SCAL.y))) {
@@ -1192,7 +1193,7 @@ void draw_settings(GuiState &gui, HostState &host) {
if (ImGui::BeginPopup("...")) {
if (ImGui::MenuItem(is_lang ? lang["information"].c_str() : "Information"))
popup = "information";
if (ImGui::MenuItem("Delete"))
if (ImGui::MenuItem(!common["delete"].empty() ? common["delete"].c_str() : "Delete"))
popup = "delete";
ImGui::EndPopup();
}
+2 -1
View File
@@ -71,6 +71,7 @@ static bool change_pref_location(const std::string &input_path, const std::strin
}
static void reset_emulator(GuiState &gui, HostState &host) {
gui.live_area.app_selector = false;
get_modules_list(gui, host);
refresh_app_list(gui, host);
get_sys_apps_title(gui, host);
@@ -319,7 +320,7 @@ void draw_settings_dialog(GuiState &gui, HostState &host) {
ImGui::SetTooltip("Check the box to enable app list in grid mode.");
if (!host.cfg.apps_list_grid) {
ImGui::Spacing();
ImGui::SliderInt("App Icon Size", &host.cfg.icon_size, 32, 128);
ImGui::SliderInt("App Icon Size", &host.cfg.icon_size, 64, 128);
if (ImGui::IsItemHovered())
ImGui::SetTooltip("Select your preferred icon size.");
}
+11 -7
View File
@@ -332,19 +332,20 @@ static void get_trophy_list(GuiState &gui, HostState &host, const std::string &n
gui.trophy_list[trophy_id].init(gui.imgui_state.get(), data, width, height);
stbi_image_free(data);
auto common = gui.lang.common.common;
const auto trophy_type = np_com_id_info[np_com_id].context.trophy_kinds[std::stoi(trophy_id)];
switch (trophy_type) {
case SceNpTrophyGrade::SCE_NP_TROPHY_GRADE_PLATINUM:
trophy_info[trophy_id].type["detail"] = "Platinum";
trophy_info[trophy_id].type["detail"] = !common["platinum"].empty() ? common["platinum"] : "Platinum";
break;
case SceNpTrophyGrade::SCE_NP_TROPHY_GRADE_GOLD:
trophy_info[trophy_id].type["detail"] = "Gold";
trophy_info[trophy_id].type["detail"] = !common["gold"].empty() ? common["gold"] : "Gold";
break;
case SceNpTrophyGrade::SCE_NP_TROPHY_GRADE_SILVER:
trophy_info[trophy_id].type["detail"] = "Silver";
trophy_info[trophy_id].type["detail"] = !common["silver"].empty() ? common["silver"] : "Silver";
break;
case SceNpTrophyGrade::SCE_NP_TROPHY_GRADE_BRONZE:
trophy_info[trophy_id].type["detail"] = "Bronze";
trophy_info[trophy_id].type["detail"] = !common["bronze"].empty() ? common["bronze"] : "Bronze";
break;
default:
LOG_ERROR("Trophy id {} unknown type: {}", trophy_id, (SceInt32)trophy_type);
@@ -450,6 +451,9 @@ void draw_trophy_collection(GuiState &gui, HostState &host) {
set_scroll_pos = false;
}
auto common = gui.lang.common.common;
const auto hidden_trophy_str = !common["hidden_trophy"].empty() ? common["hidden_trophy"].c_str() : "Hidden Trophy";
if (np_com_id_selected.empty()) {
// Ask Delete Trophy Popup
if (!delete_np_com_id.empty()) {
@@ -670,7 +674,7 @@ void draw_trophy_collection(GuiState &gui, HostState &host) {
ImGui::NextColumn();
ImGui::PushStyleVar(ImGuiStyleVar_SelectableTextAlign, ImVec2(0.f, 0.2f));
const auto name_pos = ImGui::GetCursorPosY();
if (ImGui::Selectable(hidden_trophy ? "Hidden Trophy" : trophy.name.c_str(), false, ImGuiSelectableFlags_SpanAllColumns, ImVec2(0.f, SIZE_TROPHY_LIST.y)))
if (ImGui::Selectable(hidden_trophy ? hidden_trophy_str : trophy.name.c_str(), false, ImGuiSelectableFlags_SpanAllColumns, ImVec2(0.f, SIZE_TROPHY_LIST.y)))
trophy_id_selected = trophy.id;
ImGui::PopStyleVar();
if (!hidden_trophy) {
@@ -691,10 +695,10 @@ void draw_trophy_collection(GuiState &gui, HostState &host) {
ImGui::TextColored(GUI_COLOR_TEXT, "Lock");
}
const auto hidden_trophy = (!trophy_info[trophy_id_selected].earned && (trophy_info[trophy_id_selected].hidden == "yes"));
const auto CALC_NAME = ImGui::CalcTextSize(hidden_trophy ? "Hidden Trophy" : trophy_info[trophy_id_selected].name.c_str(), nullptr, false, SIZE_INFO.x - SIZE_TROPHY_LIST.x - 48.f).y / 2.f;
const auto CALC_NAME = ImGui::CalcTextSize(hidden_trophy ? hidden_trophy_str : trophy_info[trophy_id_selected].name.c_str(), nullptr, false, SIZE_INFO.x - SIZE_TROPHY_LIST.x - 48.f).y / 2.f;
ImGui::SetCursorPos(ImVec2(SIZE_TROPHY_LIST.x + 20.f, (SIZE_TROPHY_LIST.y / 2.f) - CALC_NAME));
ImGui::PushTextWrapPos(ImGui::GetCursorPosX() + SIZE_INFO.x - SIZE_TROPHY_LIST.x - (48.f * SCAL.x));
ImGui::TextColored(GUI_COLOR_TEXT, "%s", hidden_trophy ? "Hidden Trophy" : trophy_info[trophy_id_selected].name.c_str());
ImGui::TextColored(GUI_COLOR_TEXT, "%s", hidden_trophy ? hidden_trophy_str : trophy_info[trophy_id_selected].name.c_str());
ImGui::PopTextWrapPos();
ImGui::SetCursorPosY(SIZE_TROPHY_LIST.y + (25.f * SCAL.y));
ImGui::TextColored(GUI_COLOR_TEXT, "%s", GRADE);
+5 -4
View File
@@ -59,26 +59,27 @@ static void draw_trophy_unlocked(GuiState &gui, HostState &host, NpTrophyUnlockC
ImGui::Image((ImTextureID)gui.trophy_window_icon, ImVec2(TROPHY_WINDOW_ICON_SIZE, TROPHY_WINDOW_ICON_SIZE));
ImGui::NextColumn();
auto common = gui.lang.common.common;
std::string trophy_kind_s = "?";
switch (callback_data.trophy_kind) {
case np::trophy::SceNpTrophyGrade::SCE_NP_TROPHY_GRADE_PLATINUM: {
trophy_kind_s = "Platinum";
trophy_kind_s = !common["platinium"].empty() ? common["platinum"] : "Platinum";
break;
}
case np::trophy::SceNpTrophyGrade::SCE_NP_TROPHY_GRADE_GOLD: {
trophy_kind_s = "Gold";
trophy_kind_s = !common["gold"].empty() ? common["gold"] : "Gold";
break;
}
case np::trophy::SceNpTrophyGrade::SCE_NP_TROPHY_GRADE_SILVER: {
trophy_kind_s = "Silver";
trophy_kind_s = !common["silver"].empty() ? common["silver"] : "Silver";
break;
}
case np::trophy::SceNpTrophyGrade::SCE_NP_TROPHY_GRADE_BRONZE: {
trophy_kind_s = "Bronze";
trophy_kind_s = !common["bronze"].empty() ? common["bronze"] : "Bronze";
break;
}
@@ -201,6 +201,10 @@ EXPORT(int, sceMsgDialogInit, const Ptr<SceMsgDialogParam> param) {
host.common_dialog.msg.mode = p->mode;
host.common_dialog.msg.status = SCE_MSG_DIALOG_BUTTON_ID_INVALID;
auto common = host.common_dialog.lang.common;
const auto CANCEL = !common["cancel"].empty() ? common["cancel"] : "Cancel";
switch (p->mode) {
case SCE_MSG_DIALOG_MODE_USER_MSG:
up = p->userMsgParam.get(host.mem);
@@ -213,9 +217,9 @@ EXPORT(int, sceMsgDialogInit, const Ptr<SceMsgDialogParam> param) {
break;
case SCE_MSG_DIALOG_BUTTON_TYPE_YESNO:
host.common_dialog.msg.btn_num = 2;
host.common_dialog.msg.btn[0] = "Yes";
host.common_dialog.msg.btn[0] = !common["yes"].empty() ? common["yes"] : "Yes";
host.common_dialog.msg.btn_val[0] = SCE_MSG_DIALOG_BUTTON_ID_YES;
host.common_dialog.msg.btn[1] = "No";
host.common_dialog.msg.btn[1] = !common["no"].empty() ? common["no"] : "No";
host.common_dialog.msg.btn_val[1] = SCE_MSG_DIALOG_BUTTON_ID_NO;
break;
case SCE_MSG_DIALOG_BUTTON_TYPE_NONE:
@@ -225,12 +229,12 @@ EXPORT(int, sceMsgDialogInit, const Ptr<SceMsgDialogParam> param) {
host.common_dialog.msg.btn_num = 2;
host.common_dialog.msg.btn[0] = "OK";
host.common_dialog.msg.btn_val[0] = SCE_MSG_DIALOG_BUTTON_ID_OK;
host.common_dialog.msg.btn[1] = "Cancel";
host.common_dialog.msg.btn[1] = CANCEL;
host.common_dialog.msg.btn_val[1] = SCE_MSG_DIALOG_BUTTON_ID_NO;
break;
case SCE_MSG_DIALOG_BUTTON_TYPE_CANCEL:
host.common_dialog.msg.btn_num = 1;
host.common_dialog.msg.btn[0] = "Cancel";
host.common_dialog.msg.btn[0] = CANCEL;
host.common_dialog.msg.btn_val[0] = SCE_MSG_DIALOG_BUTTON_ID_INVALID;
break;
case SCE_MSG_DIALOG_BUTTON_TYPE_3BUTTONS:
@@ -260,18 +264,18 @@ EXPORT(int, sceMsgDialogInit, const Ptr<SceMsgDialogParam> param) {
case SCE_MSG_DIALOG_SYSMSG_TYPE_MAGNETIC_CALIBRATION:
host.common_dialog.msg.message = "Move away from the source of interference, or adjust the compass by moving your PS Vita system as shown below.";
host.common_dialog.msg.btn_num = 1;
host.common_dialog.msg.btn[0] = "Cancel";
host.common_dialog.msg.btn[0] = CANCEL;
host.common_dialog.msg.btn_val[0] = SCE_MSG_DIALOG_BUTTON_ID_INVALID;
break;
case SCE_MSG_DIALOG_SYSMSG_TYPE_MIC_DISABLED:
host.common_dialog.msg.message = "The microphone is disabled";
host.common_dialog.msg.btn_num = 1;
host.common_dialog.msg.btn[0] = "Cancel";
host.common_dialog.msg.btn[0] = CANCEL;
host.common_dialog.msg.btn_val[0] = SCE_MSG_DIALOG_BUTTON_ID_INVALID;
break;
case SCE_MSG_DIALOG_SYSMSG_TYPE_WAIT_CANCEL:
host.common_dialog.msg.message = "Please wait.";
host.common_dialog.msg.btn[0] = "Cancel";
host.common_dialog.msg.btn[0] = CANCEL;
host.common_dialog.msg.btn_val[0] = SCE_MSG_DIALOG_BUTTON_ID_NO;
host.common_dialog.msg.btn_num = 1;
break;
@@ -703,6 +707,7 @@ static void check_save_file(SceUID fd, std::vector<SceAppUtilSaveDataSlotParam>
}
static void handle_user_message(SceSaveDataDialogUserMessageParam *user_message, HostState &host) {
auto common = host.common_dialog.lang.common;
switch (user_message->buttonType) {
case SCE_SAVEDATA_DIALOG_BUTTON_TYPE_OK:
host.common_dialog.savedata.btn_num = 1;
@@ -711,9 +716,9 @@ static void handle_user_message(SceSaveDataDialogUserMessageParam *user_message,
break;
case SCE_SAVEDATA_DIALOG_BUTTON_TYPE_YESNO:
host.common_dialog.savedata.btn_num = 2;
host.common_dialog.savedata.btn[0] = "No";
host.common_dialog.savedata.btn[0] = !common["no"].empty() ? common["no"] : "No";
host.common_dialog.savedata.btn_val[0] = SCE_SAVEDATA_DIALOG_BUTTON_ID_NO;
host.common_dialog.savedata.btn[1] = "Yes";
host.common_dialog.savedata.btn[1] = !common["yes"].empty() ? common["yes"] : "Yes";
host.common_dialog.savedata.btn_val[1] = SCE_SAVEDATA_DIALOG_BUTTON_ID_YES;
break;
case SCE_SAVEDATA_DIALOG_BUTTON_TYPE_NONE:
@@ -725,6 +730,11 @@ static void handle_user_message(SceSaveDataDialogUserMessageParam *user_message,
static void handle_sys_message(SceSaveDataDialogSystemMessageParam *sys_message, HostState &host) {
auto lang = host.common_dialog.lang.save_data;
auto common = host.common_dialog.lang.common;
const auto NO = !common["no"].empty() ? common["no"] : "No";
const auto YES = !common["yes"].empty() ? common["yes"] : "Yes";
switch (sys_message->sysMsgType) {
case SCE_SAVEDATA_DIALOG_SYSMSG_TYPE_NODATA:
host.common_dialog.savedata.msg = !lang["no_saved_data"].empty() ? lang["no_saved_data"] : "There is no saved data.";
@@ -745,17 +755,17 @@ static void handle_sys_message(SceSaveDataDialogSystemMessageParam *sys_message,
break;
}
host.common_dialog.savedata.btn_num = 2;
host.common_dialog.savedata.btn[0] = "No";
host.common_dialog.savedata.btn[0] = NO;
host.common_dialog.savedata.btn_val[0] = SCE_SAVEDATA_DIALOG_BUTTON_ID_NO;
host.common_dialog.savedata.btn[1] = "Yes";
host.common_dialog.savedata.btn[1] = YES;
host.common_dialog.savedata.btn_val[1] = SCE_SAVEDATA_DIALOG_BUTTON_ID_YES;
break;
case SCE_SAVEDATA_DIALOG_SYSMSG_TYPE_OVERWRITE:
host.common_dialog.savedata.msg = !lang["overwrite_saved_data"].empty() ? lang["overwrite_saved_data"] : "Do you want to overwrite this saved data?";
host.common_dialog.savedata.btn_num = 2;
host.common_dialog.savedata.btn[0] = "No";
host.common_dialog.savedata.btn[0] = NO;
host.common_dialog.savedata.btn_val[0] = SCE_SAVEDATA_DIALOG_BUTTON_ID_NO;
host.common_dialog.savedata.btn[1] = "Yes";
host.common_dialog.savedata.btn[1] = YES;
host.common_dialog.savedata.btn_val[1] = SCE_SAVEDATA_DIALOG_BUTTON_ID_YES;
break;
case SCE_SAVEDATA_DIALOG_SYSMSG_TYPE_NOSPACE:
@@ -772,7 +782,7 @@ static void handle_sys_message(SceSaveDataDialogSystemMessageParam *sys_message,
host.common_dialog.savedata.msg = !lang["loading"].empty() ? lang["loading"] : "Loading...";
break;
case SCE_SAVEDATA_DIALOG_TYPE_DELETE:
host.common_dialog.savedata.msg = "Please Wait...";
host.common_dialog.savedata.msg = !common["please_wait"].empty() ? common["please_wait"] : "Please Wait...";
break;
}
break;
@@ -805,13 +815,13 @@ static void handle_sys_message(SceSaveDataDialogSystemMessageParam *sys_message,
break;
}
host.common_dialog.savedata.btn_num = 2;
host.common_dialog.savedata.btn[0] = "No";
host.common_dialog.savedata.btn[0] = NO;
host.common_dialog.savedata.btn_val[0] = SCE_SAVEDATA_DIALOG_BUTTON_ID_NO;
host.common_dialog.savedata.btn[1] = "Yes";
host.common_dialog.savedata.btn[1] = YES;
host.common_dialog.savedata.btn_val[1] = SCE_SAVEDATA_DIALOG_BUTTON_ID_YES;
break;
case SCE_SAVEDATA_DIALOG_SYSMSG_TYPE_FILE_CORRUPTED:
host.common_dialog.savedata.msg = "The file is corrupt";
host.common_dialog.savedata.msg = !common["file_corrupted"].empty() ? common["file_corrupted"] : "The file is corrupt";
host.common_dialog.savedata.btn_num = 1;
host.common_dialog.savedata.btn[0] = "OK";
host.common_dialog.savedata.btn_val[0] = SCE_SAVEDATA_DIALOG_BUTTON_ID_OK;
@@ -957,7 +967,7 @@ EXPORT(int, sceSaveDataDialogContinue, const Ptr<SceSaveDataDialogParam> param)
host.common_dialog.savedata.msg = !lang["loading"].empty() ? lang["loading"] : "Loading...";
break;
case SCE_SAVEDATA_DIALOG_TYPE_DELETE:
host.common_dialog.savedata.msg = "Please Wait.";
host.common_dialog.savedata.msg = !host.common_dialog.lang.common["please_wait"].empty() ? host.common_dialog.lang.common["please_wait"] : "Please Wait...";
break;
}
break;
@@ -1128,16 +1138,16 @@ EXPORT(int, sceSaveDataDialogInit, const Ptr<SceSaveDataDialogParam> param) {
if (list_param->listTitle.get(host.mem)) {
host.common_dialog.savedata.list_title = reinterpret_cast<const char *>(list_param->listTitle.get(host.mem));
} else {
auto lang = host.common_dialog.lang.save_data;
auto lang = host.common_dialog.lang;
switch (p->dispType) {
case SCE_SAVEDATA_DIALOG_TYPE_SAVE:
host.common_dialog.savedata.list_title = !lang["save"].empty() ? lang["save"] : "Save";
host.common_dialog.savedata.list_title = !lang.save_data["save"].empty() ? lang.save_data["save"] : "Save";
break;
case SCE_SAVEDATA_DIALOG_TYPE_LOAD:
host.common_dialog.savedata.list_title = !lang["load"].empty() ? lang["load"] : "Load";
host.common_dialog.savedata.list_title = !lang.save_data["load"].empty() ? lang.save_data["load"] : "Load";
break;
case SCE_SAVEDATA_DIALOG_TYPE_DELETE:
host.common_dialog.savedata.list_title = "Delete";
host.common_dialog.savedata.list_title = !lang.common["delete"].empty() ? lang.common["delete"] : "Delete";
break;
}
}