-
Notifications
You must be signed in to change notification settings - Fork 517
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Ability to assign hotkeys to cycle controllers for players
- Loading branch information
1 parent
b05eab2
commit e774947
Showing
9 changed files
with
363 additions
and
172 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
using Ryujinx.Ava.Common.Locale; | ||
using Ryujinx.Common.Configuration.Hid; | ||
|
||
namespace Ryujinx.Ava.UI.ViewModels | ||
{ | ||
public class CycleController : BaseModel | ||
{ | ||
private string _player; | ||
private Key _hotkey; | ||
|
||
public string Player | ||
{ | ||
get => _player; | ||
set | ||
{ | ||
_player = value; | ||
OnPropertyChanged(nameof(Player)); | ||
} | ||
} | ||
|
||
public Key Hotkey | ||
{ | ||
get => _hotkey; | ||
set | ||
{ | ||
_hotkey = value; | ||
OnPropertyChanged(nameof(Hotkey)); | ||
} | ||
} | ||
|
||
public CycleController(int v, Key x) | ||
{ | ||
Player = v switch | ||
{ | ||
1 => LocaleManager.Instance[LocaleKeys.ControllerSettingsPlayer1], | ||
2 => LocaleManager.Instance[LocaleKeys.ControllerSettingsPlayer2], | ||
3 => LocaleManager.Instance[LocaleKeys.ControllerSettingsPlayer3], | ||
4 => LocaleManager.Instance[LocaleKeys.ControllerSettingsPlayer4], | ||
5 => LocaleManager.Instance[LocaleKeys.ControllerSettingsPlayer5], | ||
6 => LocaleManager.Instance[LocaleKeys.ControllerSettingsPlayer6], | ||
7 => LocaleManager.Instance[LocaleKeys.ControllerSettingsPlayer7], | ||
8 => LocaleManager.Instance[LocaleKeys.ControllerSettingsPlayer8], | ||
_ => LocaleManager.Instance[LocaleKeys.ControllerSettingsPlayer] + " " + v | ||
}; | ||
Hotkey = x; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.