mirror of
https://git.ryujinx.app/kenji-nx/ryujinx.git
synced 2025-12-17 07:37:06 +00:00
infra: Readjust namespaces/folders/projects/filenames back to Ryujinx
This commit is contained in:
parent
2e0bb4ec56
commit
9955191651
240 changed files with 90 additions and 127 deletions
56
src/Ryujinx/UI/Views/Input/RumbleInputView.axaml.cs
Normal file
56
src/Ryujinx/UI/Views/Input/RumbleInputView.axaml.cs
Normal file
|
|
@ -0,0 +1,56 @@
|
|||
using Avalonia.Controls;
|
||||
using FluentAvalonia.UI.Controls;
|
||||
using Ryujinx.Ava.Common.Locale;
|
||||
using Ryujinx.Ava.UI.ViewModels.Input;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Ryujinx.Ava.UI.Views.Input
|
||||
{
|
||||
public partial class RumbleInputView : UserControl
|
||||
{
|
||||
private readonly RumbleInputViewModel _viewModel;
|
||||
|
||||
public RumbleInputView()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
public RumbleInputView(ControllerInputViewModel viewModel)
|
||||
{
|
||||
var config = viewModel.Config;
|
||||
|
||||
_viewModel = new RumbleInputViewModel
|
||||
{
|
||||
StrongRumble = config.StrongRumble,
|
||||
WeakRumble = config.WeakRumble,
|
||||
};
|
||||
|
||||
InitializeComponent();
|
||||
|
||||
DataContext = _viewModel;
|
||||
}
|
||||
|
||||
public static async Task Show(ControllerInputViewModel viewModel)
|
||||
{
|
||||
RumbleInputView content = new(viewModel);
|
||||
|
||||
ContentDialog contentDialog = new()
|
||||
{
|
||||
Title = LocaleManager.Instance[LocaleKeys.ControllerRumbleTitle],
|
||||
PrimaryButtonText = LocaleManager.Instance[LocaleKeys.ControllerSettingsSave],
|
||||
SecondaryButtonText = "",
|
||||
CloseButtonText = LocaleManager.Instance[LocaleKeys.ControllerSettingsClose],
|
||||
Content = content,
|
||||
};
|
||||
|
||||
contentDialog.PrimaryButtonClick += (sender, args) =>
|
||||
{
|
||||
var config = viewModel.Config;
|
||||
config.StrongRumble = content._viewModel.StrongRumble;
|
||||
config.WeakRumble = content._viewModel.WeakRumble;
|
||||
};
|
||||
|
||||
await contentDialog.ShowAsync();
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue