mirror of
https://github.com/ryujinx-mirror/ryujinx.git
synced 2024-11-25 19:45:13 +00:00
Ava GUI: Make Dialogue More Intuitive (#3955)
* Adjust button position and locales * Shortcuts + Highlight default action * Update Locales - Corrections Welcome * Move `Apply` button back to right side * OS Reactive Button layout * Fix reversed boolean :) * Fix accented button styling
This commit is contained in:
parent
d692a9b83e
commit
b540ea80d1
17 changed files with 79 additions and 66 deletions
|
@ -166,8 +166,8 @@
|
||||||
"SettingsTabInput": "Eingabe",
|
"SettingsTabInput": "Eingabe",
|
||||||
"SettingsTabInputEnableDockedMode": "Docked Modus",
|
"SettingsTabInputEnableDockedMode": "Docked Modus",
|
||||||
"SettingsTabInputDirectKeyboardAccess": "Direkter Tastaturzugriff",
|
"SettingsTabInputDirectKeyboardAccess": "Direkter Tastaturzugriff",
|
||||||
"SettingsButtonSave": "Speichern",
|
"SettingsButtonOk": "OK",
|
||||||
"SettingsButtonClose": "Schließen",
|
"SettingsButtonCancel": "Abbrechen",
|
||||||
"SettingsButtonApply": "Übernehmen",
|
"SettingsButtonApply": "Übernehmen",
|
||||||
"ControllerSettingsPlayer": "Spieler",
|
"ControllerSettingsPlayer": "Spieler",
|
||||||
"ControllerSettingsPlayer1": "Spieler 1",
|
"ControllerSettingsPlayer1": "Spieler 1",
|
||||||
|
|
|
@ -166,8 +166,8 @@
|
||||||
"SettingsTabInput": "Χειρισμός",
|
"SettingsTabInput": "Χειρισμός",
|
||||||
"SettingsTabInputEnableDockedMode": "Ενεργοποίηση Docked Mode",
|
"SettingsTabInputEnableDockedMode": "Ενεργοποίηση Docked Mode",
|
||||||
"SettingsTabInputDirectKeyboardAccess": "Άμεση Πρόσβαση στο Πληκτρολόγιο",
|
"SettingsTabInputDirectKeyboardAccess": "Άμεση Πρόσβαση στο Πληκτρολόγιο",
|
||||||
"SettingsButtonSave": "Αποθήκευση",
|
"SettingsButtonOk": "OK",
|
||||||
"SettingsButtonClose": "Κλείσιμο",
|
"SettingsButtonCancel": "Ακύρωση",
|
||||||
"SettingsButtonApply": "Εφαρμογή",
|
"SettingsButtonApply": "Εφαρμογή",
|
||||||
"ControllerSettingsPlayer": "Παίχτης",
|
"ControllerSettingsPlayer": "Παίχτης",
|
||||||
"ControllerSettingsPlayer1": "Παίχτης 1",
|
"ControllerSettingsPlayer1": "Παίχτης 1",
|
||||||
|
|
|
@ -166,8 +166,8 @@
|
||||||
"SettingsTabInput": "Input",
|
"SettingsTabInput": "Input",
|
||||||
"SettingsTabInputEnableDockedMode": "Docked Mode",
|
"SettingsTabInputEnableDockedMode": "Docked Mode",
|
||||||
"SettingsTabInputDirectKeyboardAccess": "Direct Keyboard Access",
|
"SettingsTabInputDirectKeyboardAccess": "Direct Keyboard Access",
|
||||||
"SettingsButtonSave": "Save",
|
"SettingsButtonOk": "OK",
|
||||||
"SettingsButtonClose": "Close",
|
"SettingsButtonCancel": "Cancel",
|
||||||
"SettingsButtonApply": "Apply",
|
"SettingsButtonApply": "Apply",
|
||||||
"ControllerSettingsPlayer": "Player",
|
"ControllerSettingsPlayer": "Player",
|
||||||
"ControllerSettingsPlayer1": "Player 1",
|
"ControllerSettingsPlayer1": "Player 1",
|
||||||
|
|
|
@ -166,8 +166,8 @@
|
||||||
"SettingsTabInput": "Entrada",
|
"SettingsTabInput": "Entrada",
|
||||||
"SettingsTabInputEnableDockedMode": "Modo dock/TV",
|
"SettingsTabInputEnableDockedMode": "Modo dock/TV",
|
||||||
"SettingsTabInputDirectKeyboardAccess": "Acceso directo al teclado",
|
"SettingsTabInputDirectKeyboardAccess": "Acceso directo al teclado",
|
||||||
"SettingsButtonSave": "Guardar",
|
"SettingsButtonOk": "OK",
|
||||||
"SettingsButtonClose": "Cerrar",
|
"SettingsButtonCancel": "Cancelar",
|
||||||
"SettingsButtonApply": "Aplicar",
|
"SettingsButtonApply": "Aplicar",
|
||||||
"ControllerSettingsPlayer": "Jugador",
|
"ControllerSettingsPlayer": "Jugador",
|
||||||
"ControllerSettingsPlayer1": "Jugador 1",
|
"ControllerSettingsPlayer1": "Jugador 1",
|
||||||
|
|
|
@ -159,8 +159,8 @@
|
||||||
"SettingsTabInput": "Contrôles",
|
"SettingsTabInput": "Contrôles",
|
||||||
"SettingsTabInputEnableDockedMode": "Active le mode station d'accueil",
|
"SettingsTabInputEnableDockedMode": "Active le mode station d'accueil",
|
||||||
"SettingsTabInputDirectKeyboardAccess": "Accès direct au clavier",
|
"SettingsTabInputDirectKeyboardAccess": "Accès direct au clavier",
|
||||||
"SettingsButtonSave": "Enregistrer",
|
"SettingsButtonOk": "OK",
|
||||||
"SettingsButtonClose": "Fermer",
|
"SettingsButtonCancel": "Annuler",
|
||||||
"SettingsButtonApply": "Appliquer",
|
"SettingsButtonApply": "Appliquer",
|
||||||
"ControllerSettingsPlayer": "Joueur",
|
"ControllerSettingsPlayer": "Joueur",
|
||||||
"ControllerSettingsPlayer1": "Joueur 1",
|
"ControllerSettingsPlayer1": "Joueur 1",
|
||||||
|
|
|
@ -166,8 +166,8 @@
|
||||||
"SettingsTabInput": "Input",
|
"SettingsTabInput": "Input",
|
||||||
"SettingsTabInputEnableDockedMode": "Attiva modalità TV",
|
"SettingsTabInputEnableDockedMode": "Attiva modalità TV",
|
||||||
"SettingsTabInputDirectKeyboardAccess": "Accesso diretto alla tastiera",
|
"SettingsTabInputDirectKeyboardAccess": "Accesso diretto alla tastiera",
|
||||||
"SettingsButtonSave": "Salva",
|
"SettingsButtonOk": "OK",
|
||||||
"SettingsButtonClose": "Chiudi",
|
"SettingsButtonCancel": "Cancella",
|
||||||
"SettingsButtonApply": "Applica",
|
"SettingsButtonApply": "Applica",
|
||||||
"ControllerSettingsPlayer": "Giocatore",
|
"ControllerSettingsPlayer": "Giocatore",
|
||||||
"ControllerSettingsPlayer1": "Giocatore 1",
|
"ControllerSettingsPlayer1": "Giocatore 1",
|
||||||
|
|
|
@ -166,8 +166,8 @@
|
||||||
"SettingsTabInput": "入力",
|
"SettingsTabInput": "入力",
|
||||||
"SettingsTabInputEnableDockedMode": "ドッキングモード",
|
"SettingsTabInputEnableDockedMode": "ドッキングモード",
|
||||||
"SettingsTabInputDirectKeyboardAccess": "キーボード直接アクセス",
|
"SettingsTabInputDirectKeyboardAccess": "キーボード直接アクセス",
|
||||||
"SettingsButtonSave": "セーブ",
|
"SettingsButtonOk": "オーケー",
|
||||||
"SettingsButtonClose": "閉じる",
|
"SettingsButtonCancel": "キャンセル",
|
||||||
"SettingsButtonApply": "適用",
|
"SettingsButtonApply": "適用",
|
||||||
"ControllerSettingsPlayer": "プレイヤー",
|
"ControllerSettingsPlayer": "プレイヤー",
|
||||||
"ControllerSettingsPlayer1": "プレイヤー 1",
|
"ControllerSettingsPlayer1": "プレイヤー 1",
|
||||||
|
|
|
@ -165,8 +165,8 @@
|
||||||
"SettingsTabInput": "입력",
|
"SettingsTabInput": "입력",
|
||||||
"SettingsTabInputEnableDockedMode": "도킹 모드 활성화",
|
"SettingsTabInputEnableDockedMode": "도킹 모드 활성화",
|
||||||
"SettingsTabInputDirectKeyboardAccess": "직접 키보드 액세스",
|
"SettingsTabInputDirectKeyboardAccess": "직접 키보드 액세스",
|
||||||
"SettingsButtonSave": "구하다",
|
"SettingsButtonOk": "좋아",
|
||||||
"SettingsButtonClose": "출구",
|
"SettingsButtonCancel": "취소",
|
||||||
"SettingsButtonApply": "적용하다",
|
"SettingsButtonApply": "적용하다",
|
||||||
"ControllerSettingsPlayer": "플레이어",
|
"ControllerSettingsPlayer": "플레이어",
|
||||||
"ControllerSettingsPlayer1": "플레이어 1",
|
"ControllerSettingsPlayer1": "플레이어 1",
|
||||||
|
|
|
@ -166,8 +166,8 @@
|
||||||
"SettingsTabInput": "Sterowanie",
|
"SettingsTabInput": "Sterowanie",
|
||||||
"SettingsTabInputEnableDockedMode": "Tryb Zadokowany",
|
"SettingsTabInputEnableDockedMode": "Tryb Zadokowany",
|
||||||
"SettingsTabInputDirectKeyboardAccess": "Bezpośredni Dostęp do Klawiatury",
|
"SettingsTabInputDirectKeyboardAccess": "Bezpośredni Dostęp do Klawiatury",
|
||||||
"SettingsButtonSave": "Zapisz",
|
"SettingsButtonOk": "OK",
|
||||||
"SettingsButtonClose": "Zamknij",
|
"SettingsButtonCancel": "Anuluj",
|
||||||
"SettingsButtonApply": "Zastosuj",
|
"SettingsButtonApply": "Zastosuj",
|
||||||
"ControllerSettingsPlayer": "Gracz",
|
"ControllerSettingsPlayer": "Gracz",
|
||||||
"ControllerSettingsPlayer1": "Gracz 1",
|
"ControllerSettingsPlayer1": "Gracz 1",
|
||||||
|
|
|
@ -166,8 +166,8 @@
|
||||||
"SettingsTabInput": "Controle",
|
"SettingsTabInput": "Controle",
|
||||||
"SettingsTabInputEnableDockedMode": "Habilitar modo TV",
|
"SettingsTabInputEnableDockedMode": "Habilitar modo TV",
|
||||||
"SettingsTabInputDirectKeyboardAccess": "Acesso direto ao teclado",
|
"SettingsTabInputDirectKeyboardAccess": "Acesso direto ao teclado",
|
||||||
"SettingsButtonSave": "Salvar",
|
"SettingsButtonOk": "OK",
|
||||||
"SettingsButtonClose": "Fechar",
|
"SettingsButtonCancel": "Cancelar",
|
||||||
"SettingsButtonApply": "Aplicar",
|
"SettingsButtonApply": "Aplicar",
|
||||||
"ControllerSettingsPlayer": "Jogador",
|
"ControllerSettingsPlayer": "Jogador",
|
||||||
"ControllerSettingsPlayer1": "Jogador 1",
|
"ControllerSettingsPlayer1": "Jogador 1",
|
||||||
|
|
|
@ -165,8 +165,8 @@
|
||||||
"SettingsTabInput": "Управление",
|
"SettingsTabInput": "Управление",
|
||||||
"SettingsTabInputEnableDockedMode": "Включить режим закрепления",
|
"SettingsTabInputEnableDockedMode": "Включить режим закрепления",
|
||||||
"SettingsTabInputDirectKeyboardAccess": "Прямой доступ с клавиатуры",
|
"SettingsTabInputDirectKeyboardAccess": "Прямой доступ с клавиатуры",
|
||||||
"SettingsButtonSave": "Сохранить",
|
"SettingsButtonOk": "OK",
|
||||||
"SettingsButtonClose": "Закрыть",
|
"SettingsButtonCancel": "Отмена",
|
||||||
"SettingsButtonApply": "Применить",
|
"SettingsButtonApply": "Применить",
|
||||||
"ControllerSettingsPlayer": "Игрок",
|
"ControllerSettingsPlayer": "Игрок",
|
||||||
"ControllerSettingsPlayer1": "Игрок 1",
|
"ControllerSettingsPlayer1": "Игрок 1",
|
||||||
|
|
|
@ -166,8 +166,8 @@
|
||||||
"SettingsTabInput": "Giriş Yöntemi",
|
"SettingsTabInput": "Giriş Yöntemi",
|
||||||
"SettingsTabInputEnableDockedMode": "Docked Modunu Etkinleştir",
|
"SettingsTabInputEnableDockedMode": "Docked Modunu Etkinleştir",
|
||||||
"SettingsTabInputDirectKeyboardAccess": "Doğrudan Klavye Erişimi",
|
"SettingsTabInputDirectKeyboardAccess": "Doğrudan Klavye Erişimi",
|
||||||
"SettingsButtonSave": "Kaydet",
|
"SettingsButtonOk": "Tamam",
|
||||||
"SettingsButtonClose": "Kapat",
|
"SettingsButtonCancel": "İptal",
|
||||||
"SettingsButtonApply": "Uygula",
|
"SettingsButtonApply": "Uygula",
|
||||||
"ControllerSettingsPlayer": "Oyuncu",
|
"ControllerSettingsPlayer": "Oyuncu",
|
||||||
"ControllerSettingsPlayer1": "Oyuncu 1",
|
"ControllerSettingsPlayer1": "Oyuncu 1",
|
||||||
|
|
|
@ -166,8 +166,8 @@
|
||||||
"SettingsTabInput": "输入",
|
"SettingsTabInput": "输入",
|
||||||
"SettingsTabInputEnableDockedMode": "主机模式",
|
"SettingsTabInputEnableDockedMode": "主机模式",
|
||||||
"SettingsTabInputDirectKeyboardAccess": "直通键盘控制",
|
"SettingsTabInputDirectKeyboardAccess": "直通键盘控制",
|
||||||
"SettingsButtonSave": "保存",
|
"SettingsButtonOk": "批准",
|
||||||
"SettingsButtonClose": "关闭",
|
"SettingsButtonCancel": "取消",
|
||||||
"SettingsButtonApply": "应用",
|
"SettingsButtonApply": "应用",
|
||||||
"ControllerSettingsPlayer": "玩家",
|
"ControllerSettingsPlayer": "玩家",
|
||||||
"ControllerSettingsPlayer1": "玩家 1",
|
"ControllerSettingsPlayer1": "玩家 1",
|
||||||
|
|
|
@ -166,8 +166,8 @@
|
||||||
"SettingsTabInput": "輸入",
|
"SettingsTabInput": "輸入",
|
||||||
"SettingsTabInputEnableDockedMode": "Docked 模式",
|
"SettingsTabInputEnableDockedMode": "Docked 模式",
|
||||||
"SettingsTabInputDirectKeyboardAccess": "直通鍵盤控制",
|
"SettingsTabInputDirectKeyboardAccess": "直通鍵盤控制",
|
||||||
"SettingsButtonSave": "儲存",
|
"SettingsButtonOk": "嘛好",
|
||||||
"SettingsButtonClose": "關閉",
|
"SettingsButtonCancel": "取消",
|
||||||
"SettingsButtonApply": "套用",
|
"SettingsButtonApply": "套用",
|
||||||
"ControllerSettingsPlayer": "玩家",
|
"ControllerSettingsPlayer": "玩家",
|
||||||
"ControllerSettingsPlayer1": "玩家 1",
|
"ControllerSettingsPlayer1": "玩家 1",
|
||||||
|
|
|
@ -118,7 +118,12 @@ namespace Ryujinx.Ava.Ui.ViewModels
|
||||||
OnPropertyChanged();
|
OnPropertyChanged();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public bool IsMacOS
|
||||||
|
{
|
||||||
|
get => OperatingSystem.IsMacOS();
|
||||||
|
}
|
||||||
|
|
||||||
public bool EnableDiscordIntegration { get; set; }
|
public bool EnableDiscordIntegration { get; set; }
|
||||||
public bool CheckUpdatesOnStart { get; set; }
|
public bool CheckUpdatesOnStart { get; set; }
|
||||||
public bool ShowConfirmExit { get; set; }
|
public bool ShowConfirmExit { get; set; }
|
||||||
|
@ -474,11 +479,40 @@ namespace Ryujinx.Ava.Ui.ViewModels
|
||||||
MainWindow.UpdateGraphicsConfig();
|
MainWindow.UpdateGraphicsConfig();
|
||||||
|
|
||||||
_previousVolumeLevel = Volume;
|
_previousVolumeLevel = Volume;
|
||||||
|
|
||||||
|
if (_owner is SettingsWindow owner)
|
||||||
|
{
|
||||||
|
owner.ControllerSettings?.SaveCurrentProfile();
|
||||||
|
}
|
||||||
|
|
||||||
|
if (_owner.Owner is MainWindow window && _directoryChanged)
|
||||||
|
{
|
||||||
|
window.ViewModel.LoadApplications();
|
||||||
|
}
|
||||||
|
|
||||||
|
_directoryChanged = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void RevertIfNotSaved()
|
public void RevertIfNotSaved()
|
||||||
{
|
{
|
||||||
Program.ReloadConfig();
|
Program.ReloadConfig();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void ApplyButton()
|
||||||
|
{
|
||||||
|
SaveSettings();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void OkButton()
|
||||||
|
{
|
||||||
|
SaveSettings();
|
||||||
|
_owner.Close();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void CancelButton()
|
||||||
|
{
|
||||||
|
RevertIfNotSaved();
|
||||||
|
_owner.Close();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -955,16 +955,25 @@
|
||||||
Icon="Document" />
|
Icon="Document" />
|
||||||
</ui:NavigationView.MenuItems>
|
</ui:NavigationView.MenuItems>
|
||||||
</ui:NavigationView>
|
</ui:NavigationView>
|
||||||
<StackPanel
|
<ReversibleStackPanel
|
||||||
Grid.Row="2"
|
Grid.Row="2"
|
||||||
Margin="10"
|
Margin="10"
|
||||||
Spacing="10"
|
Spacing="10"
|
||||||
Orientation="Horizontal"
|
Orientation="Horizontal"
|
||||||
HorizontalAlignment="Right">
|
HorizontalAlignment="Right"
|
||||||
<Button Content="{locale:Locale SettingsButtonSave}" Click="SaveButton_Clicked" />
|
ReverseOrder="{ReflectionBinding IsMacOS}">
|
||||||
<Button Content="{locale:Locale SettingsButtonClose}" Click="CloseButton_Clicked" />
|
<Button
|
||||||
<Button Content="{locale:Locale SettingsButtonApply}"
|
HotKey="Enter"
|
||||||
Click="ApplyButton_Clicked" />
|
Classes="accent"
|
||||||
</StackPanel>
|
Content="{locale:Locale SettingsButtonOk}"
|
||||||
|
Command="{ReflectionBinding OkButton}" />
|
||||||
|
<Button
|
||||||
|
HotKey="Escape"
|
||||||
|
Content="{locale:Locale SettingsButtonCancel}"
|
||||||
|
Command="{ReflectionBinding CancelButton}" />
|
||||||
|
<Button
|
||||||
|
Content="{locale:Locale SettingsButtonApply}"
|
||||||
|
Command="{ReflectionBinding ApplyButton}" />
|
||||||
|
</ReversibleStackPanel>
|
||||||
</Grid>
|
</Grid>
|
||||||
</window:StyleableWindow>
|
</window:StyleableWindow>
|
|
@ -199,36 +199,6 @@ namespace Ryujinx.Ava.Ui.Windows
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void SaveButton_Clicked(object sender, RoutedEventArgs e)
|
|
||||||
{
|
|
||||||
SaveSettings();
|
|
||||||
Close();
|
|
||||||
}
|
|
||||||
|
|
||||||
private void CloseButton_Clicked(object sender, RoutedEventArgs e)
|
|
||||||
{
|
|
||||||
ViewModel.RevertIfNotSaved();
|
|
||||||
Close();
|
|
||||||
}
|
|
||||||
|
|
||||||
private void ApplyButton_Clicked(object sender, RoutedEventArgs e)
|
|
||||||
{
|
|
||||||
SaveSettings();
|
|
||||||
}
|
|
||||||
|
|
||||||
private void SaveSettings()
|
|
||||||
{
|
|
||||||
ViewModel.SaveSettings();
|
|
||||||
ControllerSettings?.SaveCurrentProfile();
|
|
||||||
|
|
||||||
if (Owner is MainWindow window && ViewModel.DirectoryChanged)
|
|
||||||
{
|
|
||||||
window.ViewModel.LoadApplications();
|
|
||||||
}
|
|
||||||
|
|
||||||
ViewModel.DirectoryChanged = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
protected override void OnClosed(EventArgs e)
|
protected override void OnClosed(EventArgs e)
|
||||||
{
|
{
|
||||||
ControllerSettings.Dispose();
|
ControllerSettings.Dispose();
|
||||||
|
|
Loading…
Reference in a new issue