From 1b531c67f5b4d4ffd11b5f0d92b4b90fff5dc088 Mon Sep 17 00:00:00 2001 From: Ivan Savenko Date: Fri, 11 Aug 2023 15:06:02 +0300 Subject: [PATCH 1/2] Added option to configure reserved screen area on mobile platforms --- launcher/settingsView/csettingsview_moc.cpp | 16 +- launcher/settingsView/csettingsview_moc.h | 2 + launcher/settingsView/csettingsview_moc.ui | 911 ++++++++++---------- 3 files changed, 482 insertions(+), 447 deletions(-) diff --git a/launcher/settingsView/csettingsview_moc.cpp b/launcher/settingsView/csettingsview_moc.cpp index c4bbb9eec..9f00a369f 100644 --- a/launcher/settingsView/csettingsview_moc.cpp +++ b/launcher/settingsView/csettingsview_moc.cpp @@ -72,6 +72,8 @@ void CSettingsView::loadSettings() ui->comboBoxFullScreen->hide(); ui->labelFullScreen->hide(); #else + ui->labelReservedArea->hide(); + ui->spinBoxReservedArea->hide(); if (settings["video"]["realFullscreen"].Bool()) ui->comboBoxFullScreen->setCurrentIndex(2); else @@ -81,6 +83,7 @@ void CSettingsView::loadSettings() ui->spinBoxInterfaceScaling->setValue(settings["video"]["resolution"]["scaling"].Float()); ui->spinBoxFramerateLimit->setValue(settings["video"]["targetfps"].Float()); + ui->spinBoxReservedArea->setValue(std::round(settings["video"]["reservedWidth"].Float() * 100)); ui->comboBoxFriendlyAI->setCurrentText(QString::fromStdString(settings["server"]["friendlyAI"].String())); ui->comboBoxNeutralAI->setCurrentText(QString::fromStdString(settings["server"]["neutralAI"].String())); @@ -468,14 +471,12 @@ void CSettingsView::on_lineEditRepositoryExtra_textEdited(const QString &arg1) node->String() = arg1.toStdString(); } - void CSettingsView::on_spinBoxInterfaceScaling_valueChanged(int arg1) { Settings node = settings.write["video"]["resolution"]["scaling"]; node->Float() = arg1; } - void CSettingsView::on_refreshRepositoriesButton_clicked() { auto * mainWindow = dynamic_cast(qApp->activeWindow()); @@ -487,7 +488,6 @@ void CSettingsView::on_refreshRepositoriesButton_clicked() mainWindow->getModView()->loadRepositories(); } - void CSettingsView::on_spinBoxFramerateLimit_valueChanged(int arg1) { Settings node = settings.write["video"]["targetfps"]; @@ -500,14 +500,12 @@ void CSettingsView::on_comboBoxEnemyPlayerAI_currentTextChanged(const QString &a node->String() = arg1.toUtf8().data(); } - void CSettingsView::on_comboBoxAlliedPlayerAI_currentTextChanged(const QString &arg1) { Settings node = settings.write["server"]["alliedAI"]; node->String() = arg1.toUtf8().data(); } - void CSettingsView::on_checkBoxAutoSavePrefix_stateChanged(int arg1) { Settings node = settings.write["general"]["useSavePrefix"]; @@ -515,17 +513,21 @@ void CSettingsView::on_checkBoxAutoSavePrefix_stateChanged(int arg1) ui->lineEditAutoSavePrefix->setEnabled(arg1); } - void CSettingsView::on_spinBoxAutoSaveLimit_valueChanged(int arg1) { Settings node = settings.write["general"]["autosaveCountLimit"]; node->Float() = arg1; } - void CSettingsView::on_lineEditAutoSavePrefix_textEdited(const QString &arg1) { Settings node = settings.write["general"]["savePrefix"]; node->String() = arg1.toStdString(); } +void CSettingsView::on_spinBoxReservedArea_valueChanged(int arg1) +{ + Settings node = settings.write["video"]["reservedWidth"]; + node->Float() = float(arg1) / 100; // percentage -> ratio +} + diff --git a/launcher/settingsView/csettingsview_moc.h b/launcher/settingsView/csettingsview_moc.h index 6e27d9896..5cc14c505 100644 --- a/launcher/settingsView/csettingsview_moc.h +++ b/launcher/settingsView/csettingsview_moc.h @@ -72,6 +72,8 @@ private slots: void on_lineEditAutoSavePrefix_textEdited(const QString &arg1); + void on_spinBoxReservedArea_valueChanged(int arg1); + private: Ui::CSettingsView * ui; diff --git a/launcher/settingsView/csettingsview_moc.ui b/launcher/settingsView/csettingsview_moc.ui index 5e3f43e84..5924e4f70 100644 --- a/launcher/settingsView/csettingsview_moc.ui +++ b/launcher/settingsView/csettingsview_moc.ui @@ -42,6 +42,7 @@ + 75 true @@ -106,35 +107,136 @@ 0 - 0 + -197 610 - 790 + 768 - - + + + + + + + + + + + false + + + BattleAI + + + + BattleAI + + + + + StupidAI + + + + + + + + Display index + + + + + + + VCAI + + + + VCAI + + + + + Nullkiller + + + + + + + + Autosave limit (0 = off) + + + + + + + Fullscreen + + + + + + + Network port + + + + + + 75 true - Artificial Intelligence + General - - + + - + Autosave - + + + + + + + Hardware + + + + + Software + + + + + + + + Show intro + + + + + + + + + true - + true @@ -147,13 +249,358 @@ - - + + + + 20 + + + 1000 + + + 10 + + + + + + + + + + Framerate Limit + + + + + + + + + + Adventure Map Enemies + + + + + + + Default repository + + + + + + + + + + 1 + + + + Off + + + + + On + + + + + + + + + 75 + true + + + + Video + + + + + + + Autosave prefix + + + + + + + Resolution + + + + + + + + + + + + + + + + + true + + + + + + + Cursor + + + + + + + 1 + + + + Off + + + + + On + + + + + + + + Refresh now + + + + + - - true + + + + + + Heroes III Translation + + + + + + + 1 + + + + Off + + + + + On + + + + + + + + Enemy AI in battles + + + + + + + + 75 + true + + + + Mod Repositories + + + + + + + Additional repository + + + + + + + false + + + BattleAI + + + + BattleAI + + + + + StupidAI + + + + + + + + 50 + + + 400 + + + 10 + + + + + + + Heroes III Data Language + + + + + + + + + + Neutral AI in battles + + + + + + + Interface Scaling + + + + + + + 1024 + + + 65535 + + + 3030 + + + + + + + + + + + + + + Friendly AI in battles + + + + + + + VCMI Language + + + + + + + + + + Check on startup + + + + + + + BattleAI + + + + BattleAI + + + + + StupidAI + + + + + + + + Adventure Map Allies + + + + + + + + 75 + true + + + + Artificial Intelligence + + + + + + + VCAI + + + + VCAI + + + + + Nullkiller + + + + + + + + empty = map name prefix @@ -188,445 +635,29 @@ Fullscreen Exclusive Mode - game will cover entirety of your screen and will use - - + + - Resolution - - - - - - - Adventure Map Allies - - - - - - - false - - - BattleAI - - - - BattleAI - - - - - StupidAI - - - - - - - - - true - - - - Mod Repositories - - - - - - - 1 - - - - Off - - - - - On - - - - - - - - - - - - - - - Default repository - - - - - - - Additional repository - - - - - - - Neutral AI in battles - - - - - - - + Reserved screen area - + + + % + - 50 + 0 - 400 + 25 - 10 - - - - - - - Interface Scaling - - - - - - - Heroes III Data Language - - - - - - - Autosave limit (0 = off) - - - - - - - - - - Friendly AI in battles - - - - - - - false - - - BattleAI - - - - BattleAI - - - - - StupidAI - - - - - - - - - - - VCAI - - - - VCAI - - - - - Nullkiller - - - - - - - - Display index - - - - - - - Adventure Map Enemies - - - - - - - 20 - - - 1000 - - - 10 - - - - - - - Show intro - - - - - - 1 - - - Off - - - - - On - - - - - - - - - - - - Hardware - - - - - Software - - - - - - - - Fullscreen - - - - - - - Cursor - - - - - - - - - - - - - - Enemy AI in battles - - - - - - - Check on startup - - - - - - - - true - - - - General - - - - - - - BattleAI - - - - BattleAI - - - - - StupidAI - - - - - - - - Refresh now - - - - - - - 1024 - - - 65535 - - 3030 - - - - - - - Network port - - - - - - - Heroes III Translation - - - - - - - VCMI Language - - - - - - - Autosave - - - - - - - - true - - - - Video - - - - - - - VCAI - - - - VCAI - - - - - Nullkiller - - - - - - - - - - - Framerate Limit - - - - - - - 1 - - - - Off - - - - - On - - - - - - - - Autosave prefix - - - - - - - - - - - - - - - - - empty = map name prefix + 0 From c0e51fc13e270e21bdcf2ddbbe5f1bd530a7fb5f Mon Sep 17 00:00:00 2001 From: Ivan Savenko Date: Fri, 11 Aug 2023 15:08:22 +0300 Subject: [PATCH 2/2] Update translations --- launcher/settingsView/csettingsview_moc.ui | 2 +- launcher/translation/chinese.ts | 103 +++++++++++---------- launcher/translation/english.ts | 103 +++++++++++---------- launcher/translation/french.ts | 103 +++++++++++---------- launcher/translation/german.ts | 103 +++++++++++---------- launcher/translation/polish.ts | 103 +++++++++++---------- launcher/translation/russian.ts | 103 +++++++++++---------- launcher/translation/spanish.ts | 103 +++++++++++---------- launcher/translation/ukrainian.ts | 103 +++++++++++---------- 9 files changed, 433 insertions(+), 393 deletions(-) diff --git a/launcher/settingsView/csettingsview_moc.ui b/launcher/settingsView/csettingsview_moc.ui index 5924e4f70..186689a6c 100644 --- a/launcher/settingsView/csettingsview_moc.ui +++ b/launcher/settingsView/csettingsview_moc.ui @@ -645,7 +645,7 @@ Fullscreen Exclusive Mode - game will cover entirety of your screen and will use - % + % 0 diff --git a/launcher/translation/chinese.ts b/launcher/translation/chinese.ts index 8ac241e96..6bdd419ce 100644 --- a/launcher/translation/chinese.ts +++ b/launcher/translation/chinese.ts @@ -407,123 +407,123 @@ CSettingsView - - - + + + Off 关闭 - - + + Artificial Intelligence 人工智能 - - + + Mod Repositories 模组仓库 - + Interface Scaling - + Neutral AI in battles - + Enemy AI in battles - + Additional repository - + Adventure Map Allies - + Adventure Map Enemies - + Windowed - + Borderless fullscreen - + Exclusive fullscreen - + Autosave limit (0 = off) - + Friendly AI in battles - + Framerate Limit - + Autosave prefix - + empty = map name prefix - + Refresh now - + Default repository - - - + + + On 开启 - + Cursor 鼠标指针 - + Heroes III Data Language 英雄无敌3数据语言 - + Select display mode for game Windowed - game will run inside a window that covers part of your screen @@ -534,95 +534,100 @@ Fullscreen Exclusive Mode - game will cover entirety of your screen and will use - + + Reserved screen area + + + + Hardware 硬件 - + Software 软件 - + Heroes III Translation 发布版本里找不到这个项,不太清楚意义 英雄无敌3翻译 - + Check on startup 启动时检查更新 - + Fullscreen 全屏 - - + + General 通用设置 - + VCMI Language VCMI语言 - + Resolution 分辨率 - + Autosave 自动存档 - + Display index 显示器序号 - + Network port 网络端口 - - + + Video 视频设置 - + Show intro 显示开场动画 - + Active 激活 - + Disabled 禁用 - + Enable 启用 - + Not Installed 未安装 - + Install 安装 diff --git a/launcher/translation/english.ts b/launcher/translation/english.ts index 9270e252a..4d6ad1deb 100644 --- a/launcher/translation/english.ts +++ b/launcher/translation/english.ts @@ -406,123 +406,123 @@ CSettingsView - - - + + + Off - - + + Artificial Intelligence - - + + Mod Repositories - + Interface Scaling - + Neutral AI in battles - + Enemy AI in battles - + Additional repository - + Adventure Map Allies - + Adventure Map Enemies - + Windowed - + Borderless fullscreen - + Exclusive fullscreen - + Autosave limit (0 = off) - + Friendly AI in battles - + Framerate Limit - + Autosave prefix - + empty = map name prefix - + Refresh now - + Default repository - - - + + + On - + Cursor - + Heroes III Data Language - + Select display mode for game Windowed - game will run inside a window that covers part of your screen @@ -533,94 +533,99 @@ Fullscreen Exclusive Mode - game will cover entirety of your screen and will use - + + Reserved screen area + + + + Hardware - + Software - + Heroes III Translation - + Check on startup - + Fullscreen - - + + General - + VCMI Language - + Resolution - + Autosave - + Display index - + Network port - - + + Video - + Show intro - + Active - + Disabled - + Enable - + Not Installed - + Install diff --git a/launcher/translation/french.ts b/launcher/translation/french.ts index 110fbcbbd..e59b15e82 100644 --- a/launcher/translation/french.ts +++ b/launcher/translation/french.ts @@ -411,43 +411,43 @@ CSettingsView - - - + + + Off Désactivé - - + + Artificial Intelligence Intelligence Artificielle - - + + Mod Repositories Dépôts de Mod - - - + + + On Activé - + Enemy AI in battles IA ennemie dans les batailles - + Default repository Dépôt par défaut - + Select display mode for game Windowed - game will run inside a window that covers part of your screen @@ -464,174 +464,179 @@ Mode fenêtré sans bord - le jeu s"exécutera dans une fenêtre qui couvre Mode exclusif plein écran - le jeu couvrira l"intégralité de votre écran et utilisera la résolution sélectionnée. - + Windowed Fenêtré - + Borderless fullscreen Fenêtré sans bord - + Exclusive fullscreen Plein écran exclusif - + + Reserved screen area + + + + Neutral AI in battles IA neutre dans les batailles - + Autosave limit (0 = off) - + Adventure Map Enemies Ennemis de la carte d"aventure - + Autosave prefix - + empty = map name prefix - + Interface Scaling Mise à l"échelle de l"interface - + Cursor Curseur - + Heroes III Data Language Langue des Données de Heroes III - + Framerate Limit Limite de fréquence d"images - + Hardware Matériel - + Software Logiciel - + Heroes III Translation Traduction de Heroes III - + Adventure Map Allies Alliés de la carte d"aventure - + Additional repository Dépôt supplémentaire - + Check on startup Vérifier au démarrage - + Refresh now Actualiser maintenant - + Friendly AI in battles IA amicale dans les batailles - + Fullscreen Plein écran - - + + General Général - + VCMI Language Langue de VCMI - + Resolution Résolution - + Autosave Sauvegarde automatique - + Display index Index d'affichage - + Network port Port de réseau - - + + Video Vidéo - + Show intro Montrer l'intro - + Active Actif - + Disabled Désactivé - + Enable Activé - + Not Installed Pas Installé - + Install Installer diff --git a/launcher/translation/german.ts b/launcher/translation/german.ts index 2840fb21f..fd803264f 100644 --- a/launcher/translation/german.ts +++ b/launcher/translation/german.ts @@ -406,123 +406,123 @@ CSettingsView - - - + + + Off Aus - - + + Artificial Intelligence Künstliche Intelligenz - - + + Mod Repositories Mod-Repositorien - + Interface Scaling Skalierung der Benutzeroberfläche - + Neutral AI in battles Neutrale KI in Kämpfen - + Enemy AI in battles Gegnerische KI in Kämpfen - + Additional repository Zusätzliches Repository - + Adventure Map Allies Abenteuerkarte Verbündete - + Adventure Map Enemies Abenteuerkarte Feinde - + Windowed Fenstermodus - + Borderless fullscreen Randloser Vollbildmodus - + Exclusive fullscreen Exklusiver Vollbildmodus - + Autosave limit (0 = off) Limit für Autospeicherung (0 = aus) - + Friendly AI in battles Freundliche KI in Kämpfen - + Framerate Limit Limit der Bildrate - + Autosave prefix Präfix für Autospeicherung - + empty = map name prefix leer = Kartenname als Präfix - + Refresh now Jetzt aktualisieren - + Default repository Standard Repository - - - + + + On An - + Cursor Zeiger - + Heroes III Data Language Sprache der Heroes III Daten - + Select display mode for game Windowed - game will run inside a window that covers part of your screen @@ -539,94 +539,99 @@ Randloser Fenstermodus - das Spiel läuft in einem Fenster, das den gesamten Bil Exklusiver Vollbildmodus - das Spiel bedeckt den gesamten Bildschirm und verwendet die gewählte Auflösung. - + + Reserved screen area + + + + Hardware Hardware - + Software Software - + Heroes III Translation Heroes III Übersetzung - + Check on startup Beim Start prüfen - + Fullscreen Vollbild - - + + General Allgemein - + VCMI Language VCMI-Sprache - + Resolution Auflösung - + Autosave Autospeichern - + Display index Anzeige-Index - + Network port Netzwerk-Port - - + + Video Video - + Show intro Intro anzeigen - + Active Aktiv - + Disabled Deaktiviert - + Enable Aktivieren - + Not Installed Nicht installiert - + Install Installieren diff --git a/launcher/translation/polish.ts b/launcher/translation/polish.ts index d72e7c62e..75ea0498f 100644 --- a/launcher/translation/polish.ts +++ b/launcher/translation/polish.ts @@ -406,123 +406,123 @@ CSettingsView - - - + + + Off Wyłączony - - + + Artificial Intelligence Sztuczna Inteligencja - - + + Mod Repositories Repozytoria modów - + Interface Scaling Skala interfejsu - + Neutral AI in battles AI bitewne jednostek neutralnych - + Enemy AI in battles AI bitewne wrogów - + Additional repository Dodatkowe repozytorium - + Adventure Map Allies AI sojuszników mapy przygody - + Adventure Map Enemies AI wrogów mapy przygody - + Windowed Okno - + Borderless fullscreen Pełny ekran (tryb okna) - + Exclusive fullscreen Pełny ekran klasyczny - + Autosave limit (0 = off) Limit autozapisów (0 = brak) - + Friendly AI in battles AI bitewne sojuszników - + Framerate Limit Limit FPS - + Autosave prefix Przedrostek autozapisu - + empty = map name prefix puste = przedrostek z nazwy mapy - + Refresh now Odśwież - + Default repository Domyślne repozytorium - - - + + + On Włączony - + Cursor Kursor - + Heroes III Data Language Język plików Heroes III - + Select display mode for game Windowed - game will run inside a window that covers part of your screen @@ -539,94 +539,99 @@ Pełny ekran w trybie okna - gra uruchomi się w oknie przysłaniającym cały e Pełny ekran klasyczny - gra przysłoni cały ekran uruchamiając się w wybranej przez ciebie rozdzielczości ekranu. - + + Reserved screen area + + + + Hardware Sprzętowy - + Software Programowy - + Heroes III Translation Tłumaczenie Heroes III - + Check on startup Sprawdzaj przy uruchomieniu - + Fullscreen Pełny ekran - - + + General Ogólne - + VCMI Language Język VCMI - + Resolution Rozdzielczość - + Autosave Autozapis - + Display index Numer wyświetlacza - + Network port Port sieciowy - - + + Video Obraz - + Show intro Pokaż intro - + Active Aktywny - + Disabled Wyłączone - + Enable Włącz - + Not Installed Nie zainstalowano - + Install Zainstaluj diff --git a/launcher/translation/russian.ts b/launcher/translation/russian.ts index 7e0953a29..a5ef0dd5c 100644 --- a/launcher/translation/russian.ts +++ b/launcher/translation/russian.ts @@ -406,144 +406,149 @@ CSettingsView - + Interface Scaling - - - + + + Off Отключено - - - + + + On Включено - + Neutral AI in battles - + Enemy AI in battles - + Additional repository - + Check on startup Проверять при запуске - + Fullscreen Полноэкранный режим - - + + General Общее - + VCMI Language Язык VCMI - + Cursor Курсор - - + + Artificial Intelligence Искусственный интеллект - - + + Mod Repositories Репозитории модов - + Adventure Map Allies - + Refresh now - + Adventure Map Enemies - + Windowed - + Borderless fullscreen - + Exclusive fullscreen - + + Reserved screen area + + + + Autosave limit (0 = off) - + Friendly AI in battles - + Framerate Limit - + Autosave prefix - + empty = map name prefix - + Default repository - + Heroes III Data Language Язык данных Героев III - + Select display mode for game Windowed - game will run inside a window that covers part of your screen @@ -554,73 +559,73 @@ Fullscreen Exclusive Mode - game will cover entirety of your screen and will use - + Hardware Аппаратный - + Software Программный - + Heroes III Translation Перевод Героев III - + Resolution Разрешение экрана - + Autosave Автосохранение - + Display index Дисплей - + Network port Сетевой порт - - + + Video Графика - + Show intro Вступление - + Active Активен - + Disabled Отключен - + Enable Включить - + Not Installed Не установлен - + Install Установить diff --git a/launcher/translation/spanish.ts b/launcher/translation/spanish.ts index 6401189bc..04499cedf 100644 --- a/launcher/translation/spanish.ts +++ b/launcher/translation/spanish.ts @@ -406,165 +406,170 @@ CSettingsView - - - + + + Off Desactivado - - + + Artificial Intelligence Inteligencia Artificial - - + + Mod Repositories Repositorios de Mods - + Interface Scaling - + Neutral AI in battles - + Enemy AI in battles - + Additional repository - + Adventure Map Allies - + Adventure Map Enemies - + Windowed - + Borderless fullscreen - + Exclusive fullscreen - + Autosave limit (0 = off) - + Friendly AI in battles - + Framerate Limit - + Autosave prefix - + empty = map name prefix - + Refresh now - + Default repository - - - + + + On Encendido - + Cursor Cursor - + Heroes III Translation Traducción de Heroes III - + + Reserved screen area + + + + Fullscreen Pantalla completa - - + + General General - + VCMI Language Idioma de VCMI - + Resolution Resolución - + Autosave Autoguardado - + Display index Mostrar índice - + Network port Puerto de red - - + + Video Vídeo - + Select display mode for game Windowed - game will run inside a window that covers part of your screen @@ -575,52 +580,52 @@ Fullscreen Exclusive Mode - game will cover entirety of your screen and will use - + Hardware Hardware - + Software Software - + Show intro Mostrar introducción - + Check on startup Comprovar al inicio - + Heroes III Data Language Idioma de los datos de Heroes III. - + Active Activado - + Disabled Desactivado - + Enable Activar - + Not Installed No Instalado - + Install Instalar diff --git a/launcher/translation/ukrainian.ts b/launcher/translation/ukrainian.ts index b4362d867..d3015e426 100644 --- a/launcher/translation/ukrainian.ts +++ b/launcher/translation/ukrainian.ts @@ -406,123 +406,123 @@ CSettingsView - - - + + + Off Вимкнено - - + + Artificial Intelligence Штучний інтелект - - + + Mod Repositories Репозиторії модифікацій - + Interface Scaling Масштабування інтерфейсу - + Neutral AI in battles Нейтральний ШІ в боях - + Enemy AI in battles Ворожий ШІ в боях - + Additional repository Додатковий репозиторій - + Adventure Map Allies Союзники на мапі пригод - + Adventure Map Enemies Вороги на мапі пригод - + Windowed У вікні - + Borderless fullscreen Повноекранне вікно - + Exclusive fullscreen Повноекранний (ексклюзивно) - + Autosave limit (0 = off) Кількість автозбережень - + Friendly AI in battles Дружній ШІ в боях - + Framerate Limit Обмеження частоти кадрів - + Autosave prefix Префікс назв автозбережень - + empty = map name prefix (використовувати назву карти) - + Refresh now Оновити зараз - + Default repository Стандартний репозиторій - - - + + + On Увімкнено - + Cursor Курсор - + Heroes III Data Language Мова Heroes III - + Select display mode for game Windowed - game will run inside a window that covers part of your screen @@ -539,94 +539,99 @@ Fullscreen Exclusive Mode - game will cover entirety of your screen and will use Повноекранний ексклюзивний режим - гра займатиме весь екран і використовуватиме вибрану роздільну здатність. - + + Reserved screen area + Зарезервована зона екрану + + + Hardware Апаратний - + Software Програмний - + Heroes III Translation Переклад Heroes III - + Check on startup Перевіряти на старті - + Fullscreen Повноекранний режим - - + + General Загальні налаштування - + VCMI Language Мова VCMI - + Resolution Роздільна здатність - + Autosave Автозбереження - + Display index Дісплей - + Network port Мережевий порт - - + + Video Графіка - + Show intro Вступні відео - + Active Активні - + Disabled Деактивований - + Enable Активувати - + Not Installed Не встановлено - + Install Встановити