mirror of
https://github.com/Ryujinx/Ryujinx.git
synced 2024-11-18 01:36:41 +00:00
Add buttons interactibility toggle
This commit is contained in:
parent
fd33ebb42d
commit
417b4caa98
3 changed files with 8 additions and 0 deletions
|
@ -67,6 +67,7 @@ namespace Ryujinx.Ava.UI.ViewModels
|
||||||
public event Action CloseWindow;
|
public event Action CloseWindow;
|
||||||
public event Action SaveSettingsEvent;
|
public event Action SaveSettingsEvent;
|
||||||
public event Action<bool> DirtyEvent;
|
public event Action<bool> DirtyEvent;
|
||||||
|
public event Action<bool> ToggleButtons;
|
||||||
|
|
||||||
public int ResolutionScale
|
public int ResolutionScale
|
||||||
{
|
{
|
||||||
|
|
|
@ -108,6 +108,7 @@
|
||||||
</ui:NavigationView>
|
</ui:NavigationView>
|
||||||
<ReversibleStackPanel
|
<ReversibleStackPanel
|
||||||
Grid.Row="2"
|
Grid.Row="2"
|
||||||
|
Name="Buttons"
|
||||||
Margin="10"
|
Margin="10"
|
||||||
Spacing="10"
|
Spacing="10"
|
||||||
Orientation="Horizontal"
|
Orientation="Horizontal"
|
||||||
|
|
|
@ -22,6 +22,7 @@ namespace Ryujinx.Ava.UI.Windows
|
||||||
ViewModel.CloseWindow += Close;
|
ViewModel.CloseWindow += Close;
|
||||||
ViewModel.SaveSettingsEvent += SaveSettings;
|
ViewModel.SaveSettingsEvent += SaveSettings;
|
||||||
ViewModel.DirtyEvent += UpdateDirtyTitle;
|
ViewModel.DirtyEvent += UpdateDirtyTitle;
|
||||||
|
ViewModel.ToggleButtons += ToggleButtons;
|
||||||
|
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
Load();
|
Load();
|
||||||
|
@ -49,6 +50,11 @@ namespace Ryujinx.Ava.UI.Windows
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void ToggleButtons(bool enable)
|
||||||
|
{
|
||||||
|
Buttons.IsEnabled = enable;
|
||||||
|
}
|
||||||
|
|
||||||
public void SaveSettings()
|
public void SaveSettings()
|
||||||
{
|
{
|
||||||
InputPage.InputView?.SaveCurrentProfile();
|
InputPage.InputView?.SaveCurrentProfile();
|
||||||
|
|
Loading…
Reference in a new issue