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 useTheme;
|
||||
extern bool useSound;
|
||||
extern bool useMusic;
|
||||
extern bool fixticket;
|
||||
extern bool listoveride;
|
||||
extern bool httpkeyboard;
|
||||
|
@ -175,6 +175,7 @@
|
||||
"ask_delete": "Frage ob installierte Titel gelöscht werden sollen",
|
||||
"auto_update": "Suche automatisch nach Updates für TinWoo",
|
||||
"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",
|
||||
"listoveride": "Deaktivieren Sie die URL-Listenwarnung und die Dateibeschränkung",
|
||||
"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",
|
||||
"auto_update": "Check for updates to TinWoo Installer automatically",
|
||||
"useSound": "Use sound notifications during installs",
|
||||
"useMusic": "Autoplay music when Tinwoo starts",
|
||||
"fixticket": "Convert temporary tickets to permanent",
|
||||
"listoveride": "Disable URL list warning and file limit",
|
||||
"usehttpkeyboard": "Use keyboard during http server installs",
|
||||
|
@ -175,6 +175,7 @@
|
||||
"ask_delete": "Solicitar eliminar los archivos originales después de la instalación",
|
||||
"auto_update": "Busca actualizaciones para TinWoo Installer automáticamente",
|
||||
"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",
|
||||
"listoveride": "Deshabilitar advertencia de limite de elementos en el listado de un URL",
|
||||
"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",
|
||||
"auto_update": "Vérifier les mises à jour de l'installateur TinWoo automatiquement",
|
||||
"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",
|
||||
"listoveride": "Désactiver l'avertissement de liste d'URL et la limite de fichiers",
|
||||
"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",
|
||||
"auto_update": "Controlla aggiornamenti di TinWoo Installer automaticamente",
|
||||
"useSound": "Utilizza notifiche sonore durante le installazioni",
|
||||
"useMusic": "Riproduci automaticamente la musica all'avvio di Tinwoo",
|
||||
"fixticket": "Converti i biglietti temporanei in permanenti",
|
||||
"listoveride": "Disabilita l'avviso dell'elenco degli URL e il limite dei file",
|
||||
"usehttpkeyboard": "Utilizzare la tastiera durante le installazioni del server http",
|
||||
|
@ -175,6 +175,7 @@
|
||||
"ask_delete": "インストール後に元のファイルを削除する",
|
||||
"auto_update": "TinWooのアップデートを自動的に確認する",
|
||||
"useSound": "インストール時にサウンドで通知する",
|
||||
"useMusic": "Tinwoo の起動時に音楽を自動再生",
|
||||
"fixticket": "一時的なチケットを永続的なチケットに変換する",
|
||||
"listoveride": "URL リストの警告とファイル制限を無効にする",
|
||||
"usehttpkeyboard": "httpサーバーのインストール中にキーボードを使用する",
|
||||
|
@ -175,6 +175,7 @@
|
||||
"ask_delete": "Спрашивать разрешения удалить исходные файлы после установки",
|
||||
"auto_update": "Автоматически проверять наличие обновлений",
|
||||
"useSound": "Используйте звуковые уведомления во время установки",
|
||||
"useMusic": "Автовоспроизведение музыки при запуске Tinwoo",
|
||||
"fixticket": "Превратить временные билеты в постоянные",
|
||||
"listoveride": "Отключить предупреждение списка URL-адресов и ограничение количества файлов",
|
||||
"usehttpkeyboard": "Используйте клавиатуру во время установки http-сервера",
|
||||
|
@ -175,6 +175,7 @@
|
||||
"ask_delete": "在安裝完成後,詢問是否刪除原始檔案",
|
||||
"auto_update": "自動檢查Tinwoo Installer的更新版本",
|
||||
"useSound": "在安裝過程中使用音效提醒進度",
|
||||
"useMusic": "Tinwoo 啟動時自動播放音樂",
|
||||
"fixticket": "將臨時門票轉換為永久門票",
|
||||
"listoveride": "禁用 URL 列表警告和文件限制",
|
||||
"usehttpkeyboard": "在 http 服務器安裝期間使用鍵盤",
|
||||
|
@ -285,7 +285,7 @@ namespace inst::ui {
|
||||
}
|
||||
this->Add(this->optionMenu);
|
||||
this->AddRenderCallback(mainMenuThread);
|
||||
playmusic();
|
||||
if (inst::config::useMusic) playmusic();
|
||||
}
|
||||
|
||||
void MainPage::installMenuItem_Click() {
|
||||
|
@ -192,6 +192,11 @@ namespace inst::ui {
|
||||
useSoundOption->SetIcon(this->getMenuOptionIcon(inst::config::useSound));
|
||||
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);
|
||||
fixticket->SetColor(COLOR("#FFFFFFFF"));
|
||||
fixticket->SetIcon(this->getMenuOptionIcon(inst::config::fixticket));
|
||||
@ -217,12 +222,10 @@ namespace inst::ui {
|
||||
ThemeMenuOption->SetIcon("romfs:/images/icons/thememenu.png");
|
||||
this->menu->AddItem(ThemeMenuOption);
|
||||
|
||||
//
|
||||
auto ThemeUrlOption = pu::ui::elm::MenuItem::New("theme.theme_url"_lang + inst::util::shortenString(inst::config::httplastUrl2, 42, false));
|
||||
ThemeUrlOption->SetColor(COLOR("#FFFFFFFF"));
|
||||
ThemeUrlOption->SetIcon("romfs:/images/icons/themeurl.png");
|
||||
this->menu->AddItem(ThemeUrlOption);
|
||||
//
|
||||
|
||||
auto SigPatch = pu::ui::elm::MenuItem::New("main.menu.sig"_lang);
|
||||
SigPatch->SetColor(COLOR("#FFFFFFFF"));
|
||||
@ -342,6 +345,17 @@ namespace inst::ui {
|
||||
inst::config::setConfig();
|
||||
break;
|
||||
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) {
|
||||
inst::config::fixticket = false;
|
||||
}
|
||||
@ -352,7 +366,7 @@ namespace inst::ui {
|
||||
this->menu->SetSelectedIndex(index);
|
||||
inst::config::setConfig();
|
||||
break;
|
||||
case 7:
|
||||
case 8:
|
||||
if (inst::config::listoveride) {
|
||||
inst::config::listoveride = false;
|
||||
}
|
||||
@ -363,7 +377,7 @@ namespace inst::ui {
|
||||
this->menu->SetSelectedIndex(index);
|
||||
inst::config::setConfig();
|
||||
break;
|
||||
case 8:
|
||||
case 9:
|
||||
if (inst::config::httpkeyboard) {
|
||||
inst::config::httpkeyboard = false;
|
||||
}
|
||||
@ -374,20 +388,20 @@ namespace inst::ui {
|
||||
this->menu->SetSelectedIndex(index);
|
||||
inst::config::setConfig();
|
||||
break;
|
||||
case 9:
|
||||
case 10:
|
||||
thememessage();
|
||||
inst::config::setConfig();
|
||||
this->setMenuText();
|
||||
this->menu->SetSelectedIndex(index);
|
||||
break;
|
||||
case 10:
|
||||
case 11:
|
||||
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");
|
||||
break;
|
||||
}
|
||||
mainApp->ThemeinstPage->startNetwork();
|
||||
break;
|
||||
case 11:
|
||||
case 12:
|
||||
keyboardResult = inst::util::softwareKeyboard("inst.net.url.hint"_lang, inst::config::httplastUrl2.c_str(), 500);
|
||||
if (keyboardResult.size() > 0) {
|
||||
inst::config::httplastUrl2 = keyboardResult;
|
||||
@ -396,10 +410,10 @@ namespace inst::ui {
|
||||
this->menu->SetSelectedIndex(index);
|
||||
}
|
||||
break;
|
||||
case 12:
|
||||
case 13:
|
||||
sigPatchesMenuItem_Click();
|
||||
break;
|
||||
case 13:
|
||||
case 14:
|
||||
keyboardResult = inst::util::softwareKeyboard("options.sig_hint"_lang, inst::config::sigPatchesUrl.c_str(), 500);
|
||||
if (keyboardResult.size() > 0) {
|
||||
inst::config::sigPatchesUrl = keyboardResult;
|
||||
@ -408,7 +422,7 @@ namespace inst::ui {
|
||||
this->menu->SetSelectedIndex(index);
|
||||
}
|
||||
break;
|
||||
case 14:
|
||||
case 15:
|
||||
keyboardResult = inst::util::softwareKeyboard("inst.net.url.hint"_lang, inst::config::httpIndexUrl.c_str(), 500);
|
||||
if (keyboardResult.size() > 0) {
|
||||
inst::config::httpIndexUrl = keyboardResult;
|
||||
@ -417,7 +431,7 @@ namespace inst::ui {
|
||||
this->menu->SetSelectedIndex(index);
|
||||
}
|
||||
break;
|
||||
case 15:
|
||||
case 16:
|
||||
languageList = languageStrings;
|
||||
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);
|
||||
@ -457,7 +471,7 @@ namespace inst::ui {
|
||||
mainApp->FadeOut();
|
||||
mainApp->Close();
|
||||
break;
|
||||
case 16:
|
||||
case 17:
|
||||
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");
|
||||
break;
|
||||
@ -469,7 +483,7 @@ namespace inst::ui {
|
||||
}
|
||||
this->askToUpdate(downloadUrl);
|
||||
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");
|
||||
break;
|
||||
default:
|
||||
|
@ -17,6 +17,7 @@ namespace inst::config {
|
||||
bool overClock;
|
||||
bool useTheme;
|
||||
bool useSound;
|
||||
bool useMusic;
|
||||
bool usbAck;
|
||||
bool validateNCAs;
|
||||
bool fixticket;
|
||||
@ -30,6 +31,7 @@ namespace inst::config {
|
||||
{"gAuthKey", gAuthKey},
|
||||
{"useTheme", useTheme},
|
||||
{"useSound", useSound},
|
||||
{"useMusic", useMusic},
|
||||
{"ignoreReqVers", ignoreReqVers},
|
||||
{"languageSetting", languageSetting},
|
||||
{"overClock", overClock},
|
||||
@ -60,6 +62,7 @@ namespace inst::config {
|
||||
gAuthKey = j["gAuthKey"].get<std::string>();
|
||||
useTheme = j["useTheme"].get<bool>();
|
||||
useSound = j["useSound"].get<bool>();
|
||||
useMusic = j["useMusic"].get<bool>();
|
||||
ignoreReqVers = j["ignoreReqVers"].get<bool>();
|
||||
languageSetting = j["languageSetting"].get<int>();
|
||||
overClock = j["overClock"].get<bool>();
|
||||
@ -82,6 +85,7 @@ namespace inst::config {
|
||||
deletePrompt = true;
|
||||
useTheme = false;
|
||||
useSound = true;
|
||||
useMusic = true;
|
||||
fixticket = true;
|
||||
listoveride = false;
|
||||
httpkeyboard = false;
|
||||
|
Loading…
x
Reference in New Issue
Block a user