mirror of
https://github.com/hax4dazy/TinWoo.git
synced 2025-02-09 19:25:05 +01:00
add autoplay music option
This commit is contained in:
parent
9d1f29354f
commit
6f5437d7f5
@ -22,6 +22,7 @@ namespace inst::config {
|
|||||||
extern bool usbAck;
|
extern bool usbAck;
|
||||||
extern bool useTheme;
|
extern bool useTheme;
|
||||||
extern bool useSound;
|
extern bool useSound;
|
||||||
|
extern bool useMusic;
|
||||||
extern bool fixticket;
|
extern bool fixticket;
|
||||||
extern bool listoveride;
|
extern bool listoveride;
|
||||||
extern bool httpkeyboard;
|
extern bool httpkeyboard;
|
||||||
|
@ -175,6 +175,7 @@
|
|||||||
"ask_delete": "Frage ob installierte Titel gelöscht werden sollen",
|
"ask_delete": "Frage ob installierte Titel gelöscht werden sollen",
|
||||||
"auto_update": "Suche automatisch nach Updates für TinWoo",
|
"auto_update": "Suche automatisch nach Updates für TinWoo",
|
||||||
"useSound": "Nutzen von Benachrichtungstönen während Installation",
|
"useSound": "Nutzen von Benachrichtungstönen während Installation",
|
||||||
|
"useMusic": "Musik automatisch abspielen, wenn Tinwoo startet",
|
||||||
"fixticket": "Wandeln Sie temporäre Tickets in permanente Tickets um",
|
"fixticket": "Wandeln Sie temporäre Tickets in permanente Tickets um",
|
||||||
"listoveride": "Deaktivieren Sie die URL-Listenwarnung und die Dateibeschränkung",
|
"listoveride": "Deaktivieren Sie die URL-Listenwarnung und die Dateibeschränkung",
|
||||||
"usehttpkeyboard": "Verwenden Sie die Tastatur während der Installation des HTTP-Servers",
|
"usehttpkeyboard": "Verwenden Sie die Tastatur während der Installation des HTTP-Servers",
|
||||||
|
@ -175,6 +175,7 @@
|
|||||||
"ask_delete": "Ask to delete original files after installation",
|
"ask_delete": "Ask to delete original files after installation",
|
||||||
"auto_update": "Check for updates to TinWoo Installer automatically",
|
"auto_update": "Check for updates to TinWoo Installer automatically",
|
||||||
"useSound": "Use sound notifications during installs",
|
"useSound": "Use sound notifications during installs",
|
||||||
|
"useMusic": "Autoplay music when Tinwoo starts",
|
||||||
"fixticket": "Convert temporary tickets to permanent",
|
"fixticket": "Convert temporary tickets to permanent",
|
||||||
"listoveride": "Disable URL list warning and file limit",
|
"listoveride": "Disable URL list warning and file limit",
|
||||||
"usehttpkeyboard": "Use keyboard during http server installs",
|
"usehttpkeyboard": "Use keyboard during http server installs",
|
||||||
|
@ -175,6 +175,7 @@
|
|||||||
"ask_delete": "Solicitar eliminar los archivos originales después de la instalación",
|
"ask_delete": "Solicitar eliminar los archivos originales después de la instalación",
|
||||||
"auto_update": "Busca actualizaciones para TinWoo Installer automáticamente",
|
"auto_update": "Busca actualizaciones para TinWoo Installer automáticamente",
|
||||||
"useSound": "Usar notificaciones de sonido durante las instalaciones",
|
"useSound": "Usar notificaciones de sonido durante las instalaciones",
|
||||||
|
"useMusic": "Reproducción automática de música cuando se inicia Tinwoo",
|
||||||
"fixticket": "Convertir tiquetes temporales en permanentes",
|
"fixticket": "Convertir tiquetes temporales en permanentes",
|
||||||
"listoveride": "Deshabilitar advertencia de limite de elementos en el listado de un URL",
|
"listoveride": "Deshabilitar advertencia de limite de elementos en el listado de un URL",
|
||||||
"usehttpkeyboard": "Utilizar teclado durante instalaciones vía servidor HTTP",
|
"usehttpkeyboard": "Utilizar teclado durante instalaciones vía servidor HTTP",
|
||||||
|
@ -175,6 +175,7 @@
|
|||||||
"ask_delete": "Demande de suppression des fichiers originaux après l'installation",
|
"ask_delete": "Demande de suppression des fichiers originaux après l'installation",
|
||||||
"auto_update": "Vérifier les mises à jour de l'installateur TinWoo automatiquement",
|
"auto_update": "Vérifier les mises à jour de l'installateur TinWoo automatiquement",
|
||||||
"useSound": "Utiliser les notifications sonores lors des installations",
|
"useSound": "Utiliser les notifications sonores lors des installations",
|
||||||
|
"useMusic": "Lecture automatique de la musique au démarrage de Tinwoo",
|
||||||
"fixticket": "Convertir des billets temporaires en billets permanents",
|
"fixticket": "Convertir des billets temporaires en billets permanents",
|
||||||
"listoveride": "Désactiver l'avertissement de liste d'URL et la limite de fichiers",
|
"listoveride": "Désactiver l'avertissement de liste d'URL et la limite de fichiers",
|
||||||
"usehttpkeyboard": "Utiliser le clavier lors des installations du serveur http",
|
"usehttpkeyboard": "Utiliser le clavier lors des installations du serveur http",
|
||||||
|
@ -175,6 +175,7 @@
|
|||||||
"ask_delete": "Chiedi di cancellare i file originale dopo l'installazione",
|
"ask_delete": "Chiedi di cancellare i file originale dopo l'installazione",
|
||||||
"auto_update": "Controlla aggiornamenti di TinWoo Installer automaticamente",
|
"auto_update": "Controlla aggiornamenti di TinWoo Installer automaticamente",
|
||||||
"useSound": "Utilizza notifiche sonore durante le installazioni",
|
"useSound": "Utilizza notifiche sonore durante le installazioni",
|
||||||
|
"useMusic": "Riproduci automaticamente la musica all'avvio di Tinwoo",
|
||||||
"fixticket": "Converti i biglietti temporanei in permanenti",
|
"fixticket": "Converti i biglietti temporanei in permanenti",
|
||||||
"listoveride": "Disabilita l'avviso dell'elenco degli URL e il limite dei file",
|
"listoveride": "Disabilita l'avviso dell'elenco degli URL e il limite dei file",
|
||||||
"usehttpkeyboard": "Utilizzare la tastiera durante le installazioni del server http",
|
"usehttpkeyboard": "Utilizzare la tastiera durante le installazioni del server http",
|
||||||
|
@ -175,6 +175,7 @@
|
|||||||
"ask_delete": "インストール後に元のファイルを削除する",
|
"ask_delete": "インストール後に元のファイルを削除する",
|
||||||
"auto_update": "TinWooのアップデートを自動的に確認する",
|
"auto_update": "TinWooのアップデートを自動的に確認する",
|
||||||
"useSound": "インストール時にサウンドで通知する",
|
"useSound": "インストール時にサウンドで通知する",
|
||||||
|
"useMusic": "Tinwoo の起動時に音楽を自動再生",
|
||||||
"fixticket": "一時的なチケットを永続的なチケットに変換する",
|
"fixticket": "一時的なチケットを永続的なチケットに変換する",
|
||||||
"listoveride": "URL リストの警告とファイル制限を無効にする",
|
"listoveride": "URL リストの警告とファイル制限を無効にする",
|
||||||
"usehttpkeyboard": "httpサーバーのインストール中にキーボードを使用する",
|
"usehttpkeyboard": "httpサーバーのインストール中にキーボードを使用する",
|
||||||
|
@ -175,6 +175,7 @@
|
|||||||
"ask_delete": "Спрашивать разрешения удалить исходные файлы после установки",
|
"ask_delete": "Спрашивать разрешения удалить исходные файлы после установки",
|
||||||
"auto_update": "Автоматически проверять наличие обновлений",
|
"auto_update": "Автоматически проверять наличие обновлений",
|
||||||
"useSound": "Используйте звуковые уведомления во время установки",
|
"useSound": "Используйте звуковые уведомления во время установки",
|
||||||
|
"useMusic": "Автовоспроизведение музыки при запуске Tinwoo",
|
||||||
"fixticket": "Превратить временные билеты в постоянные",
|
"fixticket": "Превратить временные билеты в постоянные",
|
||||||
"listoveride": "Отключить предупреждение списка URL-адресов и ограничение количества файлов",
|
"listoveride": "Отключить предупреждение списка URL-адресов и ограничение количества файлов",
|
||||||
"usehttpkeyboard": "Используйте клавиатуру во время установки http-сервера",
|
"usehttpkeyboard": "Используйте клавиатуру во время установки http-сервера",
|
||||||
|
@ -175,6 +175,7 @@
|
|||||||
"ask_delete": "在安裝完成後,詢問是否刪除原始檔案",
|
"ask_delete": "在安裝完成後,詢問是否刪除原始檔案",
|
||||||
"auto_update": "自動檢查Tinwoo Installer的更新版本",
|
"auto_update": "自動檢查Tinwoo Installer的更新版本",
|
||||||
"useSound": "在安裝過程中使用音效提醒進度",
|
"useSound": "在安裝過程中使用音效提醒進度",
|
||||||
|
"useMusic": "Tinwoo 啟動時自動播放音樂",
|
||||||
"fixticket": "將臨時門票轉換為永久門票",
|
"fixticket": "將臨時門票轉換為永久門票",
|
||||||
"listoveride": "禁用 URL 列表警告和文件限制",
|
"listoveride": "禁用 URL 列表警告和文件限制",
|
||||||
"usehttpkeyboard": "在 http 服務器安裝期間使用鍵盤",
|
"usehttpkeyboard": "在 http 服務器安裝期間使用鍵盤",
|
||||||
|
@ -285,7 +285,7 @@ namespace inst::ui {
|
|||||||
}
|
}
|
||||||
this->Add(this->optionMenu);
|
this->Add(this->optionMenu);
|
||||||
this->AddRenderCallback(mainMenuThread);
|
this->AddRenderCallback(mainMenuThread);
|
||||||
playmusic();
|
if (inst::config::useMusic) playmusic();
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainPage::installMenuItem_Click() {
|
void MainPage::installMenuItem_Click() {
|
||||||
|
@ -191,6 +191,11 @@ namespace inst::ui {
|
|||||||
useSoundOption->SetColor(COLOR("#FFFFFFFF"));
|
useSoundOption->SetColor(COLOR("#FFFFFFFF"));
|
||||||
useSoundOption->SetIcon(this->getMenuOptionIcon(inst::config::useSound));
|
useSoundOption->SetIcon(this->getMenuOptionIcon(inst::config::useSound));
|
||||||
this->menu->AddItem(useSoundOption);
|
this->menu->AddItem(useSoundOption);
|
||||||
|
|
||||||
|
auto useMusicOption = pu::ui::elm::MenuItem::New("options.menu_items.useMusic"_lang);
|
||||||
|
useMusicOption->SetColor(COLOR("#FFFFFFFF"));
|
||||||
|
useMusicOption->SetIcon(this->getMenuOptionIcon(inst::config::useMusic));
|
||||||
|
this->menu->AddItem(useMusicOption);
|
||||||
|
|
||||||
auto fixticket = pu::ui::elm::MenuItem::New("options.menu_items.fixticket"_lang);
|
auto fixticket = pu::ui::elm::MenuItem::New("options.menu_items.fixticket"_lang);
|
||||||
fixticket->SetColor(COLOR("#FFFFFFFF"));
|
fixticket->SetColor(COLOR("#FFFFFFFF"));
|
||||||
@ -217,12 +222,10 @@ namespace inst::ui {
|
|||||||
ThemeMenuOption->SetIcon("romfs:/images/icons/thememenu.png");
|
ThemeMenuOption->SetIcon("romfs:/images/icons/thememenu.png");
|
||||||
this->menu->AddItem(ThemeMenuOption);
|
this->menu->AddItem(ThemeMenuOption);
|
||||||
|
|
||||||
//
|
|
||||||
auto ThemeUrlOption = pu::ui::elm::MenuItem::New("theme.theme_url"_lang + inst::util::shortenString(inst::config::httplastUrl2, 42, false));
|
auto ThemeUrlOption = pu::ui::elm::MenuItem::New("theme.theme_url"_lang + inst::util::shortenString(inst::config::httplastUrl2, 42, false));
|
||||||
ThemeUrlOption->SetColor(COLOR("#FFFFFFFF"));
|
ThemeUrlOption->SetColor(COLOR("#FFFFFFFF"));
|
||||||
ThemeUrlOption->SetIcon("romfs:/images/icons/themeurl.png");
|
ThemeUrlOption->SetIcon("romfs:/images/icons/themeurl.png");
|
||||||
this->menu->AddItem(ThemeUrlOption);
|
this->menu->AddItem(ThemeUrlOption);
|
||||||
//
|
|
||||||
|
|
||||||
auto SigPatch = pu::ui::elm::MenuItem::New("main.menu.sig"_lang);
|
auto SigPatch = pu::ui::elm::MenuItem::New("main.menu.sig"_lang);
|
||||||
SigPatch->SetColor(COLOR("#FFFFFFFF"));
|
SigPatch->SetColor(COLOR("#FFFFFFFF"));
|
||||||
@ -342,6 +345,17 @@ namespace inst::ui {
|
|||||||
inst::config::setConfig();
|
inst::config::setConfig();
|
||||||
break;
|
break;
|
||||||
case 6:
|
case 6:
|
||||||
|
if (inst::config::useMusic) {
|
||||||
|
inst::config::useMusic = false;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
inst::config::useMusic = true;
|
||||||
|
}
|
||||||
|
this->setMenuText();
|
||||||
|
this->menu->SetSelectedIndex(index);
|
||||||
|
inst::config::setConfig();
|
||||||
|
break;
|
||||||
|
case 7:
|
||||||
if (inst::config::fixticket) {
|
if (inst::config::fixticket) {
|
||||||
inst::config::fixticket = false;
|
inst::config::fixticket = false;
|
||||||
}
|
}
|
||||||
@ -352,7 +366,7 @@ namespace inst::ui {
|
|||||||
this->menu->SetSelectedIndex(index);
|
this->menu->SetSelectedIndex(index);
|
||||||
inst::config::setConfig();
|
inst::config::setConfig();
|
||||||
break;
|
break;
|
||||||
case 7:
|
case 8:
|
||||||
if (inst::config::listoveride) {
|
if (inst::config::listoveride) {
|
||||||
inst::config::listoveride = false;
|
inst::config::listoveride = false;
|
||||||
}
|
}
|
||||||
@ -363,7 +377,7 @@ namespace inst::ui {
|
|||||||
this->menu->SetSelectedIndex(index);
|
this->menu->SetSelectedIndex(index);
|
||||||
inst::config::setConfig();
|
inst::config::setConfig();
|
||||||
break;
|
break;
|
||||||
case 8:
|
case 9:
|
||||||
if (inst::config::httpkeyboard) {
|
if (inst::config::httpkeyboard) {
|
||||||
inst::config::httpkeyboard = false;
|
inst::config::httpkeyboard = false;
|
||||||
}
|
}
|
||||||
@ -374,20 +388,20 @@ namespace inst::ui {
|
|||||||
this->menu->SetSelectedIndex(index);
|
this->menu->SetSelectedIndex(index);
|
||||||
inst::config::setConfig();
|
inst::config::setConfig();
|
||||||
break;
|
break;
|
||||||
case 9:
|
case 10:
|
||||||
thememessage();
|
thememessage();
|
||||||
inst::config::setConfig();
|
inst::config::setConfig();
|
||||||
this->setMenuText();
|
this->setMenuText();
|
||||||
this->menu->SetSelectedIndex(index);
|
this->menu->SetSelectedIndex(index);
|
||||||
break;
|
break;
|
||||||
case 10:
|
case 11:
|
||||||
if (inst::util::getIPAddress() == "1.0.0.127") {
|
if (inst::util::getIPAddress() == "1.0.0.127") {
|
||||||
inst::ui::mainApp->CreateShowDialog("main.net.title"_lang, "main.net.desc"_lang, { "common.ok"_lang }, true, "romfs:/images/icons/information.png");
|
inst::ui::mainApp->CreateShowDialog("main.net.title"_lang, "main.net.desc"_lang, { "common.ok"_lang }, true, "romfs:/images/icons/information.png");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
mainApp->ThemeinstPage->startNetwork();
|
mainApp->ThemeinstPage->startNetwork();
|
||||||
break;
|
break;
|
||||||
case 11:
|
case 12:
|
||||||
keyboardResult = inst::util::softwareKeyboard("inst.net.url.hint"_lang, inst::config::httplastUrl2.c_str(), 500);
|
keyboardResult = inst::util::softwareKeyboard("inst.net.url.hint"_lang, inst::config::httplastUrl2.c_str(), 500);
|
||||||
if (keyboardResult.size() > 0) {
|
if (keyboardResult.size() > 0) {
|
||||||
inst::config::httplastUrl2 = keyboardResult;
|
inst::config::httplastUrl2 = keyboardResult;
|
||||||
@ -396,10 +410,10 @@ namespace inst::ui {
|
|||||||
this->menu->SetSelectedIndex(index);
|
this->menu->SetSelectedIndex(index);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 12:
|
case 13:
|
||||||
sigPatchesMenuItem_Click();
|
sigPatchesMenuItem_Click();
|
||||||
break;
|
break;
|
||||||
case 13:
|
case 14:
|
||||||
keyboardResult = inst::util::softwareKeyboard("options.sig_hint"_lang, inst::config::sigPatchesUrl.c_str(), 500);
|
keyboardResult = inst::util::softwareKeyboard("options.sig_hint"_lang, inst::config::sigPatchesUrl.c_str(), 500);
|
||||||
if (keyboardResult.size() > 0) {
|
if (keyboardResult.size() > 0) {
|
||||||
inst::config::sigPatchesUrl = keyboardResult;
|
inst::config::sigPatchesUrl = keyboardResult;
|
||||||
@ -408,7 +422,7 @@ namespace inst::ui {
|
|||||||
this->menu->SetSelectedIndex(index);
|
this->menu->SetSelectedIndex(index);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 14:
|
case 15:
|
||||||
keyboardResult = inst::util::softwareKeyboard("inst.net.url.hint"_lang, inst::config::httpIndexUrl.c_str(), 500);
|
keyboardResult = inst::util::softwareKeyboard("inst.net.url.hint"_lang, inst::config::httpIndexUrl.c_str(), 500);
|
||||||
if (keyboardResult.size() > 0) {
|
if (keyboardResult.size() > 0) {
|
||||||
inst::config::httpIndexUrl = keyboardResult;
|
inst::config::httpIndexUrl = keyboardResult;
|
||||||
@ -417,7 +431,7 @@ namespace inst::ui {
|
|||||||
this->menu->SetSelectedIndex(index);
|
this->menu->SetSelectedIndex(index);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 15:
|
case 16:
|
||||||
languageList = languageStrings;
|
languageList = languageStrings;
|
||||||
languageList[0] = "options.language.system_language"_lang; //replace "sys" with local language string
|
languageList[0] = "options.language.system_language"_lang; //replace "sys" with local language string
|
||||||
rc = inst::ui::mainApp->CreateShowDialog("options.language.title"_lang, "options.language.desc"_lang, languageList, false, flag);
|
rc = inst::ui::mainApp->CreateShowDialog("options.language.title"_lang, "options.language.desc"_lang, languageList, false, flag);
|
||||||
@ -457,7 +471,7 @@ namespace inst::ui {
|
|||||||
mainApp->FadeOut();
|
mainApp->FadeOut();
|
||||||
mainApp->Close();
|
mainApp->Close();
|
||||||
break;
|
break;
|
||||||
case 16:
|
case 17:
|
||||||
if (inst::util::getIPAddress() == "1.0.0.127") {
|
if (inst::util::getIPAddress() == "1.0.0.127") {
|
||||||
inst::ui::mainApp->CreateShowDialog("main.net.title"_lang, "main.net.desc"_lang, { "common.ok"_lang }, true, "romfs:/images/icons/update.png");
|
inst::ui::mainApp->CreateShowDialog("main.net.title"_lang, "main.net.desc"_lang, { "common.ok"_lang }, true, "romfs:/images/icons/update.png");
|
||||||
break;
|
break;
|
||||||
@ -469,7 +483,7 @@ namespace inst::ui {
|
|||||||
}
|
}
|
||||||
this->askToUpdate(downloadUrl);
|
this->askToUpdate(downloadUrl);
|
||||||
break;
|
break;
|
||||||
case 17:
|
case 18:
|
||||||
inst::ui::mainApp->CreateShowDialog("options.credits.title"_lang, "options.credits.desc"_lang, { "common.close"_lang }, true, "romfs:/images/icons/credits.png");
|
inst::ui::mainApp->CreateShowDialog("options.credits.title"_lang, "options.credits.desc"_lang, { "common.close"_lang }, true, "romfs:/images/icons/credits.png");
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
@ -17,6 +17,7 @@ namespace inst::config {
|
|||||||
bool overClock;
|
bool overClock;
|
||||||
bool useTheme;
|
bool useTheme;
|
||||||
bool useSound;
|
bool useSound;
|
||||||
|
bool useMusic;
|
||||||
bool usbAck;
|
bool usbAck;
|
||||||
bool validateNCAs;
|
bool validateNCAs;
|
||||||
bool fixticket;
|
bool fixticket;
|
||||||
@ -30,6 +31,7 @@ namespace inst::config {
|
|||||||
{"gAuthKey", gAuthKey},
|
{"gAuthKey", gAuthKey},
|
||||||
{"useTheme", useTheme},
|
{"useTheme", useTheme},
|
||||||
{"useSound", useSound},
|
{"useSound", useSound},
|
||||||
|
{"useMusic", useMusic},
|
||||||
{"ignoreReqVers", ignoreReqVers},
|
{"ignoreReqVers", ignoreReqVers},
|
||||||
{"languageSetting", languageSetting},
|
{"languageSetting", languageSetting},
|
||||||
{"overClock", overClock},
|
{"overClock", overClock},
|
||||||
@ -60,6 +62,7 @@ namespace inst::config {
|
|||||||
gAuthKey = j["gAuthKey"].get<std::string>();
|
gAuthKey = j["gAuthKey"].get<std::string>();
|
||||||
useTheme = j["useTheme"].get<bool>();
|
useTheme = j["useTheme"].get<bool>();
|
||||||
useSound = j["useSound"].get<bool>();
|
useSound = j["useSound"].get<bool>();
|
||||||
|
useMusic = j["useMusic"].get<bool>();
|
||||||
ignoreReqVers = j["ignoreReqVers"].get<bool>();
|
ignoreReqVers = j["ignoreReqVers"].get<bool>();
|
||||||
languageSetting = j["languageSetting"].get<int>();
|
languageSetting = j["languageSetting"].get<int>();
|
||||||
overClock = j["overClock"].get<bool>();
|
overClock = j["overClock"].get<bool>();
|
||||||
@ -82,6 +85,7 @@ namespace inst::config {
|
|||||||
deletePrompt = true;
|
deletePrompt = true;
|
||||||
useTheme = false;
|
useTheme = false;
|
||||||
useSound = true;
|
useSound = true;
|
||||||
|
useMusic = true;
|
||||||
fixticket = true;
|
fixticket = true;
|
||||||
listoveride = false;
|
listoveride = false;
|
||||||
httpkeyboard = false;
|
httpkeyboard = false;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user