Compare commits
17 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| e8235ccae6 | |||
| a964bf8f68 | |||
| 89e4d287d6 | |||
| f34745a66c | |||
| d5b7851c9b | |||
| 1b7032b589 | |||
| e097ea71ff | |||
| 299f2144c8 | |||
| 33e3ba9ff2 | |||
| 9dc36646c1 | |||
| 8eea75a6e8 | |||
| 57fbcc7aed | |||
| d1c15f3562 | |||
| 0423fad7ff | |||
| 1951fe0077 | |||
| 7fd5a63a5d | |||
| a0594e8169 |
@@ -470,7 +470,7 @@ namespace Ryujinx.Ava
|
|||||||
|
|
||||||
Dispatcher.UIThread.InvokeAsync(() =>
|
Dispatcher.UIThread.InvokeAsync(() =>
|
||||||
{
|
{
|
||||||
_viewModel.Title = TitleHelper.ActiveApplicationTitle(Device.Processes.ActiveApplication, Program.Version, !ConfigurationState.Instance.ShowOldUI);
|
_viewModel.Title = TitleHelper.ActiveApplicationTitle(Device.Processes.ActiveApplication, Program.Version, !ConfigurationState.Instance.ShowTitleBar);
|
||||||
});
|
});
|
||||||
|
|
||||||
_viewModel.SetUiProgressHandlers(Device);
|
_viewModel.SetUiProgressHandlers(Device);
|
||||||
@@ -872,7 +872,7 @@ namespace Ryujinx.Ava
|
|||||||
Device?.System.TogglePauseEmulation(false);
|
Device?.System.TogglePauseEmulation(false);
|
||||||
|
|
||||||
_viewModel.IsPaused = false;
|
_viewModel.IsPaused = false;
|
||||||
_viewModel.Title = TitleHelper.ActiveApplicationTitle(Device?.Processes.ActiveApplication, Program.Version, !ConfigurationState.Instance.ShowOldUI);
|
_viewModel.Title = TitleHelper.ActiveApplicationTitle(Device?.Processes.ActiveApplication, Program.Version, !ConfigurationState.Instance.ShowTitleBar);
|
||||||
Logger.Info?.Print(LogClass.Emulation, "Emulation was resumed");
|
Logger.Info?.Print(LogClass.Emulation, "Emulation was resumed");
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -881,7 +881,7 @@ namespace Ryujinx.Ava
|
|||||||
Device?.System.TogglePauseEmulation(true);
|
Device?.System.TogglePauseEmulation(true);
|
||||||
|
|
||||||
_viewModel.IsPaused = true;
|
_viewModel.IsPaused = true;
|
||||||
_viewModel.Title = TitleHelper.ActiveApplicationTitle(Device?.Processes.ActiveApplication, Program.Version, !ConfigurationState.Instance.ShowOldUI, LocaleManager.Instance[LocaleKeys.Paused]);
|
_viewModel.Title = TitleHelper.ActiveApplicationTitle(Device?.Processes.ActiveApplication, Program.Version, !ConfigurationState.Instance.ShowTitleBar, LocaleManager.Instance[LocaleKeys.Paused]);
|
||||||
Logger.Info?.Print(LogClass.Emulation, "Emulation was paused");
|
Logger.Info?.Print(LogClass.Emulation, "Emulation was paused");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -49,7 +49,6 @@
|
|||||||
<TextBlock
|
<TextBlock
|
||||||
Classes="globalConfigMarker"/>
|
Classes="globalConfigMarker"/>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
|
|
||||||
</Border>
|
</Border>
|
||||||
</Design.PreviewWith>
|
</Design.PreviewWith>
|
||||||
<Style Selector="DropDownButton">
|
<Style Selector="DropDownButton">
|
||||||
|
|||||||
+113
-38
@@ -3823,53 +3823,28 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ID": "SettingsTabGeneralShowOldUI",
|
"ID": "SettingsTabGeneralShowTitleBar",
|
||||||
"Translations": {
|
"Translations": {
|
||||||
"ar_SA": "",
|
"ar_SA": "",
|
||||||
"de_DE": "",
|
"de_DE": "",
|
||||||
"el_GR": "",
|
"el_GR": "",
|
||||||
"en_US": "Show Original UI Style (Requires restart)",
|
"en_US": "Show Title Bar (Requires restart)",
|
||||||
"es_ES": "",
|
"es_ES": "Mostrar Barra de Título (Requiere reinicio)",
|
||||||
"fr_FR": "",
|
"fr_FR": "Afficher Barre de Titre (Nécessite redémarrage)",
|
||||||
"he_IL": "",
|
"he_IL": "",
|
||||||
"it_IT": "",
|
"it_IT": "Mostra barra del titolo (Richiede il riavvio)",
|
||||||
"ja_JP": "",
|
"ja_JP": "",
|
||||||
"ko_KR": "",
|
"ko_KR": "제목 표시줄 표시(다시 시작해야 함)",
|
||||||
"no_NO": "Vis original UI-stil (krever omstart)",
|
"no_NO": "Vis tittellinje (krever omstart)",
|
||||||
"pl_PL": "",
|
"pl_PL": "",
|
||||||
"pt_BR": "",
|
"pt_BR": "Mostrar Barra de Título (Requer reinicialização)",
|
||||||
"ru_RU": "",
|
"ru_RU": "Показать строку заголовка (требуется перезапуск)",
|
||||||
"sv_SE": "",
|
"sv_SE": "Visa titelrad (kräver omstart)",
|
||||||
"th_TH": "",
|
"th_TH": "",
|
||||||
"tr_TR": "",
|
"tr_TR": "",
|
||||||
"uk_UA": "",
|
"uk_UA": "Показувати рядок заголовка (Потрібен перезапуск)",
|
||||||
"zh_CN": "",
|
"zh_CN": "显示标题栏 (需要重启)",
|
||||||
"zh_TW": ""
|
"zh_TW": "顯示「標題列」 (需要重新開啟Ryujinx)"
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"ID": "SettingsTabGeneralShowOldUIToolTip",
|
|
||||||
"Translations": {
|
|
||||||
"ar_SA": "",
|
|
||||||
"de_DE": "",
|
|
||||||
"el_GR": "",
|
|
||||||
"en_US": "Show the older Avalonia Ryujinx UI reminiscent of Ryujinx 1.1.1403. This is enabled by default on platforms that are not Windows.\nThe classic-style title bar is back and major window layout reworkings are reversed; such as the settings navigation placement above this tooltip.",
|
|
||||||
"es_ES": "",
|
|
||||||
"fr_FR": "",
|
|
||||||
"he_IL": "",
|
|
||||||
"it_IT": "",
|
|
||||||
"ja_JP": "",
|
|
||||||
"ko_KR": "",
|
|
||||||
"no_NO": "Vis det eldre Avalonia Ryujinx-grensesnittet som minner om Ryujinx 1.1.1403. Dette er aktivert som standard på plattformer som ikke er Windows.\nTittellinjen i klassisk stil er tilbake, og store omarbeidinger av vindusoppsettet er reversert, for eksempel plasseringen av innstillingsnavigasjonen over dette verktøytipset.",
|
|
||||||
"pl_PL": "",
|
|
||||||
"pt_BR": "",
|
|
||||||
"ru_RU": "",
|
|
||||||
"sv_SE": "",
|
|
||||||
"th_TH": "",
|
|
||||||
"tr_TR": "",
|
|
||||||
"uk_UA": "",
|
|
||||||
"zh_CN": "",
|
|
||||||
"zh_TW": ""
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -7222,6 +7197,81 @@
|
|||||||
"zh_TW": "新增"
|
"zh_TW": "新增"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"ID": "ControllerSettingsModifiedNotification",
|
||||||
|
"Translations": {
|
||||||
|
"ar_SA": "(تم التعديل!)",
|
||||||
|
"de_DE": "(modifiziert!)",
|
||||||
|
"el_GR": "(τροποποιημένο!)",
|
||||||
|
"en_US": "(Modified!)",
|
||||||
|
"es_ES": "(modificado!)",
|
||||||
|
"fr_FR": "(modifié!)",
|
||||||
|
"he_IL": "(שונה!)",
|
||||||
|
"it_IT": "(modificato!)",
|
||||||
|
"ja_JP": "(変更済み!)",
|
||||||
|
"ko_KR": "(수정됨!)",
|
||||||
|
"no_NO": "(modifisert!)",
|
||||||
|
"pl_PL": "(zmodyfikowane!)",
|
||||||
|
"pt_BR": "(modificado!)",
|
||||||
|
"ru_RU": "(изменено!)",
|
||||||
|
"sv_SE": "(ändrad!)",
|
||||||
|
"th_TH": "(แก้ไขแล้ว!)",
|
||||||
|
"tr_TR": "(değiştirildi!)",
|
||||||
|
"uk_UA": "(модифіковано!)",
|
||||||
|
"zh_CN": "(已修改!)",
|
||||||
|
"zh_TW": "(已修改!)"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"ID": "ControllerSettingsDisableDeviceForSaving",
|
||||||
|
"Translations": {
|
||||||
|
"ar_SA": "تم إعداد التحكم.\n\nفي انتظار اتصال وحدة التحكم...",
|
||||||
|
"de_DE": "Steuerung konfiguriert.\n\nWarten auf die Verbindung des Controllers...",
|
||||||
|
"el_GR": "Η διαχείριση έχει ρυθμιστεί.\n\nΑναμένεται σύνδεση του χειριστηρίου...",
|
||||||
|
"en_US": "Control configured.\n\nWaiting for controller connection...",
|
||||||
|
"es_ES": "Control configurado.\n\nEsperando la conexión del controlador...",
|
||||||
|
"fr_FR": "Contrôle configuré.\n\nEn attente de la connexion du contrôleur...",
|
||||||
|
"he_IL": "השליטה הוגדרה.\n\nממתין לחיבור הבקר...",
|
||||||
|
"it_IT": "Controllo configurato.\n\nIn attesa della connessione del controller...",
|
||||||
|
"ja_JP": "コントロールが設定されました。\n\nコントローラーの接続を待っています...",
|
||||||
|
"ko_KR": "제어가 설정되었습니다.\n\n컨트롤러 연결 대기 중...",
|
||||||
|
"no_NO": "Kontroll konfigurert.\n\nVenter på tilkobling av kontroller...",
|
||||||
|
"pl_PL": "Sterowanie skonfigurowane.\n\nOczekiwanie na połączenie kontrolera...",
|
||||||
|
"pt_BR": "Controle configurado.\n\nAguardando conexão do controle...",
|
||||||
|
"ru_RU": "Управление настроено.\n\nОжидается подключение контроллера...",
|
||||||
|
"sv_SE": "Kontroll konfigurerad.\n\nVäntar på anslutning av kontrollen...",
|
||||||
|
"th_TH": "การควบคุมได้รับการตั้งค่าแล้ว\n\nกำลังรอการเชื่อมต่อคอนโทรลเลอร์...",
|
||||||
|
"tr_TR": "Kontrol yapılandırıldı.\n\nKontrolcü bağlantısı bekleniyor...",
|
||||||
|
"uk_UA": "Керування налаштовано.\n\nОчікується підключення контролера...",
|
||||||
|
"zh_CN": "控制已配置。\n\n等待控制器连接...",
|
||||||
|
"zh_TW": "控制已設定。\n\n等待控制器連接..."
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"ID": "ControllerSettingsUnlink",
|
||||||
|
"Translations": {
|
||||||
|
"ar_SA": "إلغاء الربط",
|
||||||
|
"de_DE": "Entkoppeln",
|
||||||
|
"el_GR": "Αποσύνδεση",
|
||||||
|
"en_US": "Unlink",
|
||||||
|
"es_ES": "Desvincular",
|
||||||
|
"fr_FR": "Dissocier",
|
||||||
|
"he_IL": "ניתוק קישור",
|
||||||
|
"it_IT": "Scollega",
|
||||||
|
"ja_JP": "リンク解除",
|
||||||
|
"ko_KR": "연결 해제",
|
||||||
|
"no_NO": "Frakoble",
|
||||||
|
"pl_PL": "Odłącz",
|
||||||
|
"pt_BR": "Desvincular",
|
||||||
|
"ru_RU": "Отвязать",
|
||||||
|
"sv_SE": "Koppla från",
|
||||||
|
"th_TH": "ยกเลิกการเชื่อมโยง",
|
||||||
|
"tr_TR": "Bağlantıyı Kes",
|
||||||
|
"uk_UA": "Відв'язати",
|
||||||
|
"zh_CN": "解除绑定",
|
||||||
|
"zh_TW": "解除綁定"
|
||||||
|
}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"ID": "ControllerSettingsRemove",
|
"ID": "ControllerSettingsRemove",
|
||||||
"Translations": {
|
"Translations": {
|
||||||
@@ -11872,6 +11922,31 @@
|
|||||||
"zh_TW": "儲存設定檔"
|
"zh_TW": "儲存設定檔"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"ID": "ControllerSettingsCancelCurrentChangesToolTip",
|
||||||
|
"Translations": {
|
||||||
|
"ar_SA": "إلغاء التغييرات الحالية",
|
||||||
|
"de_DE": "Aktuelle Änderungen abbrechen",
|
||||||
|
"el_GR": "Ακύρωση τρεχουσών αλλαγών",
|
||||||
|
"en_US": "Cancel current changes",
|
||||||
|
"es_ES": "Cancelar los cambios actuales",
|
||||||
|
"fr_FR": "Annuler les modifications en cours",
|
||||||
|
"he_IL": "ביטול השינויים הנוכחיים",
|
||||||
|
"it_IT": "Annulla le modifiche correnti",
|
||||||
|
"ja_JP": "現在の変更をキャンセル",
|
||||||
|
"ko_KR": "현재 변경 취소",
|
||||||
|
"no_NO": "Avbryt gjeldende endringer",
|
||||||
|
"pl_PL": "Anuluj bieżące zmiany",
|
||||||
|
"pt_BR": "Cancelar alterações atuais",
|
||||||
|
"ru_RU": "Отменить текущие изменения",
|
||||||
|
"sv_SE": "Avbryt aktuella ändringar",
|
||||||
|
"th_TH": "ยกเลิกการเปลี่ยนแปลงปัจจุบัน",
|
||||||
|
"tr_TR": "Geçerli değişiklikleri iptal et",
|
||||||
|
"uk_UA": "Скасувати поточні зміни",
|
||||||
|
"zh_CN": "取消当前更改",
|
||||||
|
"zh_TW": "取消當前變更"
|
||||||
|
}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"ID": "MenuBarFileToolsTakeScreenshot",
|
"ID": "MenuBarFileToolsTakeScreenshot",
|
||||||
"Translations": {
|
"Translations": {
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
using Avalonia.Markup.Xaml.MarkupExtensions;
|
using Avalonia.Markup.Xaml.MarkupExtensions;
|
||||||
using Humanizer;
|
|
||||||
using Projektanker.Icons.Avalonia;
|
using Projektanker.Icons.Avalonia;
|
||||||
using Ryujinx.Ava.Common.Locale;
|
using Ryujinx.Ava.Common.Locale;
|
||||||
|
|
||||||
@@ -25,17 +24,4 @@ namespace Ryujinx.Ava.Common.Markup
|
|||||||
protected override void ConfigureBindingExtension(CompiledBindingExtension bindingExtension)
|
protected override void ConfigureBindingExtension(CompiledBindingExtension bindingExtension)
|
||||||
=> bindingExtension.Source = LocaleManager.Instance;
|
=> bindingExtension.Source = LocaleManager.Instance;
|
||||||
}
|
}
|
||||||
|
|
||||||
internal class WindowTitleExtension(LocaleKeys key, bool includeVersion) : BasicMarkupExtension<string>
|
|
||||||
{
|
|
||||||
public WindowTitleExtension(LocaleKeys key) : this(key, true)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
public override string Name => "WindowTitleTranslation";
|
|
||||||
protected override string Value => RyujinxApp.FormatTitle(key, includeVersion);
|
|
||||||
|
|
||||||
protected override void ConfigureBindingExtension(CompiledBindingExtension bindingExtension)
|
|
||||||
=> bindingExtension.Source = LocaleManager.Instance;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -46,11 +46,12 @@ namespace Ryujinx.Ava.Systems.Configuration
|
|||||||
|
|
||||||
|
|
||||||
EnableDiscordIntegration.Value = cff.EnableDiscordIntegration;
|
EnableDiscordIntegration.Value = cff.EnableDiscordIntegration;
|
||||||
|
CheckUpdatesOnStart.Value = shouldLoadFromFile ? cff.CheckUpdatesOnStart : CheckUpdatesOnStart.Value; // Get from global config only
|
||||||
UpdateCheckerType.Value = shouldLoadFromFile ? cff.UpdateCheckerType : UpdateCheckerType.Value; // Get from global config only
|
UpdateCheckerType.Value = shouldLoadFromFile ? cff.UpdateCheckerType : UpdateCheckerType.Value; // Get from global config only
|
||||||
FocusLostActionType.Value = cff.FocusLostActionType;
|
FocusLostActionType.Value = cff.FocusLostActionType;
|
||||||
ShowConfirmExit.Value = shouldLoadFromFile ? cff.ShowConfirmExit : ShowConfirmExit.Value; // Get from global config only
|
ShowConfirmExit.Value = shouldLoadFromFile ? cff.ShowConfirmExit : ShowConfirmExit.Value; // Get from global config only
|
||||||
RememberWindowState.Value = shouldLoadFromFile ? cff.RememberWindowState : RememberWindowState.Value; // Get from global config only
|
RememberWindowState.Value = shouldLoadFromFile ? cff.RememberWindowState : RememberWindowState.Value; // Get from global config only
|
||||||
ShowOldUI.Value = shouldLoadFromFile ? cff.ShowTitleBar : ShowOldUI.Value; // Get from global config only
|
ShowTitleBar.Value = shouldLoadFromFile ? cff.ShowTitleBar : ShowTitleBar.Value; // Get from global config only
|
||||||
EnableHardwareAcceleration.Value = shouldLoadFromFile ? cff.EnableHardwareAcceleration : EnableHardwareAcceleration.Value; // Get from global config only
|
EnableHardwareAcceleration.Value = shouldLoadFromFile ? cff.EnableHardwareAcceleration : EnableHardwareAcceleration.Value; // Get from global config only
|
||||||
HideCursor.Value = cff.HideCursor;
|
HideCursor.Value = cff.HideCursor;
|
||||||
|
|
||||||
|
|||||||
@@ -783,6 +783,11 @@ namespace Ryujinx.Ava.Systems.Configuration
|
|||||||
/// Enables or disables Discord Rich Presence
|
/// Enables or disables Discord Rich Presence
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public ReactiveObject<bool> EnableDiscordIntegration { get; private set; }
|
public ReactiveObject<bool> EnableDiscordIntegration { get; private set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Checks for updates when Ryujinx starts when enabled
|
||||||
|
/// </summary>
|
||||||
|
public ReactiveObject<bool> CheckUpdatesOnStart { get; private set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Checks for updates when Ryujinx starts when enabled, either prompting when an update is found or just showing a notification.
|
/// Checks for updates when Ryujinx starts when enabled, either prompting when an update is found or just showing a notification.
|
||||||
@@ -805,9 +810,9 @@ namespace Ryujinx.Ava.Systems.Configuration
|
|||||||
public ReactiveObject<bool> RememberWindowState { get; private set; }
|
public ReactiveObject<bool> RememberWindowState { get; private set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Disable the new title bar layout & window layout changes.
|
/// Enables or disables the redesigned title bar
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public ReactiveObject<bool> ShowOldUI { get; private set; }
|
public ReactiveObject<bool> ShowTitleBar { get; private set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Enables hardware-accelerated rendering for Avalonia
|
/// Enables hardware-accelerated rendering for Avalonia
|
||||||
@@ -828,14 +833,15 @@ namespace Ryujinx.Ava.Systems.Configuration
|
|||||||
Hid = new HidSection();
|
Hid = new HidSection();
|
||||||
Multiplayer = new MultiplayerSection();
|
Multiplayer = new MultiplayerSection();
|
||||||
Hacks = new HacksSection();
|
Hacks = new HacksSection();
|
||||||
|
EnableDiscordIntegration = new ReactiveObject<bool>();
|
||||||
|
CheckUpdatesOnStart = new ReactiveObject<bool>();
|
||||||
UpdateCheckerType = new ReactiveObject<UpdaterType>();
|
UpdateCheckerType = new ReactiveObject<UpdaterType>();
|
||||||
FocusLostActionType = new ReactiveObject<FocusLostType>();
|
FocusLostActionType = new ReactiveObject<FocusLostType>();
|
||||||
HideCursor = new ReactiveObject<HideCursorMode>();
|
|
||||||
EnableDiscordIntegration = new ReactiveObject<bool>();
|
|
||||||
ShowConfirmExit = new ReactiveObject<bool>();
|
ShowConfirmExit = new ReactiveObject<bool>();
|
||||||
RememberWindowState = new ReactiveObject<bool>();
|
RememberWindowState = new ReactiveObject<bool>();
|
||||||
ShowOldUI = new ReactiveObject<bool>();
|
ShowTitleBar = new ReactiveObject<bool>();
|
||||||
EnableHardwareAcceleration = new ReactiveObject<bool>();
|
EnableHardwareAcceleration = new ReactiveObject<bool>();
|
||||||
|
HideCursor = new ReactiveObject<HideCursorMode>();
|
||||||
}
|
}
|
||||||
|
|
||||||
public HleConfiguration CreateHleConfiguration() =>
|
public HleConfiguration CreateHleConfiguration() =>
|
||||||
|
|||||||
@@ -56,11 +56,12 @@ namespace Ryujinx.Ava.Systems.Configuration
|
|||||||
MatchSystemTime = System.MatchSystemTime,
|
MatchSystemTime = System.MatchSystemTime,
|
||||||
DockedMode = System.EnableDockedMode,
|
DockedMode = System.EnableDockedMode,
|
||||||
EnableDiscordIntegration = EnableDiscordIntegration,
|
EnableDiscordIntegration = EnableDiscordIntegration,
|
||||||
|
CheckUpdatesOnStart = CheckUpdatesOnStart,
|
||||||
UpdateCheckerType = UpdateCheckerType,
|
UpdateCheckerType = UpdateCheckerType,
|
||||||
FocusLostActionType = FocusLostActionType,
|
FocusLostActionType = FocusLostActionType,
|
||||||
ShowConfirmExit = ShowConfirmExit,
|
ShowConfirmExit = ShowConfirmExit,
|
||||||
RememberWindowState = RememberWindowState,
|
RememberWindowState = RememberWindowState,
|
||||||
ShowTitleBar = ShowOldUI,
|
ShowTitleBar = ShowTitleBar,
|
||||||
EnableHardwareAcceleration = EnableHardwareAcceleration,
|
EnableHardwareAcceleration = EnableHardwareAcceleration,
|
||||||
HideCursor = HideCursor,
|
HideCursor = HideCursor,
|
||||||
VSyncMode = Graphics.VSyncMode,
|
VSyncMode = Graphics.VSyncMode,
|
||||||
@@ -182,7 +183,7 @@ namespace Ryujinx.Ava.Systems.Configuration
|
|||||||
FocusLostActionType.Value = FocusLostType.DoNothing;
|
FocusLostActionType.Value = FocusLostType.DoNothing;
|
||||||
ShowConfirmExit.Value = true;
|
ShowConfirmExit.Value = true;
|
||||||
RememberWindowState.Value = true;
|
RememberWindowState.Value = true;
|
||||||
ShowOldUI.Value = !OperatingSystem.IsWindows();
|
ShowTitleBar.Value = !OperatingSystem.IsWindows();
|
||||||
EnableHardwareAcceleration.Value = true;
|
EnableHardwareAcceleration.Value = true;
|
||||||
HideCursor.Value = HideCursorMode.OnIdle;
|
HideCursor.Value = HideCursorMode.OnIdle;
|
||||||
Graphics.VSyncMode.Value = VSyncMode.Switch;
|
Graphics.VSyncMode.Value = VSyncMode.Switch;
|
||||||
|
|||||||
@@ -1,29 +0,0 @@
|
|||||||
using Avalonia;
|
|
||||||
using Avalonia.Controls;
|
|
||||||
using Avalonia.Layout;
|
|
||||||
using Avalonia.Media.Imaging;
|
|
||||||
using Ryujinx.Ava.Systems.Configuration;
|
|
||||||
using Ryujinx.Ava.UI.ViewModels;
|
|
||||||
using System.Reflection;
|
|
||||||
|
|
||||||
namespace Ryujinx.Ava.UI.Controls
|
|
||||||
{
|
|
||||||
public class RyujinxLogo : Image
|
|
||||||
{
|
|
||||||
// The UI specifically uses a thicker bordered variant of the icon to avoid crunching out the border at lower resolutions.
|
|
||||||
// For an example of this, download canary 1.2.95, then open the settings menu, and look at the icon in the top-left.
|
|
||||||
// The border gets reduced to colored pixels in the 4 corners.
|
|
||||||
public static readonly Bitmap Bitmap =
|
|
||||||
new(Assembly.GetAssembly(typeof(MainWindowViewModel))!
|
|
||||||
.GetManifestResourceStream("Ryujinx.Assets.UIImages.Logo_Ryujinx_AntiAlias.png")!);
|
|
||||||
|
|
||||||
public RyujinxLogo()
|
|
||||||
{
|
|
||||||
Margin = new Thickness(7, 7, 7, 0);
|
|
||||||
Height = 25;
|
|
||||||
Width = 25;
|
|
||||||
Source = Bitmap;
|
|
||||||
IsVisible = !ConfigurationState.Instance.ShowOldUI;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -95,18 +95,21 @@ namespace Ryujinx.Ava.UI.ViewModels.Input
|
|||||||
}
|
}
|
||||||
|
|
||||||
public async void ShowMotionConfig()
|
public async void ShowMotionConfig()
|
||||||
{
|
{
|
||||||
await MotionInputView.Show(this);
|
await MotionInputView.Show(this);
|
||||||
|
ParentModel.IsModified = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
public async void ShowRumbleConfig()
|
public async void ShowRumbleConfig()
|
||||||
{
|
{
|
||||||
await RumbleInputView.Show(this);
|
await RumbleInputView.Show(this);
|
||||||
|
ParentModel.IsModified = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
public async void ShowLedConfig()
|
public async void ShowLedConfig()
|
||||||
{
|
{
|
||||||
await LedInputView.Show(this);
|
await LedInputView.Show(this);
|
||||||
|
ParentModel.IsModified = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void OnParentModelChanged()
|
public void OnParentModelChanged()
|
||||||
|
|||||||
@@ -88,13 +88,41 @@ namespace Ryujinx.Ava.UI.ViewModels.Input
|
|||||||
public bool IsKeyboard => !IsController;
|
public bool IsKeyboard => !IsController;
|
||||||
public bool IsRight { get; set; }
|
public bool IsRight { get; set; }
|
||||||
public bool IsLeft { get; set; }
|
public bool IsLeft { get; set; }
|
||||||
|
public int DeviceIndexBeforeChange { get; set; }
|
||||||
public bool HasLed => SelectedGamepad.Features.HasFlag(GamepadFeaturesFlag.Led);
|
public bool HasLed => SelectedGamepad.Features.HasFlag(GamepadFeaturesFlag.Led);
|
||||||
public bool CanClearLed => SelectedGamepad.Name.ContainsIgnoreCase("DualSense");
|
public bool CanClearLed => SelectedGamepad.Name.ContainsIgnoreCase("DualSense");
|
||||||
|
|
||||||
public bool IsModified { get; set; }
|
public bool _isChangeTrackingActive;
|
||||||
|
|
||||||
|
public bool _isModified;
|
||||||
|
public bool IsModified
|
||||||
|
{
|
||||||
|
get => _isModified;
|
||||||
|
set
|
||||||
|
{
|
||||||
|
_isModified = value;
|
||||||
|
OnPropertyChanged();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public event Action NotifyChangesEvent;
|
public event Action NotifyChangesEvent;
|
||||||
|
|
||||||
|
|
||||||
|
public string _profileChoose;
|
||||||
|
public string ProfileChoose
|
||||||
|
{
|
||||||
|
get => _profileChoose;
|
||||||
|
set
|
||||||
|
{
|
||||||
|
// When you select a profile, the settings from the profile will be applied.
|
||||||
|
// To save the settings, you still need to click the apply button
|
||||||
|
|
||||||
|
_profileChoose = value;
|
||||||
|
LoadProfile();
|
||||||
|
OnPropertyChanged();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public object ConfigViewModel
|
public object ConfigViewModel
|
||||||
{
|
{
|
||||||
get => _configViewModel;
|
get => _configViewModel;
|
||||||
@@ -120,14 +148,14 @@ namespace Ryujinx.Ava.UI.ViewModels.Input
|
|||||||
set
|
set
|
||||||
{
|
{
|
||||||
if (IsModified)
|
if (IsModified)
|
||||||
{
|
{
|
||||||
|
|
||||||
_playerIdChoose = value;
|
_playerIdChoose = value;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
IsModified = false;
|
IsModified = false;
|
||||||
_playerId = value;
|
_playerId = value;
|
||||||
|
_isChangeTrackingActive = false;
|
||||||
|
|
||||||
if (!Enum.IsDefined<PlayerIndex>(_playerId))
|
if (!Enum.IsDefined<PlayerIndex>(_playerId))
|
||||||
{
|
{
|
||||||
@@ -135,13 +163,13 @@ namespace Ryujinx.Ava.UI.ViewModels.Input
|
|||||||
|
|
||||||
}
|
}
|
||||||
_isLoaded = false;
|
_isLoaded = false;
|
||||||
|
|
||||||
LoadConfiguration();
|
LoadConfiguration();
|
||||||
LoadDevice();
|
LoadDevice();
|
||||||
LoadProfiles();
|
LoadProfiles();
|
||||||
|
|
||||||
|
DeviceIndexBeforeChange = Device;
|
||||||
_isLoaded = true;
|
_isLoaded = true;
|
||||||
|
_isChangeTrackingActive = true;
|
||||||
OnPropertyChanged();
|
OnPropertyChanged();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -185,11 +213,12 @@ namespace Ryujinx.Ava.UI.ViewModels.Input
|
|||||||
IsLeft = false;
|
IsLeft = false;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
LoadInputDriver();
|
LoadInputDriver();
|
||||||
LoadProfiles();
|
LoadProfiles();
|
||||||
|
SetChangeTrackingActive();
|
||||||
}
|
}
|
||||||
|
|
||||||
OnPropertyChanged();
|
OnPropertyChanged();
|
||||||
NotifyChanges();
|
NotifyChanges();
|
||||||
}
|
}
|
||||||
@@ -229,6 +258,11 @@ namespace Ryujinx.Ava.UI.ViewModels.Input
|
|||||||
get => _device;
|
get => _device;
|
||||||
set
|
set
|
||||||
{
|
{
|
||||||
|
if (!IsModified)
|
||||||
|
{
|
||||||
|
DeviceIndexBeforeChange = _device;
|
||||||
|
}
|
||||||
|
|
||||||
_device = value < 0 ? 0 : value;
|
_device = value < 0 ? 0 : value;
|
||||||
|
|
||||||
if (_device >= Devices.Count)
|
if (_device >= Devices.Count)
|
||||||
@@ -248,13 +282,28 @@ namespace Ryujinx.Ava.UI.ViewModels.Input
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
FindPairedDevice();
|
||||||
|
SetChangeTrackingActive();
|
||||||
OnPropertyChanged();
|
OnPropertyChanged();
|
||||||
NotifyChanges();
|
NotifyChanges();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public InputConfig Config { get; set; }
|
public InputConfig Config { get; set; }
|
||||||
|
|
||||||
|
public bool _notificationView;
|
||||||
|
|
||||||
|
public bool NotificationView
|
||||||
|
{
|
||||||
|
get => _notificationView;
|
||||||
|
set
|
||||||
|
{
|
||||||
|
_notificationView = value;
|
||||||
|
OnPropertyChanged();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public InputViewModel(UserControl owner) : this()
|
public InputViewModel(UserControl owner) : this()
|
||||||
{
|
{
|
||||||
if (Program.PreviewerDetached)
|
if (Program.PreviewerDetached)
|
||||||
@@ -274,6 +323,8 @@ namespace Ryujinx.Ava.UI.ViewModels.Input
|
|||||||
|
|
||||||
PlayerId = PlayerIndex.Player1;
|
PlayerId = PlayerIndex.Player1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
_isChangeTrackingActive = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
public InputViewModel()
|
public InputViewModel()
|
||||||
@@ -311,8 +362,54 @@ namespace Ryujinx.Ava.UI.ViewModels.Input
|
|||||||
{
|
{
|
||||||
ConfigViewModel = new ControllerInputViewModel(this, new GamepadInputConfig(controllerInputConfig), VisualStick);
|
ConfigViewModel = new ControllerInputViewModel(this, new GamepadInputConfig(controllerInputConfig), VisualStick);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
FindPairedDevice();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void FindPairedDevice()
|
||||||
|
{
|
||||||
|
// This feature allows you to display a notification
|
||||||
|
// if a configuration is found, but the gamepad is not connected.
|
||||||
|
if (Config != null)
|
||||||
|
{
|
||||||
|
(DeviceType Type, string Id, string Name) activeDevice = Devices.FirstOrDefault(d => d.Id == Config.Id);
|
||||||
|
|
||||||
|
if (activeDevice.Id != Config.Id)
|
||||||
|
{
|
||||||
|
// display notification when input device is turned off, and
|
||||||
|
// if device and configuration do not match (different controllers)
|
||||||
|
NotificationView = true;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
NotificationView = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
NotificationView = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void SetChangeTrackingActive()
|
||||||
|
{
|
||||||
|
|
||||||
|
if (_isChangeTrackingActive)
|
||||||
|
{
|
||||||
|
IsModified = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public void DisableDeviceForSaving()
|
||||||
|
{
|
||||||
|
// "Disabled" mode is available after unbinding the device
|
||||||
|
// NOTE: the IsModified flag to be able to apply the settings.
|
||||||
|
IsModified = true;
|
||||||
|
NotificationView = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
public void LoadDevice()
|
public void LoadDevice()
|
||||||
{
|
{
|
||||||
if (Config == null || Config.Backend == InputBackendType.Invalid)
|
if (Config == null || Config.Backend == InputBackendType.Invalid)
|
||||||
@@ -378,14 +475,37 @@ namespace Ryujinx.Ava.UI.ViewModels.Input
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void HandleOnGamepadDisconnected(string id)
|
private async void HandleOnGamepadDisconnected(string id)
|
||||||
{
|
{
|
||||||
Dispatcher.UIThread.Post(LoadDevices);
|
_isChangeTrackingActive = false;
|
||||||
|
await Dispatcher.UIThread.InvokeAsync(() =>
|
||||||
|
{
|
||||||
|
LoadDevices();
|
||||||
|
|
||||||
|
IsModified = true;
|
||||||
|
LoadSavedConfiguration();
|
||||||
|
FindPairedDevice();
|
||||||
|
|
||||||
|
_isChangeTrackingActive = true;
|
||||||
|
return System.Threading.Tasks.Task.CompletedTask;
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
private void HandleOnGamepadConnected(string id)
|
private async void HandleOnGamepadConnected(string id)
|
||||||
{
|
{
|
||||||
Dispatcher.UIThread.Post(LoadDevices);
|
_isChangeTrackingActive = false;
|
||||||
|
await Dispatcher.UIThread.InvokeAsync(() =>
|
||||||
|
{
|
||||||
|
LoadDevices();
|
||||||
|
|
||||||
|
if (Config != null)
|
||||||
|
{
|
||||||
|
// Load configuration after connection if it is in the configuration file
|
||||||
|
IsModified = true;
|
||||||
|
LoadSavedConfiguration();
|
||||||
|
}
|
||||||
|
_isChangeTrackingActive = true;
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
private string GetCurrentGamepadId()
|
private string GetCurrentGamepadId()
|
||||||
@@ -688,6 +808,12 @@ namespace Ryujinx.Ava.UI.ViewModels.Input
|
|||||||
return config;
|
return config;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void LoadProfileButton()
|
||||||
|
{
|
||||||
|
IsModified = true;
|
||||||
|
LoadProfile();
|
||||||
|
}
|
||||||
|
|
||||||
public async void LoadProfile()
|
public async void LoadProfile()
|
||||||
{
|
{
|
||||||
if (Device == 0)
|
if (Device == 0)
|
||||||
@@ -739,9 +865,12 @@ namespace Ryujinx.Ava.UI.ViewModels.Input
|
|||||||
{
|
{
|
||||||
_isLoaded = false;
|
_isLoaded = false;
|
||||||
|
|
||||||
|
config.Id = null; // ignore device IDs (there is no longer a need to store device IDs for presets due to their independence from devices)
|
||||||
|
|
||||||
LoadConfiguration(config);
|
LoadConfiguration(config);
|
||||||
|
|
||||||
LoadDevice();
|
// This line of code hard-links profiles to controllers, the commented line allows profiles to be applied to all controllers
|
||||||
|
// LoadDevice();
|
||||||
|
|
||||||
_isLoaded = true;
|
_isLoaded = true;
|
||||||
|
|
||||||
@@ -793,6 +922,8 @@ namespace Ryujinx.Ava.UI.ViewModels.Input
|
|||||||
await File.WriteAllTextAsync(path, jsonString);
|
await File.WriteAllTextAsync(path, jsonString);
|
||||||
|
|
||||||
LoadProfiles();
|
LoadProfiles();
|
||||||
|
|
||||||
|
ProfileChoose = ProfileName; // Show new profile
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -825,14 +956,40 @@ namespace Ryujinx.Ava.UI.ViewModels.Input
|
|||||||
}
|
}
|
||||||
|
|
||||||
LoadProfiles();
|
LoadProfiles();
|
||||||
|
|
||||||
|
ProfileChoose = ProfilesList[0].ToString(); // Show default profile
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void LoadSavedConfiguration()
|
||||||
|
{
|
||||||
|
// Restores settings and sets the previously selected device to the last saved state
|
||||||
|
// NOTE: The current order allows the configuration and device to be loaded correctly until the configuration is changed.
|
||||||
|
|
||||||
|
if (IsModified) // Fixes random gamepad appearance in "disabled" option
|
||||||
|
{
|
||||||
|
Device = DeviceIndexBeforeChange;
|
||||||
|
|
||||||
|
LoadDevice();
|
||||||
|
LoadConfiguration();
|
||||||
|
|
||||||
|
IsModified = false;
|
||||||
|
|
||||||
|
OnPropertyChanged();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Save()
|
public void Save()
|
||||||
{
|
{
|
||||||
IsModified = false;
|
|
||||||
|
if (!IsModified)
|
||||||
|
{
|
||||||
|
return; //If the input settings were not touched, then do nothing
|
||||||
|
}
|
||||||
|
|
||||||
List<InputConfig> newConfig = [];
|
IsModified = false;
|
||||||
|
DeviceIndexBeforeChange = Device;
|
||||||
|
List <InputConfig> newConfig = [];
|
||||||
|
|
||||||
newConfig.AddRange(ConfigurationState.Instance.Hid.InputConfig.Value);
|
newConfig.AddRange(ConfigurationState.Instance.Hid.InputConfig.Value);
|
||||||
|
|
||||||
|
|||||||
@@ -137,6 +137,13 @@ namespace Ryujinx.Ava.UI.ViewModels
|
|||||||
// Key is Title ID
|
// Key is Title ID
|
||||||
public SafeDictionary<string, LdnGameData.Array> LdnData = [];
|
public SafeDictionary<string, LdnGameData.Array> LdnData = [];
|
||||||
|
|
||||||
|
// The UI specifically uses a thicker bordered variant of the icon to avoid crunching out the border at lower resolutions.
|
||||||
|
// For an example of this, download canary 1.2.95, then open the settings menu, and look at the icon in the top-left.
|
||||||
|
// The border gets reduced to colored pixels in the 4 corners.
|
||||||
|
public static readonly Bitmap IconBitmap =
|
||||||
|
new(Assembly.GetAssembly(typeof(MainWindowViewModel))!
|
||||||
|
.GetManifestResourceStream("Ryujinx.Assets.UIImages.Logo_Ryujinx_AntiAlias.png")!);
|
||||||
|
|
||||||
public MainWindow Window { get; init; }
|
public MainWindow Window { get; init; }
|
||||||
|
|
||||||
internal AppHost AppHost { get; set; }
|
internal AppHost AppHost { get; set; }
|
||||||
@@ -1787,7 +1794,7 @@ namespace Ryujinx.Ava.UI.ViewModels
|
|||||||
if (WindowState is not WindowState.Normal)
|
if (WindowState is not WindowState.Normal)
|
||||||
{
|
{
|
||||||
WindowState = WindowState.Normal;
|
WindowState = WindowState.Normal;
|
||||||
Window.TitleBar.ExtendsContentIntoTitleBar = !ConfigurationState.Instance.ShowOldUI;
|
Window.TitleBar.ExtendsContentIntoTitleBar = !ConfigurationState.Instance.ShowTitleBar;
|
||||||
|
|
||||||
if (IsGameRunning)
|
if (IsGameRunning)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -130,10 +130,11 @@ namespace Ryujinx.Ava.UI.ViewModels
|
|||||||
public bool IsOpenGLAvailable => !OperatingSystem.IsMacOS();
|
public bool IsOpenGLAvailable => !OperatingSystem.IsMacOS();
|
||||||
|
|
||||||
public bool EnableDiscordIntegration { get; set; }
|
public bool EnableDiscordIntegration { get; set; }
|
||||||
|
public bool CheckUpdatesOnStart { get; set; }
|
||||||
public bool ShowConfirmExit { get; set; }
|
public bool ShowConfirmExit { get; set; }
|
||||||
public bool IgnoreApplet { get; set; }
|
public bool IgnoreApplet { get; set; }
|
||||||
public bool RememberWindowState { get; set; }
|
public bool RememberWindowState { get; set; }
|
||||||
public bool ShowOldUI { get; set; }
|
public bool ShowTitleBar { get; set; }
|
||||||
public int HideCursor { get; set; }
|
public int HideCursor { get; set; }
|
||||||
public int UpdateCheckerType { get; set; }
|
public int UpdateCheckerType { get; set; }
|
||||||
public bool EnableDockedMode { get; set; }
|
public bool EnableDockedMode { get; set; }
|
||||||
@@ -536,9 +537,10 @@ namespace Ryujinx.Ava.UI.ViewModels
|
|||||||
|
|
||||||
// User Interface
|
// User Interface
|
||||||
EnableDiscordIntegration = config.EnableDiscordIntegration;
|
EnableDiscordIntegration = config.EnableDiscordIntegration;
|
||||||
|
CheckUpdatesOnStart = config.CheckUpdatesOnStart;
|
||||||
ShowConfirmExit = config.ShowConfirmExit;
|
ShowConfirmExit = config.ShowConfirmExit;
|
||||||
RememberWindowState = config.RememberWindowState;
|
RememberWindowState = config.RememberWindowState;
|
||||||
ShowOldUI = config.ShowOldUI;
|
ShowTitleBar = config.ShowTitleBar;
|
||||||
HideCursor = (int)config.HideCursor.Value;
|
HideCursor = (int)config.HideCursor.Value;
|
||||||
UpdateCheckerType = (int)config.UpdateCheckerType.Value;
|
UpdateCheckerType = (int)config.UpdateCheckerType.Value;
|
||||||
FocusLostActionType = (int)config.FocusLostActionType.Value;
|
FocusLostActionType = (int)config.FocusLostActionType.Value;
|
||||||
@@ -644,9 +646,10 @@ namespace Ryujinx.Ava.UI.ViewModels
|
|||||||
|
|
||||||
// User Interface
|
// User Interface
|
||||||
config.EnableDiscordIntegration.Value = EnableDiscordIntegration;
|
config.EnableDiscordIntegration.Value = EnableDiscordIntegration;
|
||||||
|
config.CheckUpdatesOnStart.Value = CheckUpdatesOnStart;
|
||||||
config.ShowConfirmExit.Value = ShowConfirmExit;
|
config.ShowConfirmExit.Value = ShowConfirmExit;
|
||||||
config.RememberWindowState.Value = RememberWindowState;
|
config.RememberWindowState.Value = RememberWindowState;
|
||||||
config.ShowOldUI.Value = ShowOldUI;
|
config.ShowTitleBar.Value = ShowTitleBar;
|
||||||
config.HideCursor.Value = (HideCursorMode)HideCursor;
|
config.HideCursor.Value = (HideCursorMode)HideCursor;
|
||||||
config.UpdateCheckerType.Value = (UpdaterType)UpdateCheckerType;
|
config.UpdateCheckerType.Value = (UpdaterType)UpdateCheckerType;
|
||||||
config.FocusLostActionType.Value = (FocusLostType)FocusLostActionType;
|
config.FocusLostActionType.Value = (FocusLostType)FocusLostActionType;
|
||||||
|
|||||||
@@ -64,8 +64,9 @@ namespace Ryujinx.Ava.UI.Views.Input
|
|||||||
};
|
};
|
||||||
|
|
||||||
if (!float.IsNaN(_changeSlider) && _changeSlider != (float)check.Value)
|
if (!float.IsNaN(_changeSlider) && _changeSlider != (float)check.Value)
|
||||||
{
|
{
|
||||||
(DataContext as ControllerInputViewModel)!.ParentModel.IsModified = true;
|
FlagInputConfigChanged();
|
||||||
|
|
||||||
_changeSlider = (float)check.Value;
|
_changeSlider = (float)check.Value;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -75,7 +76,8 @@ namespace Ryujinx.Ava.UI.Views.Input
|
|||||||
{
|
{
|
||||||
if (sender is CheckBox { IsPointerOver: true })
|
if (sender is CheckBox { IsPointerOver: true })
|
||||||
{
|
{
|
||||||
(DataContext as ControllerInputViewModel)!.ParentModel.IsModified = true;
|
FlagInputConfigChanged();
|
||||||
|
|
||||||
_currentAssigner?.Cancel();
|
_currentAssigner?.Cancel();
|
||||||
_currentAssigner = null;
|
_currentAssigner = null;
|
||||||
}
|
}
|
||||||
@@ -102,7 +104,7 @@ namespace Ryujinx.Ava.UI.Views.Input
|
|||||||
this.Focus(NavigationMethod.Pointer);
|
this.Focus(NavigationMethod.Pointer);
|
||||||
|
|
||||||
PointerPressed += MouseClick;
|
PointerPressed += MouseClick;
|
||||||
|
|
||||||
ControllerInputViewModel viewModel = (DataContext as ControllerInputViewModel);
|
ControllerInputViewModel viewModel = (DataContext as ControllerInputViewModel);
|
||||||
|
|
||||||
IKeyboard keyboard =
|
IKeyboard keyboard =
|
||||||
@@ -115,7 +117,7 @@ namespace Ryujinx.Ava.UI.Views.Input
|
|||||||
if (e.ButtonValue.HasValue)
|
if (e.ButtonValue.HasValue)
|
||||||
{
|
{
|
||||||
Button buttonValue = e.ButtonValue.Value;
|
Button buttonValue = e.ButtonValue.Value;
|
||||||
viewModel.ParentModel.IsModified = true;
|
FlagInputConfigChanged();
|
||||||
|
|
||||||
switch (button.Name)
|
switch (button.Name)
|
||||||
{
|
{
|
||||||
@@ -209,6 +211,11 @@ namespace Ryujinx.Ava.UI.Views.Input
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void FlagInputConfigChanged()
|
||||||
|
{
|
||||||
|
(DataContext as ControllerInputViewModel)!.ParentModel.IsModified = true;
|
||||||
|
}
|
||||||
|
|
||||||
private void MouseClick(object sender, PointerPressedEventArgs e)
|
private void MouseClick(object sender, PointerPressedEventArgs e)
|
||||||
{
|
{
|
||||||
bool shouldUnbind = e.GetCurrentPoint(this).Properties.IsMiddleButtonPressed;
|
bool shouldUnbind = e.GetCurrentPoint(this).Properties.IsMiddleButtonPressed;
|
||||||
@@ -232,7 +239,6 @@ namespace Ryujinx.Ava.UI.Views.Input
|
|||||||
{
|
{
|
||||||
gamepad?.ClearLed();
|
gamepad?.ClearLed();
|
||||||
}
|
}
|
||||||
|
|
||||||
_currentAssigner?.Cancel();
|
_currentAssigner?.Cancel();
|
||||||
_currentAssigner = null;
|
_currentAssigner = null;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -41,13 +41,20 @@
|
|||||||
Grid.Column="0"
|
Grid.Column="0"
|
||||||
Margin="2"
|
Margin="2"
|
||||||
HorizontalAlignment="Stretch"
|
HorizontalAlignment="Stretch"
|
||||||
VerticalAlignment="Center" ColumnDefinitions="Auto,*">
|
VerticalAlignment="Center" ColumnDefinitions="Auto,*,Auto">
|
||||||
<TextBlock
|
<StackPanel
|
||||||
|
Orientation="Vertical"
|
||||||
Margin="5,0,10,0"
|
Margin="5,0,10,0"
|
||||||
Width="90"
|
|
||||||
HorizontalAlignment="Left"
|
HorizontalAlignment="Left"
|
||||||
VerticalAlignment="Center"
|
VerticalAlignment="Center"
|
||||||
Text="{ext:Locale ControllerSettingsPlayer}" />
|
Width="90">
|
||||||
|
<TextBlock
|
||||||
|
Text="{ext:Locale ControllerSettingsPlayer}" />
|
||||||
|
<TextBlock
|
||||||
|
Classes="pending"
|
||||||
|
Text ="{ext:Locale ControllerSettingsModifiedNotification}"
|
||||||
|
IsVisible="{Binding IsModified}"/>
|
||||||
|
</StackPanel>
|
||||||
<ComboBox
|
<ComboBox
|
||||||
Grid.Column="1"
|
Grid.Column="1"
|
||||||
Name="PlayerIndexBox"
|
Name="PlayerIndexBox"
|
||||||
@@ -62,6 +69,18 @@
|
|||||||
</DataTemplate>
|
</DataTemplate>
|
||||||
</ComboBox.ItemTemplate>
|
</ComboBox.ItemTemplate>
|
||||||
</ComboBox>
|
</ComboBox>
|
||||||
|
<Button
|
||||||
|
Grid.Column="2"
|
||||||
|
MinWidth="0"
|
||||||
|
Margin="5,0,0,0"
|
||||||
|
VerticalAlignment="Center"
|
||||||
|
ToolTip.Tip="{ext:Locale ControllerSettingsCancelCurrentChangesToolTip}"
|
||||||
|
Command="{Binding LoadSavedConfiguration}">
|
||||||
|
<ui:SymbolIcon
|
||||||
|
Symbol="Undo"
|
||||||
|
FontSize="15"
|
||||||
|
Height="20" />
|
||||||
|
</Button>
|
||||||
</Grid>
|
</Grid>
|
||||||
<!-- Profile Selection -->
|
<!-- Profile Selection -->
|
||||||
<Grid
|
<Grid
|
||||||
@@ -81,7 +100,8 @@
|
|||||||
Name="ProfileBox"
|
Name="ProfileBox"
|
||||||
HorizontalAlignment="Stretch"
|
HorizontalAlignment="Stretch"
|
||||||
VerticalAlignment="Center"
|
VerticalAlignment="Center"
|
||||||
SelectedIndex="0"
|
SelectedItem="{Binding ProfileChoose, Mode=TwoWay}"
|
||||||
|
SelectionChanged="ComboBox_SelectionChanged"
|
||||||
ItemsSource="{Binding ProfilesList}"
|
ItemsSource="{Binding ProfilesList}"
|
||||||
Text="{Binding ProfileName, Mode=TwoWay}" />
|
Text="{Binding ProfileName, Mode=TwoWay}" />
|
||||||
<Button
|
<Button
|
||||||
@@ -90,7 +110,7 @@
|
|||||||
Margin="5,0,0,0"
|
Margin="5,0,0,0"
|
||||||
VerticalAlignment="Center"
|
VerticalAlignment="Center"
|
||||||
ToolTip.Tip="{ext:Locale ControllerSettingsLoadProfileToolTip}"
|
ToolTip.Tip="{ext:Locale ControllerSettingsLoadProfileToolTip}"
|
||||||
Command="{Binding LoadProfile}">
|
Command="{Binding LoadProfileButton}">
|
||||||
<ui:SymbolIcon
|
<ui:SymbolIcon
|
||||||
Symbol="View"
|
Symbol="View"
|
||||||
FontSize="15"
|
FontSize="15"
|
||||||
@@ -148,7 +168,7 @@
|
|||||||
MinWidth="0"
|
MinWidth="0"
|
||||||
Margin="5,0,0,0"
|
Margin="5,0,0,0"
|
||||||
VerticalAlignment="Center"
|
VerticalAlignment="Center"
|
||||||
Command="{Binding LoadDevices}">
|
Command="{Binding LoadDevice}">
|
||||||
<ui:SymbolIcon
|
<ui:SymbolIcon
|
||||||
Symbol="Refresh"
|
Symbol="Refresh"
|
||||||
FontSize="15"
|
FontSize="15"
|
||||||
@@ -181,15 +201,37 @@
|
|||||||
</Grid>
|
</Grid>
|
||||||
</Grid>
|
</Grid>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
<ContentControl Content="{Binding ConfigViewModel}" IsVisible="{Binding ShowSettings}">
|
<ContentControl IsVisible="{Binding NotificationView}">
|
||||||
<ContentControl.DataTemplates>
|
<ContentControl.Content>
|
||||||
<DataTemplate DataType="viewModels:ControllerInputViewModel">
|
<StackPanel>
|
||||||
<views:ControllerInputView />
|
<TextBlock
|
||||||
</DataTemplate>
|
Margin="5,20,0,0"
|
||||||
<DataTemplate DataType="viewModels:KeyboardInputViewModel">
|
Text="{ext:Locale ControllerSettingsDisableDeviceForSaving}" />
|
||||||
<views:KeyboardInputView />
|
|
||||||
</DataTemplate>
|
<Button
|
||||||
</ContentControl.DataTemplates>
|
MinWidth="0"
|
||||||
|
Width="90"
|
||||||
|
Height="27"
|
||||||
|
Margin="5,10,0,0"
|
||||||
|
VerticalAlignment="Center"
|
||||||
|
Command="{Binding DisableDeviceForSaving}">
|
||||||
|
<TextBlock
|
||||||
|
Text="{ext:Locale ControllerSettingsUnlink}"
|
||||||
|
VerticalAlignment="Center"
|
||||||
|
HorizontalAlignment="Center" />
|
||||||
|
</Button>
|
||||||
|
</StackPanel>
|
||||||
|
</ContentControl.Content>
|
||||||
</ContentControl>
|
</ContentControl>
|
||||||
|
<ContentControl Content="{Binding ConfigViewModel}" IsVisible="{Binding ShowSettings}">
|
||||||
|
<ContentControl.DataTemplates>
|
||||||
|
<DataTemplate DataType="viewModels:ControllerInputViewModel">
|
||||||
|
<views:ControllerInputView />
|
||||||
|
</DataTemplate>
|
||||||
|
<DataTemplate DataType="viewModels:KeyboardInputViewModel">
|
||||||
|
<views:KeyboardInputView />
|
||||||
|
</DataTemplate>
|
||||||
|
</ContentControl.DataTemplates>
|
||||||
|
</ContentControl>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</UserControl>
|
</UserControl>
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
using Avalonia.Controls;
|
using Avalonia.Controls;
|
||||||
|
using FluentAvalonia.UI.Controls;
|
||||||
using Ryujinx.Ava.Common.Locale;
|
using Ryujinx.Ava.Common.Locale;
|
||||||
using Ryujinx.Ava.UI.Controls;
|
using Ryujinx.Ava.UI.Controls;
|
||||||
using Ryujinx.Ava.UI.Helpers;
|
using Ryujinx.Ava.UI.Helpers;
|
||||||
@@ -62,14 +63,23 @@ namespace Ryujinx.Ava.UI.Views.Input
|
|||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
ViewModel.PlayerId = ViewModel.PlayerIdChoose;
|
|
||||||
|
|
||||||
ViewModel.IsModified = false;
|
ViewModel.IsModified = false;
|
||||||
}
|
ViewModel.PlayerId = ViewModel.PlayerIdChoose;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void ComboBox_SelectionChanged(object sender, SelectionChangedEventArgs e)
|
||||||
|
{
|
||||||
|
if (sender is FAComboBox faComboBox)
|
||||||
|
{
|
||||||
|
faComboBox.IsDropDownOpen = false;
|
||||||
|
ViewModel.IsModified = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public void Dispose()
|
public void Dispose()
|
||||||
{
|
{
|
||||||
ViewModel.Dispose();
|
ViewModel.Dispose();
|
||||||
|
|||||||
@@ -9,6 +9,8 @@ using Ryujinx.Ava.UI.Helpers;
|
|||||||
using Ryujinx.Ava.UI.ViewModels.Input;
|
using Ryujinx.Ava.UI.ViewModels.Input;
|
||||||
using Ryujinx.Input;
|
using Ryujinx.Input;
|
||||||
using Ryujinx.Input.Assigner;
|
using Ryujinx.Input.Assigner;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System;
|
||||||
using Button = Ryujinx.Input.Button;
|
using Button = Ryujinx.Input.Button;
|
||||||
using Key = Ryujinx.Common.Configuration.Hid.Key;
|
using Key = Ryujinx.Common.Configuration.Hid.Key;
|
||||||
|
|
||||||
@@ -182,15 +184,74 @@ namespace Ryujinx.Ava.UI.Views.Input
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void FlagInputConfigChanged()
|
||||||
|
{
|
||||||
|
(DataContext as KeyboardInputViewModel)!.ParentModel.IsModified = true;
|
||||||
|
}
|
||||||
|
|
||||||
private void MouseClick(object sender, PointerPressedEventArgs e)
|
private void MouseClick(object sender, PointerPressedEventArgs e)
|
||||||
{
|
{
|
||||||
bool shouldUnbind = e.GetCurrentPoint(this).Properties.IsMiddleButtonPressed;
|
bool shouldUnbind = e.GetCurrentPoint(this).Properties.IsMiddleButtonPressed;
|
||||||
|
|
||||||
|
bool shouldRemoveBinding = e.GetCurrentPoint(this).Properties.IsRightButtonPressed;
|
||||||
|
|
||||||
|
if (shouldRemoveBinding)
|
||||||
|
{
|
||||||
|
DeleteBind();
|
||||||
|
}
|
||||||
|
|
||||||
_currentAssigner?.Cancel(shouldUnbind);
|
_currentAssigner?.Cancel(shouldUnbind);
|
||||||
|
|
||||||
PointerPressed -= MouseClick;
|
PointerPressed -= MouseClick;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void DeleteBind()
|
||||||
|
{
|
||||||
|
if (DataContext is not KeyboardInputViewModel viewModel)
|
||||||
|
return;
|
||||||
|
|
||||||
|
if (_currentAssigner != null)
|
||||||
|
{
|
||||||
|
Dictionary<string, Action> buttonActions = new Dictionary<string, Action>
|
||||||
|
{
|
||||||
|
{ "ButtonZl", () => viewModel.Config.ButtonZl = Key.Unbound },
|
||||||
|
{ "ButtonL", () => viewModel.Config.ButtonL = Key.Unbound },
|
||||||
|
{ "ButtonMinus", () => viewModel.Config.ButtonMinus = Key.Unbound },
|
||||||
|
{ "LeftStickButton", () => viewModel.Config.LeftStickButton = Key.Unbound },
|
||||||
|
{ "LeftStickUp", () => viewModel.Config.LeftStickUp = Key.Unbound },
|
||||||
|
{ "LeftStickDown", () => viewModel.Config.LeftStickDown = Key.Unbound },
|
||||||
|
{ "LeftStickRight", () => viewModel.Config.LeftStickRight = Key.Unbound },
|
||||||
|
{ "LeftStickLeft", () => viewModel.Config.LeftStickLeft = Key.Unbound },
|
||||||
|
{ "DpadUp", () => viewModel.Config.DpadUp = Key.Unbound },
|
||||||
|
{ "DpadDown", () => viewModel.Config.DpadDown = Key.Unbound },
|
||||||
|
{ "DpadLeft", () => viewModel.Config.DpadLeft = Key.Unbound },
|
||||||
|
{ "DpadRight", () => viewModel.Config.DpadRight = Key.Unbound },
|
||||||
|
{ "LeftButtonSr", () => viewModel.Config.LeftButtonSr = Key.Unbound },
|
||||||
|
{ "LeftButtonSl", () => viewModel.Config.LeftButtonSl = Key.Unbound },
|
||||||
|
{ "RightButtonSr", () => viewModel.Config.RightButtonSr = Key.Unbound },
|
||||||
|
{ "RightButtonSl", () => viewModel.Config.RightButtonSl = Key.Unbound },
|
||||||
|
{ "ButtonZr", () => viewModel.Config.ButtonZr = Key.Unbound },
|
||||||
|
{ "ButtonR", () => viewModel.Config.ButtonR = Key.Unbound },
|
||||||
|
{ "ButtonPlus", () => viewModel.Config.ButtonPlus = Key.Unbound },
|
||||||
|
{ "ButtonA", () => viewModel.Config.ButtonA = Key.Unbound },
|
||||||
|
{ "ButtonB", () => viewModel.Config.ButtonB = Key.Unbound },
|
||||||
|
{ "ButtonX", () => viewModel.Config.ButtonX = Key.Unbound },
|
||||||
|
{ "ButtonY", () => viewModel.Config.ButtonY = Key.Unbound },
|
||||||
|
{ "RightStickButton", () => viewModel.Config.RightStickButton = Key.Unbound },
|
||||||
|
{ "RightStickUp", () => viewModel.Config.RightStickUp = Key.Unbound },
|
||||||
|
{ "RightStickDown", () => viewModel.Config.RightStickDown = Key.Unbound },
|
||||||
|
{ "RightStickRight", () => viewModel.Config.RightStickRight = Key.Unbound },
|
||||||
|
{ "RightStickLeft", () => viewModel.Config.RightStickLeft = Key.Unbound }
|
||||||
|
};
|
||||||
|
|
||||||
|
if (buttonActions.TryGetValue(_currentAssigner.ToggledButton.Name, out Action action))
|
||||||
|
{
|
||||||
|
action();
|
||||||
|
FlagInputConfigChanged();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
protected override void OnDetachedFromVisualTree(VisualTreeAttachmentEventArgs e)
|
protected override void OnDetachedFromVisualTree(VisualTreeAttachmentEventArgs e)
|
||||||
{
|
{
|
||||||
base.OnDetachedFromVisualTree(e);
|
base.OnDetachedFromVisualTree(e);
|
||||||
|
|||||||
@@ -6,16 +6,18 @@
|
|||||||
xmlns:ext="clr-namespace:Ryujinx.Ava.Common.Markup"
|
xmlns:ext="clr-namespace:Ryujinx.Ava.Common.Markup"
|
||||||
mc:Ignorable="d"
|
mc:Ignorable="d"
|
||||||
xmlns:viewModels="clr-namespace:Ryujinx.Ava.UI.ViewModels"
|
xmlns:viewModels="clr-namespace:Ryujinx.Ava.UI.ViewModels"
|
||||||
xmlns:controls="clr-namespace:Ryujinx.Ava.UI.Controls"
|
|
||||||
x:DataType="viewModels:MainWindowViewModel"
|
x:DataType="viewModels:MainWindowViewModel"
|
||||||
x:Class="Ryujinx.Ava.UI.Views.Main.MainMenuBarView">
|
x:Class="Ryujinx.Ava.UI.Views.Main.MainMenuBarView">
|
||||||
<Design.DataContext>
|
<Design.DataContext>
|
||||||
<viewModels:MainWindowViewModel />
|
<viewModels:MainWindowViewModel />
|
||||||
</Design.DataContext>
|
</Design.DataContext>
|
||||||
<DockPanel HorizontalAlignment="Stretch">
|
<DockPanel HorizontalAlignment="Stretch">
|
||||||
<controls:RyujinxLogo
|
<Image
|
||||||
Margin="7, 0"
|
Name="RyuLogo"
|
||||||
ToolTip.Tip="{Binding Title}"/>
|
Margin="7, 0"
|
||||||
|
Height="25"
|
||||||
|
Width="25"
|
||||||
|
ToolTip.Tip="{Binding Title}" />
|
||||||
<Menu
|
<Menu
|
||||||
Name="Menu"
|
Name="Menu"
|
||||||
Height="32"
|
Height="32"
|
||||||
|
|||||||
@@ -34,6 +34,9 @@ namespace Ryujinx.Ava.UI.Views.Main
|
|||||||
{
|
{
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
|
|
||||||
|
RyuLogo.IsVisible = !ConfigurationState.Instance.ShowTitleBar;
|
||||||
|
RyuLogo.Source = MainWindowViewModel.IconBitmap;
|
||||||
|
|
||||||
ToggleFileTypesMenuItem.ItemsSource = GenerateToggleFileTypeItems();
|
ToggleFileTypesMenuItem.ItemsSource = GenerateToggleFileTypeItems();
|
||||||
ChangeLanguageMenuItem.ItemsSource = GenerateLanguageMenuItems();
|
ChangeLanguageMenuItem.ItemsSource = GenerateLanguageMenuItems();
|
||||||
|
|
||||||
@@ -223,7 +226,7 @@ namespace Ryujinx.Ava.UI.Views.Main
|
|||||||
|
|
||||||
// Correctly size window when 'TitleBar' is enabled (Nov. 14, 2024)
|
// Correctly size window when 'TitleBar' is enabled (Nov. 14, 2024)
|
||||||
double barsHeight = ((Window.StatusBarHeight + Window.MenuBarHeight) +
|
double barsHeight = ((Window.StatusBarHeight + Window.MenuBarHeight) +
|
||||||
(ConfigurationState.Instance.ShowOldUI ? (int)Window.TitleBar.Height : 0));
|
(ConfigurationState.Instance.ShowTitleBar ? (int)Window.TitleBar.Height : 0));
|
||||||
|
|
||||||
double windowWidthScaled = (resolutionWidth * Program.WindowScaleFactor);
|
double windowWidthScaled = (resolutionWidth * Program.WindowScaleFactor);
|
||||||
double windowHeightScaled = ((resolutionHeight + barsHeight) * Program.WindowScaleFactor);
|
double windowHeightScaled = ((resolutionHeight + barsHeight) * Program.WindowScaleFactor);
|
||||||
|
|||||||
@@ -8,6 +8,8 @@ using Ryujinx.Ava.UI.Helpers;
|
|||||||
using Ryujinx.Ava.UI.ViewModels;
|
using Ryujinx.Ava.UI.ViewModels;
|
||||||
using Ryujinx.Input;
|
using Ryujinx.Input;
|
||||||
using Ryujinx.Input.Assigner;
|
using Ryujinx.Input.Assigner;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System;
|
||||||
using Button = Ryujinx.Input.Button;
|
using Button = Ryujinx.Input.Button;
|
||||||
using Key = Ryujinx.Common.Configuration.Hid.Key;
|
using Key = Ryujinx.Common.Configuration.Hid.Key;
|
||||||
|
|
||||||
@@ -46,12 +48,47 @@ namespace Ryujinx.Ava.UI.Views.Settings
|
|||||||
private void MouseClick(object sender, PointerPressedEventArgs e)
|
private void MouseClick(object sender, PointerPressedEventArgs e)
|
||||||
{
|
{
|
||||||
bool shouldUnbind = e.GetCurrentPoint(this).Properties.IsMiddleButtonPressed;
|
bool shouldUnbind = e.GetCurrentPoint(this).Properties.IsMiddleButtonPressed;
|
||||||
|
bool shouldRemoveBinding = e.GetCurrentPoint(this).Properties.IsRightButtonPressed;
|
||||||
|
|
||||||
|
if (shouldRemoveBinding)
|
||||||
|
{
|
||||||
|
DeleteBind();
|
||||||
|
}
|
||||||
|
|
||||||
_currentAssigner?.Cancel(shouldUnbind);
|
_currentAssigner?.Cancel(shouldUnbind);
|
||||||
|
|
||||||
PointerPressed -= MouseClick;
|
PointerPressed -= MouseClick;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void DeleteBind()
|
||||||
|
{
|
||||||
|
if (DataContext is not SettingsViewModel viewModel)
|
||||||
|
return;
|
||||||
|
|
||||||
|
if (_currentAssigner != null)
|
||||||
|
{
|
||||||
|
Dictionary<string, Action> buttonActions = new Dictionary<string, Action>
|
||||||
|
{
|
||||||
|
{ "ToggleVSyncMode", () => viewModel.KeyboardHotkey.ToggleVSyncMode = Key.Unbound },
|
||||||
|
{ "Screenshot", () => viewModel.KeyboardHotkey.Screenshot = Key.Unbound },
|
||||||
|
{ "ShowUI", () => viewModel.KeyboardHotkey.ShowUI = Key.Unbound },
|
||||||
|
{ "Pause", () => viewModel.KeyboardHotkey.Pause = Key.Unbound },
|
||||||
|
{ "ToggleMute", () => viewModel.KeyboardHotkey.ToggleMute = Key.Unbound },
|
||||||
|
{ "ResScaleUp", () => viewModel.KeyboardHotkey.ResScaleUp = Key.Unbound },
|
||||||
|
{ "ResScaleDown", () => viewModel.KeyboardHotkey.ResScaleDown = Key.Unbound },
|
||||||
|
{ "VolumeUp", () => viewModel.KeyboardHotkey.VolumeUp = Key.Unbound },
|
||||||
|
{ "VolumeDown", () => viewModel.KeyboardHotkey.VolumeDown = Key.Unbound },
|
||||||
|
{ "CustomVSyncIntervalIncrement", () => viewModel.KeyboardHotkey.CustomVSyncIntervalIncrement = Key.Unbound },
|
||||||
|
{ "CustomVSyncIntervalDecrement", () => viewModel.KeyboardHotkey.CustomVSyncIntervalDecrement = Key.Unbound }
|
||||||
|
};
|
||||||
|
|
||||||
|
if (buttonActions.TryGetValue(_currentAssigner.ToggledButton.Name, out Action action))
|
||||||
|
{
|
||||||
|
action();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private void Button_IsCheckedChanged(object sender, RoutedEventArgs e)
|
private void Button_IsCheckedChanged(object sender, RoutedEventArgs e)
|
||||||
{
|
{
|
||||||
if (sender is ToggleButton button)
|
if (sender is ToggleButton button)
|
||||||
|
|||||||
@@ -191,16 +191,16 @@
|
|||||||
IsEnabled="{Binding !IsGameTitleNotNull}"
|
IsEnabled="{Binding !IsGameTitleNotNull}"
|
||||||
Opacity="{Binding PanelOpacity}"
|
Opacity="{Binding PanelOpacity}"
|
||||||
Orientation="Horizontal">
|
Orientation="Horizontal">
|
||||||
|
<TextBlock
|
||||||
|
VerticalAlignment="Center"
|
||||||
|
Text="{ext:Locale SettingsTabSystemSystemTimeMatch}"
|
||||||
|
ToolTip.Tip="{ext:Locale MatchTimeTooltip}"
|
||||||
|
Width="250"/>
|
||||||
<CheckBox
|
<CheckBox
|
||||||
VerticalAlignment="Center"
|
VerticalAlignment="Center"
|
||||||
IsChecked="{Binding MatchSystemTime}"
|
IsChecked="{Binding MatchSystemTime}"
|
||||||
ToolTip.Tip="{ext:Locale MatchTimeTooltip}">
|
ToolTip.Tip="{ext:Locale MatchTimeTooltip}"/>
|
||||||
<TextBlock
|
<TextBlock Classes="globalConfigMarker" IsVisible="{Binding IsGameTitleNotNull}"/>
|
||||||
VerticalAlignment="Center"
|
|
||||||
Text="{ext:Locale SettingsTabSystemSystemTimeMatch}"
|
|
||||||
Width="250"/>
|
|
||||||
</CheckBox>
|
|
||||||
<TextBlock Classes="globalConfigMarker" IsVisible="{Binding IsGameTitleNotNull}"/>
|
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
<Separator />
|
<Separator />
|
||||||
<StackPanel Margin="0,10,0,10"
|
<StackPanel Margin="0,10,0,10"
|
||||||
|
|||||||
@@ -49,15 +49,14 @@
|
|||||||
<StackPanel Orientation="Horizontal">
|
<StackPanel Orientation="Horizontal">
|
||||||
<TextBlock Text="{ext:Locale SettingsTabGeneralRememberWindowState}" />
|
<TextBlock Text="{ext:Locale SettingsTabGeneralRememberWindowState}" />
|
||||||
<TextBlock Classes="globalConfigMarker" IsVisible="{Binding IsGameTitleNotNull}" />
|
<TextBlock Classes="globalConfigMarker" IsVisible="{Binding IsGameTitleNotNull}" />
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</CheckBox>
|
</CheckBox>
|
||||||
<CheckBox
|
<CheckBox
|
||||||
IsEnabled="{Binding !IsGameTitleNotNull}"
|
IsEnabled="{Binding !IsGameTitleNotNull}"
|
||||||
Opacity="{Binding PanelOpacity}"
|
Opacity="{Binding PanelOpacity}"
|
||||||
IsChecked="{Binding ShowOldUI}"
|
IsChecked="{Binding ShowTitleBar}" IsVisible="{x:Static helper:RunningPlatform.IsWindows}">
|
||||||
ToolTip.Tip="{ext:Locale SettingsTabGeneralShowOldUIToolTip}">
|
|
||||||
<StackPanel Orientation="Horizontal">
|
<StackPanel Orientation="Horizontal">
|
||||||
<TextBlock Text="{ext:Locale SettingsTabGeneralShowOldUI}" />
|
<TextBlock Text="{ext:Locale SettingsTabGeneralShowTitleBar}" />
|
||||||
<TextBlock Classes="globalConfigMarker" IsVisible="{Binding IsGameTitleNotNull}" />
|
<TextBlock Classes="globalConfigMarker" IsVisible="{Binding IsGameTitleNotNull}" />
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</CheckBox>
|
</CheckBox>
|
||||||
|
|||||||
@@ -6,7 +6,6 @@
|
|||||||
xmlns:window="clr-namespace:Ryujinx.Ava.UI.Windows"
|
xmlns:window="clr-namespace:Ryujinx.Ava.UI.Windows"
|
||||||
xmlns:viewModels="clr-namespace:Ryujinx.Ava.UI.ViewModels"
|
xmlns:viewModels="clr-namespace:Ryujinx.Ava.UI.ViewModels"
|
||||||
xmlns:ext="clr-namespace:Ryujinx.Ava.Common.Markup"
|
xmlns:ext="clr-namespace:Ryujinx.Ava.Common.Markup"
|
||||||
xmlns:controls="clr-namespace:Ryujinx.Ava.UI.Controls"
|
|
||||||
mc:Ignorable="d"
|
mc:Ignorable="d"
|
||||||
d:DesignWidth="400"
|
d:DesignWidth="400"
|
||||||
d:DesignHeight="350"
|
d:DesignHeight="350"
|
||||||
@@ -24,25 +23,7 @@
|
|||||||
<viewModels:AmiiboWindowViewModel />
|
<viewModels:AmiiboWindowViewModel />
|
||||||
</Design.DataContext>
|
</Design.DataContext>
|
||||||
<Grid RowDefinitions="Auto,Auto,*,Auto" Margin="15" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" >
|
<Grid RowDefinitions="Auto,Auto,*,Auto" Margin="15" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" >
|
||||||
<Grid Name="FlushControls" ColumnDefinitions="Auto,Auto" Grid.Row="1" Margin="-15">
|
<Grid ColumnDefinitions="*,*" Grid.Row="1" HorizontalAlignment="Stretch" >
|
||||||
<controls:RyujinxLogo
|
|
||||||
Grid.Column="0"
|
|
||||||
HorizontalAlignment="Left"
|
|
||||||
VerticalAlignment="Top"
|
|
||||||
Margin="8, 8, 7, 0"
|
|
||||||
ToolTip.Tip="{ext:WindowTitle Amiibo}" />
|
|
||||||
<StackPanel Grid.Column="1" Orientation="Horizontal" Margin="0, 0, 0, 100">
|
|
||||||
<StackPanel Spacing="10" Orientation="Horizontal" HorizontalAlignment="Left">
|
|
||||||
<TextBlock VerticalAlignment="Center" Text="{ext:Locale AmiiboSeriesLabel}" />
|
|
||||||
<ComboBox Margin="0, 8, 0, 0" SelectedIndex="{Binding SeriesSelectedIndex}" ItemsSource="{Binding AmiiboSeries}" MinWidth="100" />
|
|
||||||
</StackPanel>
|
|
||||||
<StackPanel Margin="15, 0, 0, 0" Spacing="10" Orientation="Horizontal" >
|
|
||||||
<TextBlock VerticalAlignment="Center" Text="{ext:Locale AmiiboCharacterLabel}" />
|
|
||||||
<ComboBox Margin="0, 8, 0, 0" SelectedIndex="{Binding AmiiboSelectedIndex}" MinWidth="100" ItemsSource="{Binding AmiiboList}" />
|
|
||||||
</StackPanel>
|
|
||||||
</StackPanel>
|
|
||||||
</Grid>
|
|
||||||
<Grid Name="NormalControls" ColumnDefinitions="*,*" Grid.Row="1" HorizontalAlignment="Stretch" >
|
|
||||||
<StackPanel Spacing="10" Orientation="Horizontal" HorizontalAlignment="Left">
|
<StackPanel Spacing="10" Orientation="Horizontal" HorizontalAlignment="Left">
|
||||||
<TextBlock VerticalAlignment="Center" Text="{ext:Locale AmiiboSeriesLabel}" />
|
<TextBlock VerticalAlignment="Center" Text="{ext:Locale AmiiboSeriesLabel}" />
|
||||||
<ComboBox SelectedIndex="{Binding SeriesSelectedIndex}" ItemsSource="{Binding AmiiboSeries}" MinWidth="100" />
|
<ComboBox SelectedIndex="{Binding SeriesSelectedIndex}" ItemsSource="{Binding AmiiboSeries}" MinWidth="100" />
|
||||||
|
|||||||
@@ -1,14 +1,13 @@
|
|||||||
using Avalonia.Interactivity;
|
using Avalonia.Interactivity;
|
||||||
using Ryujinx.Ava.Common.Locale;
|
using Ryujinx.Ava.Common.Locale;
|
||||||
using Ryujinx.Ava.Common.Models.Amiibo;
|
using Ryujinx.Ava.Common.Models.Amiibo;
|
||||||
using Ryujinx.Ava.Systems.Configuration;
|
|
||||||
using Ryujinx.Ava.UI.ViewModels;
|
using Ryujinx.Ava.UI.ViewModels;
|
||||||
|
|
||||||
namespace Ryujinx.Ava.UI.Windows
|
namespace Ryujinx.Ava.UI.Windows
|
||||||
{
|
{
|
||||||
public partial class AmiiboWindow : StyleableAppWindow
|
public partial class AmiiboWindow : StyleableAppWindow
|
||||||
{
|
{
|
||||||
public AmiiboWindow(bool showAll, string lastScannedAmiiboId, string titleId) : base(true, 40)
|
public AmiiboWindow(bool showAll, string lastScannedAmiiboId, string titleId)
|
||||||
{
|
{
|
||||||
DataContext = ViewModel = new AmiiboWindowViewModel(this, lastScannedAmiiboId, titleId)
|
DataContext = ViewModel = new AmiiboWindowViewModel(this, lastScannedAmiiboId, titleId)
|
||||||
{
|
{
|
||||||
@@ -17,9 +16,6 @@ namespace Ryujinx.Ava.UI.Windows
|
|||||||
|
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
|
|
||||||
FlushControls.IsVisible = !ConfigurationState.Instance.ShowOldUI;
|
|
||||||
NormalControls.IsVisible = ConfigurationState.Instance.ShowOldUI;
|
|
||||||
|
|
||||||
Title = RyujinxApp.FormatTitle(LocaleKeys.Amiibo);
|
Title = RyujinxApp.FormatTitle(LocaleKeys.Amiibo);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -6,7 +6,6 @@
|
|||||||
xmlns:ext="clr-namespace:Ryujinx.Ava.Common.Markup"
|
xmlns:ext="clr-namespace:Ryujinx.Ava.Common.Markup"
|
||||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||||
xmlns:window="clr-namespace:Ryujinx.Ava.UI.Windows"
|
xmlns:window="clr-namespace:Ryujinx.Ava.UI.Windows"
|
||||||
xmlns:controls="clr-namespace:Ryujinx.Ava.UI.Controls"
|
|
||||||
Width="600"
|
Width="600"
|
||||||
Height="750"
|
Height="750"
|
||||||
MinWidth="500"
|
MinWidth="500"
|
||||||
@@ -21,81 +20,38 @@
|
|||||||
</Style>
|
</Style>
|
||||||
</Window.Styles>
|
</Window.Styles>
|
||||||
<Grid Name="CheatGrid" Margin="15" RowDefinitions="Auto,Auto,Auto,*,Auto" ColumnDefinitions="*,*">
|
<Grid Name="CheatGrid" Margin="15" RowDefinitions="Auto,Auto,Auto,*,Auto" ColumnDefinitions="*,*">
|
||||||
<Grid Name="FlushHeader" Grid.Row="1" Column="0" ColumnSpan="2" RowDefinitions="Auto,Auto,Auto" ColumnDefinitions="Auto,*,Auto,*">
|
<TextBlock
|
||||||
<controls:RyujinxLogo
|
Grid.Row="1"
|
||||||
Grid.Row="0"
|
Grid.Column="0"
|
||||||
Grid.Column="0"
|
Grid.ColumnSpan="2"
|
||||||
HorizontalAlignment="Left"
|
MaxWidth="500"
|
||||||
Margin="-7, -22, 7, 0"
|
Margin="20,15,20,5"
|
||||||
Height="28"
|
HorizontalAlignment="Center"
|
||||||
Width="28"
|
VerticalAlignment="Center"
|
||||||
ToolTip.Tip="{ext:WindowTitle CheatWindowTitle}"/>
|
LineHeight="18"
|
||||||
<StackPanel Grid.Row="0" Grid.Column="1" Grid.ColumnSpan="2"
|
Text="{Binding Heading}"
|
||||||
Margin="7, -7, 0, 5"
|
TextAlignment="Center"
|
||||||
Orientation="Horizontal"
|
TextWrapping="Wrap" />
|
||||||
VerticalAlignment="Center"
|
<TextBlock
|
||||||
HorizontalAlignment="Stretch">
|
Grid.Row="2"
|
||||||
<TextBlock
|
Grid.Column="0"
|
||||||
MaxWidth="500"
|
MaxWidth="500"
|
||||||
Margin="0,8,5,0"
|
Margin="140,15,20,5"
|
||||||
LineHeight="30"
|
HorizontalAlignment="Center"
|
||||||
Text="{ext:Locale BuildId}"
|
VerticalAlignment="Center"
|
||||||
TextAlignment="Center"
|
LineHeight="30"
|
||||||
TextWrapping="Wrap" />
|
Text="{ext:Locale BuildId}"
|
||||||
<TextBox
|
TextAlignment="Center"
|
||||||
Margin="0,0,0,0"
|
TextWrapping="Wrap" />
|
||||||
MinWidth="135"
|
<TextBox
|
||||||
Text="{Binding BuildId}"
|
Grid.Row="2"
|
||||||
IsReadOnly="True" />
|
Grid.Column="1"
|
||||||
</StackPanel>
|
Margin="0,5,110,5"
|
||||||
<TextBlock
|
MinWidth="160"
|
||||||
Grid.Row="1"
|
HorizontalAlignment="Center"
|
||||||
Grid.Column="0"
|
VerticalAlignment="Center"
|
||||||
Grid.ColumnSpan="4"
|
Text="{Binding BuildId}"
|
||||||
MaxWidth="500"
|
IsReadOnly="True" />
|
||||||
Margin="0,10,0,5"
|
|
||||||
HorizontalAlignment="Stretch"
|
|
||||||
VerticalAlignment="Center"
|
|
||||||
LineHeight="18"
|
|
||||||
Text="{Binding Heading}"
|
|
||||||
TextAlignment="Center"
|
|
||||||
TextWrapping="Wrap" />
|
|
||||||
|
|
||||||
</Grid>
|
|
||||||
<Grid Name="NormalHeader" Grid.Row="1" Column="0" ColumnSpan="2" RowDefinitions="Auto,Auto,Auto" ColumnDefinitions="*,*">
|
|
||||||
<TextBlock
|
|
||||||
Grid.Row="1"
|
|
||||||
Grid.Column="0"
|
|
||||||
Grid.ColumnSpan="2"
|
|
||||||
MaxWidth="500"
|
|
||||||
Margin="20,15,20,5"
|
|
||||||
HorizontalAlignment="Center"
|
|
||||||
VerticalAlignment="Center"
|
|
||||||
LineHeight="18"
|
|
||||||
Text="{Binding Heading}"
|
|
||||||
TextAlignment="Center"
|
|
||||||
TextWrapping="Wrap" />
|
|
||||||
<TextBlock
|
|
||||||
Grid.Row="2"
|
|
||||||
Grid.Column="0"
|
|
||||||
MaxWidth="500"
|
|
||||||
Margin="140,15,20,5"
|
|
||||||
HorizontalAlignment="Center"
|
|
||||||
VerticalAlignment="Center"
|
|
||||||
LineHeight="30"
|
|
||||||
Text="{ext:Locale BuildId}"
|
|
||||||
TextAlignment="Center"
|
|
||||||
TextWrapping="Wrap" />
|
|
||||||
<TextBox
|
|
||||||
Grid.Row="2"
|
|
||||||
Grid.Column="1"
|
|
||||||
Margin="0,5,110,5"
|
|
||||||
MinWidth="160"
|
|
||||||
HorizontalAlignment="Center"
|
|
||||||
VerticalAlignment="Center"
|
|
||||||
Text="{Binding BuildId}"
|
|
||||||
IsReadOnly="True" />
|
|
||||||
</Grid>
|
|
||||||
<Border
|
<Border
|
||||||
Grid.Row="3"
|
Grid.Row="3"
|
||||||
Grid.Column="0"
|
Grid.Column="0"
|
||||||
|
|||||||
@@ -4,7 +4,6 @@ using Ryujinx.Ava.Common.Locale;
|
|||||||
using Ryujinx.Ava.UI.Models;
|
using Ryujinx.Ava.UI.Models;
|
||||||
using Ryujinx.Ava.Systems.AppLibrary;
|
using Ryujinx.Ava.Systems.AppLibrary;
|
||||||
using Ryujinx.Ava.Systems.Configuration;
|
using Ryujinx.Ava.Systems.Configuration;
|
||||||
using Ryujinx.Ava.UI.ViewModels;
|
|
||||||
using Ryujinx.HLE.FileSystem;
|
using Ryujinx.HLE.FileSystem;
|
||||||
using Ryujinx.HLE.HOS;
|
using Ryujinx.HLE.HOS;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
@@ -33,7 +32,7 @@ namespace Ryujinx.Ava.UI.Windows
|
|||||||
Title = RyujinxApp.FormatTitle(LocaleKeys.CheatWindowTitle);
|
Title = RyujinxApp.FormatTitle(LocaleKeys.CheatWindowTitle);
|
||||||
}
|
}
|
||||||
|
|
||||||
public CheatWindow(VirtualFileSystem virtualFileSystem, string titleId, string titleName, string titlePath) : base(useCustomTitleBar: true, 46)
|
public CheatWindow(VirtualFileSystem virtualFileSystem, string titleId, string titleName, string titlePath)
|
||||||
{
|
{
|
||||||
MinWidth = 500;
|
MinWidth = 500;
|
||||||
MinHeight = 650;
|
MinHeight = 650;
|
||||||
@@ -45,9 +44,6 @@ namespace Ryujinx.Ava.UI.Windows
|
|||||||
|
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
|
|
||||||
FlushHeader.IsVisible = !ConfigurationState.Instance.ShowOldUI;
|
|
||||||
NormalHeader.IsVisible = ConfigurationState.Instance.ShowOldUI;
|
|
||||||
|
|
||||||
string modsBasePath = ModLoader.GetModsBasePath();
|
string modsBasePath = ModLoader.GetModsBasePath();
|
||||||
string titleModsPath = ModLoader.GetApplicationDir(modsBasePath, titleId);
|
string titleModsPath = ModLoader.GetApplicationDir(modsBasePath, titleId);
|
||||||
ulong titleIdValue = ulong.Parse(titleId, NumberStyles.HexNumber);
|
ulong titleIdValue = ulong.Parse(titleId, NumberStyles.HexNumber);
|
||||||
|
|||||||
@@ -7,7 +7,6 @@
|
|||||||
xmlns:viewModels="clr-namespace:Ryujinx.Ava.UI.ViewModels"
|
xmlns:viewModels="clr-namespace:Ryujinx.Ava.UI.ViewModels"
|
||||||
xmlns:systems="clr-namespace:Ryujinx.Ava.Systems"
|
xmlns:systems="clr-namespace:Ryujinx.Ava.Systems"
|
||||||
xmlns:window="clr-namespace:Ryujinx.Ava.UI.Windows"
|
xmlns:window="clr-namespace:Ryujinx.Ava.UI.Windows"
|
||||||
xmlns:controls="clr-namespace:Ryujinx.Ava.UI.Controls"
|
|
||||||
CanResize="False"
|
CanResize="False"
|
||||||
mc:Ignorable="d"
|
mc:Ignorable="d"
|
||||||
MinWidth="800"
|
MinWidth="800"
|
||||||
@@ -19,10 +18,11 @@
|
|||||||
</window:StyleableAppWindow.DataContext>
|
</window:StyleableAppWindow.DataContext>
|
||||||
<Grid RowDefinitions="Auto,*">
|
<Grid RowDefinitions="Auto,*">
|
||||||
<Grid Grid.Row="0" ColumnDefinitions="Auto,*,Auto,Auto" Name="FlushControls">
|
<Grid Grid.Row="0" ColumnDefinitions="Auto,*,Auto,Auto" Name="FlushControls">
|
||||||
<controls:RyujinxLogo
|
<Image
|
||||||
Grid.Column="0"
|
Name="RyuLogo"
|
||||||
Margin="15, 0, 7, 0"
|
Margin="15, 0, 7, 0"
|
||||||
ToolTip.Tip="{ext:WindowTitle CompatibilityListTitle, False}"/>
|
Height="25"
|
||||||
|
Width="25" />
|
||||||
<TextBox Name="SearchBoxFlush" Grid.Column="1" Margin="0, 5, 0, 5" HorizontalAlignment="Stretch" Watermark="{ext:Locale CompatibilityListSearchBoxWatermarkWithCount}" TextChanged="TextBox_OnTextChanged" />
|
<TextBox Name="SearchBoxFlush" Grid.Column="1" Margin="0, 5, 0, 5" HorizontalAlignment="Stretch" Watermark="{ext:Locale CompatibilityListSearchBoxWatermarkWithCount}" TextChanged="TextBox_OnTextChanged" />
|
||||||
<CheckBox Grid.Column="2" Margin="7, 0, 0, 0" IsChecked="{Binding OnlyShowOwnedGames}" />
|
<CheckBox Grid.Column="2" Margin="7, 0, 0, 0" IsChecked="{Binding OnlyShowOwnedGames}" />
|
||||||
<TextBlock Grid.Column="3" Padding="0, 0, 138, 0" Margin="-10, 0, 18, 0" Text="{ext:Locale CompatibilityListOnlyShowOwnedGames}" />
|
<TextBlock Grid.Column="3" Padding="0, 0, 138, 0" Margin="-10, 0, 18, 0" Text="{ext:Locale CompatibilityListOnlyShowOwnedGames}" />
|
||||||
|
|||||||
@@ -21,14 +21,17 @@ namespace Ryujinx.Ava.UI.Windows
|
|||||||
SearchBoxNormal = { Text = titleId ?? string.Empty }
|
SearchBoxNormal = { Text = titleId ?? string.Empty }
|
||||||
});
|
});
|
||||||
|
|
||||||
public CompatibilityListWindow() : base(useCustomTitleBar: true, 37)
|
public CompatibilityListWindow() : base(useCustomTitleBar: true)
|
||||||
{
|
{
|
||||||
Title = RyujinxApp.FormatTitle(LocaleKeys.CompatibilityListTitle);
|
Title = RyujinxApp.FormatTitle(LocaleKeys.CompatibilityListTitle);
|
||||||
|
|
||||||
InitializeComponent();
|
TitleBar.Height = 37;
|
||||||
|
|
||||||
FlushControls.IsVisible = !ConfigurationState.Instance.ShowOldUI;
|
InitializeComponent();
|
||||||
NormalControls.IsVisible = ConfigurationState.Instance.ShowOldUI;
|
|
||||||
|
RyuLogo.Source = MainWindowViewModel.IconBitmap;
|
||||||
|
FlushControls.IsVisible = !ConfigurationState.Instance.ShowTitleBar;
|
||||||
|
NormalControls.IsVisible = ConfigurationState.Instance.ShowTitleBar;
|
||||||
}
|
}
|
||||||
|
|
||||||
// ReSharper disable once UnusedMember.Local
|
// ReSharper disable once UnusedMember.Local
|
||||||
|
|||||||
@@ -97,7 +97,7 @@ namespace Ryujinx.Ava.UI.Windows
|
|||||||
TitleBar.Height = MenuBarHeight;
|
TitleBar.Height = MenuBarHeight;
|
||||||
|
|
||||||
// Correctly size window when 'TitleBar' is enabled (Nov. 14, 2024)
|
// Correctly size window when 'TitleBar' is enabled (Nov. 14, 2024)
|
||||||
TitleBarHeight = (ConfigurationState.Instance.ShowOldUI ? TitleBar.Height : 0);
|
TitleBarHeight = (ConfigurationState.Instance.ShowTitleBar ? TitleBar.Height : 0);
|
||||||
|
|
||||||
ApplicationList.DataContext = DataContext;
|
ApplicationList.DataContext = DataContext;
|
||||||
ApplicationGrid.DataContext = DataContext;
|
ApplicationGrid.DataContext = DataContext;
|
||||||
|
|||||||
@@ -11,11 +11,10 @@
|
|||||||
xmlns:settings="clr-namespace:Ryujinx.Ava.UI.Views.Settings"
|
xmlns:settings="clr-namespace:Ryujinx.Ava.UI.Views.Settings"
|
||||||
xmlns:helpers="clr-namespace:Ryujinx.Ava.UI.Helpers"
|
xmlns:helpers="clr-namespace:Ryujinx.Ava.UI.Helpers"
|
||||||
xmlns:helper="clr-namespace:Ryujinx.Common.Helper;assembly=Ryujinx.Common"
|
xmlns:helper="clr-namespace:Ryujinx.Common.Helper;assembly=Ryujinx.Common"
|
||||||
xmlns:controls="clr-namespace:Ryujinx.Ava.UI.Controls"
|
|
||||||
Width="1100"
|
Width="1100"
|
||||||
|
Height="927"
|
||||||
MinWidth="800"
|
MinWidth="800"
|
||||||
MinHeight="480"
|
MinHeight="480"
|
||||||
Title="{ext:WindowTitle Settings}"
|
|
||||||
WindowStartupLocation="CenterOwner"
|
WindowStartupLocation="CenterOwner"
|
||||||
x:DataType="viewModels:SettingsViewModel"
|
x:DataType="viewModels:SettingsViewModel"
|
||||||
mc:Ignorable="d"
|
mc:Ignorable="d"
|
||||||
@@ -23,20 +22,13 @@
|
|||||||
<Design.DataContext>
|
<Design.DataContext>
|
||||||
<viewModels:SettingsViewModel />
|
<viewModels:SettingsViewModel />
|
||||||
</Design.DataContext>
|
</Design.DataContext>
|
||||||
<Grid HorizontalAlignment="Stretch" VerticalAlignment="Stretch" MinWidth="600" RowDefinitions="Auto,Auto,*,Auto">
|
<Grid HorizontalAlignment="Stretch" VerticalAlignment="Stretch" MinWidth="600" RowDefinitions="Auto,*,Auto">
|
||||||
<StackPanel Grid.Row="0" Orientation="Horizontal">
|
|
||||||
<controls:RyujinxLogo
|
|
||||||
HorizontalAlignment="Left"
|
|
||||||
VerticalAlignment="Top"
|
|
||||||
Margin="7, 7, 7, 0"
|
|
||||||
ToolTip.Tip="{ext:WindowTitle Settings}"/>
|
|
||||||
</StackPanel>
|
|
||||||
<ContentPresenter
|
<ContentPresenter
|
||||||
x:Name="ContentPresenter"
|
x:Name="ContentPresenter"
|
||||||
Grid.Row="2"
|
Grid.Row="1"
|
||||||
IsVisible="False"
|
IsVisible="False"
|
||||||
KeyboardNavigation.IsTabStop="False"/>
|
KeyboardNavigation.IsTabStop="False"/>
|
||||||
<Grid Name="Pages" IsVisible="False" Grid.Row="3">
|
<Grid Name="Pages" IsVisible="False" Grid.Row="2">
|
||||||
<settings:SettingsUiView Name="UiPage" />
|
<settings:SettingsUiView Name="UiPage" />
|
||||||
<settings:SettingsInputView Name="InputPage" />
|
<settings:SettingsInputView Name="InputPage" />
|
||||||
<settings:SettingsHotkeysView Name="HotkeysPage" />
|
<settings:SettingsHotkeysView Name="HotkeysPage" />
|
||||||
@@ -49,11 +41,12 @@
|
|||||||
<settings:SettingsHacksView Name="HacksPage" />
|
<settings:SettingsHacksView Name="HacksPage" />
|
||||||
</Grid>
|
</Grid>
|
||||||
<ui:NavigationView
|
<ui:NavigationView
|
||||||
Grid.Row="2"
|
Grid.Row="1"
|
||||||
IsSettingsVisible="False"
|
IsSettingsVisible="False"
|
||||||
Name="NavPanel"
|
Name="NavPanel"
|
||||||
IsBackEnabled="False"
|
IsBackEnabled="False"
|
||||||
Margin="10,10,10,0"
|
PaneDisplayMode="Left"
|
||||||
|
Margin="2,10,10,0"
|
||||||
VerticalAlignment="Stretch"
|
VerticalAlignment="Stretch"
|
||||||
HorizontalAlignment="Stretch"
|
HorizontalAlignment="Stretch"
|
||||||
OpenPaneLength="200">
|
OpenPaneLength="200">
|
||||||
@@ -115,7 +108,7 @@
|
|||||||
</Style>
|
</Style>
|
||||||
</ui:NavigationView.Styles>
|
</ui:NavigationView.Styles>
|
||||||
</ui:NavigationView>
|
</ui:NavigationView>
|
||||||
<Grid Grid.Row="3"
|
<Grid Grid.Row="2"
|
||||||
ColumnDefinitions="Auto,*,Auto">
|
ColumnDefinitions="Auto,*,Auto">
|
||||||
<StackPanel Grid.Column="0" Orientation="Horizontal">
|
<StackPanel Grid.Column="0" Orientation="Horizontal">
|
||||||
<Button
|
<Button
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
using Avalonia.Controls;
|
using Avalonia.Controls;
|
||||||
using FluentAvalonia.UI.Controls;
|
using FluentAvalonia.UI.Controls;
|
||||||
using Ryujinx.Ava.Common.Locale;
|
using Ryujinx.Ava.Common.Locale;
|
||||||
using Ryujinx.Ava.Systems.Configuration;
|
|
||||||
using Ryujinx.Ava.UI.ViewModels;
|
using Ryujinx.Ava.UI.ViewModels;
|
||||||
using Ryujinx.HLE.FileSystem;
|
using Ryujinx.HLE.FileSystem;
|
||||||
using Ryujinx.Input;
|
using Ryujinx.Input;
|
||||||
@@ -14,7 +13,7 @@ namespace Ryujinx.Ava.UI.Windows
|
|||||||
{
|
{
|
||||||
internal readonly SettingsViewModel ViewModel;
|
internal readonly SettingsViewModel ViewModel;
|
||||||
|
|
||||||
public SettingsWindow(VirtualFileSystem virtualFileSystem, ContentManager contentManager) : base(true)
|
public SettingsWindow(VirtualFileSystem virtualFileSystem, ContentManager contentManager)
|
||||||
{
|
{
|
||||||
Title = RyujinxApp.FormatTitle(LocaleKeys.Settings);
|
Title = RyujinxApp.FormatTitle(LocaleKeys.Settings);
|
||||||
|
|
||||||
@@ -24,16 +23,6 @@ namespace Ryujinx.Ava.UI.Windows
|
|||||||
ViewModel.SaveSettingsEvent += SaveSettings;
|
ViewModel.SaveSettingsEvent += SaveSettings;
|
||||||
|
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
|
|
||||||
NavPanel.PaneDisplayMode =
|
|
||||||
ConfigurationState.Instance.ShowOldUI
|
|
||||||
? NavigationViewPaneDisplayMode.Left
|
|
||||||
: NavigationViewPaneDisplayMode.Top;
|
|
||||||
|
|
||||||
Height = ConfigurationState.Instance.ShowOldUI
|
|
||||||
? 927
|
|
||||||
: 993; // nav panel is put on top with custom title bar so account for new height
|
|
||||||
|
|
||||||
Load();
|
Load();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -7,7 +7,6 @@ using Avalonia.Platform;
|
|||||||
using FluentAvalonia.UI.Windowing;
|
using FluentAvalonia.UI.Windowing;
|
||||||
using Ryujinx.Ava.Common.Locale;
|
using Ryujinx.Ava.Common.Locale;
|
||||||
using Ryujinx.Ava.Systems.Configuration;
|
using Ryujinx.Ava.Systems.Configuration;
|
||||||
using Ryujinx.Ava.UI.Controls;
|
|
||||||
using Ryujinx.Ava.UI.ViewModels;
|
using Ryujinx.Ava.UI.ViewModels;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
@@ -23,7 +22,7 @@ namespace Ryujinx.Ava.UI.Windows
|
|||||||
await appWindow.ShowDialog(owner ?? RyujinxApp.MainWindow);
|
await appWindow.ShowDialog(owner ?? RyujinxApp.MainWindow);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected StyleableAppWindow(bool useCustomTitleBar = false, double? titleBarHeight = null)
|
protected StyleableAppWindow(bool useCustomTitleBar = false)
|
||||||
{
|
{
|
||||||
WindowStartupLocation = WindowStartupLocation.CenterOwner;
|
WindowStartupLocation = WindowStartupLocation.CenterOwner;
|
||||||
TransparencyLevelHint = [WindowTransparencyLevel.None];
|
TransparencyLevelHint = [WindowTransparencyLevel.None];
|
||||||
@@ -33,14 +32,11 @@ namespace Ryujinx.Ava.UI.Windows
|
|||||||
|
|
||||||
if (useCustomTitleBar)
|
if (useCustomTitleBar)
|
||||||
{
|
{
|
||||||
TitleBar.ExtendsContentIntoTitleBar = !ConfigurationState.Instance.ShowOldUI;
|
TitleBar.ExtendsContentIntoTitleBar = !ConfigurationState.Instance.ShowTitleBar;
|
||||||
TitleBar.TitleBarHitTestType = ConfigurationState.Instance.ShowOldUI ? TitleBarHitTestType.Simple : TitleBarHitTestType.Complex;
|
TitleBar.TitleBarHitTestType = ConfigurationState.Instance.ShowTitleBar ? TitleBarHitTestType.Simple : TitleBarHitTestType.Complex;
|
||||||
|
|
||||||
if (TitleBar.ExtendsContentIntoTitleBar && titleBarHeight != null)
|
|
||||||
TitleBar.Height = titleBarHeight.Value;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Icon = RyujinxLogo.Bitmap;
|
Icon = MainWindowViewModel.IconBitmap;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void LocaleChanged()
|
private void LocaleChanged()
|
||||||
@@ -74,7 +70,7 @@ namespace Ryujinx.Ava.UI.Windows
|
|||||||
LocaleManager.Instance.LocaleChanged += LocaleChanged;
|
LocaleManager.Instance.LocaleChanged += LocaleChanged;
|
||||||
LocaleChanged();
|
LocaleChanged();
|
||||||
|
|
||||||
Icon = new WindowIcon(RyujinxLogo.Bitmap);
|
Icon = new WindowIcon(MainWindowViewModel.IconBitmap);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void LocaleChanged()
|
private void LocaleChanged()
|
||||||
|
|||||||
Reference in New Issue
Block a user