diff options
| author | WilliamWsyHK <WilliamWsyHK@users.noreply.github.com> | 2023-06-04 11:30:24 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-06-04 05:30:24 +0200 |
| commit | d511c845b70a8771de7d64369e24ab3f1ed1c325 (patch) | |
| tree | cb57689ed2f6080b8e3e8bbc465db6358a7e9012 /src/Ryujinx.HLE/HOS/Applets | |
| parent | 21c9ac6240a3db3300143d1d0dd4a1070d4f576f (diff) | |
Check KeyboardMode in GUI (#4343)
* Update SoftwareKeyboard to send KeyboardMode to UI
* Update GTK UI to check text against KeyboardMode
* Update Ava UI to check text against KeyboardMode
* Restructure input validation
* true when text is not empty
* Add English validation text for SoftwareKeyboardMode
* Add Chinese validation text for SoftwareKeyboardMode
* Update base on feedback
---------
Co-authored-by: TSR Berry <20988865+TSRBerry@users.noreply.github.com>
Diffstat (limited to 'src/Ryujinx.HLE/HOS/Applets')
3 files changed, 5 insertions, 1 deletions
diff --git a/src/Ryujinx.HLE/HOS/Applets/SoftwareKeyboard/KeyboardMode.cs b/src/Ryujinx.HLE/HOS/Applets/SoftwareKeyboard/KeyboardMode.cs index f512050e..01b3c963 100644 --- a/src/Ryujinx.HLE/HOS/Applets/SoftwareKeyboard/KeyboardMode.cs +++ b/src/Ryujinx.HLE/HOS/Applets/SoftwareKeyboard/KeyboardMode.cs @@ -3,7 +3,7 @@ /// <summary> /// Identifies the variant of keyboard displayed on screen. /// </summary> - enum KeyboardMode : uint + public enum KeyboardMode : uint { /// <summary> /// A full alpha-numeric keyboard. diff --git a/src/Ryujinx.HLE/HOS/Applets/SoftwareKeyboard/SoftwareKeyboardApplet.cs b/src/Ryujinx.HLE/HOS/Applets/SoftwareKeyboard/SoftwareKeyboardApplet.cs index 278ea56c..4b484e80 100644 --- a/src/Ryujinx.HLE/HOS/Applets/SoftwareKeyboard/SoftwareKeyboardApplet.cs +++ b/src/Ryujinx.HLE/HOS/Applets/SoftwareKeyboard/SoftwareKeyboardApplet.cs @@ -209,6 +209,7 @@ namespace Ryujinx.HLE.HOS.Applets // Call the configured GUI handler to get user's input. var args = new SoftwareKeyboardUiArgs { + KeyboardMode = _keyboardForegroundConfig.Mode, HeaderText = StripUnicodeControlCodes(_keyboardForegroundConfig.HeaderText), SubtitleText = StripUnicodeControlCodes(_keyboardForegroundConfig.SubtitleText), GuideText = StripUnicodeControlCodes(_keyboardForegroundConfig.GuideText), diff --git a/src/Ryujinx.HLE/HOS/Applets/SoftwareKeyboard/SoftwareKeyboardUiArgs.cs b/src/Ryujinx.HLE/HOS/Applets/SoftwareKeyboard/SoftwareKeyboardUiArgs.cs index d24adec3..d67a4409 100644 --- a/src/Ryujinx.HLE/HOS/Applets/SoftwareKeyboard/SoftwareKeyboardUiArgs.cs +++ b/src/Ryujinx.HLE/HOS/Applets/SoftwareKeyboard/SoftwareKeyboardUiArgs.cs @@ -1,7 +1,10 @@ +using Ryujinx.HLE.HOS.Applets.SoftwareKeyboard; + namespace Ryujinx.HLE.HOS.Applets { public struct SoftwareKeyboardUiArgs { + public KeyboardMode KeyboardMode; public string HeaderText; public string SubtitleText; public string InitialText; |
