diff --git a/nx/include/switch/applets/swkbd.h b/nx/include/switch/applets/swkbd.h index 0dd77c88..ca5535e7 100644 --- a/nx/include/switch/applets/swkbd.h +++ b/nx/include/switch/applets/swkbd.h @@ -490,6 +490,20 @@ void swkbdInlineMakeAppearArg(SwkbdAppearArg* arg, SwkbdType type); */ void swkbdInlineAppearArgSetOkButtonText(SwkbdAppearArg* arg, const char* str); +/** + * @brief Sets the LeftButtonText, for \ref SwkbdType_NumPad. The default is "". Equivalent to \ref swkbdConfigSetLeftOptionalSymbolKey. + * @param arg \ref SwkbdAppearArg, previously initialized by \ref swkbdInlineMakeAppearArg. + * @param str UTF-8 input string. + */ +void swkbdInlineAppearArgSetLeftButtonText(SwkbdAppearArg* arg, const char* str); + +/** + * @brief Sets the RightButtonText, for \ref SwkbdType_NumPad. The default is "". Equivalent to \ref sswkbdConfigSetRightOptionalSymbolKey. + * @param arg \ref SwkbdAppearArg, previously initialized by \ref swkbdInlineMakeAppearArg. + * @param str UTF-8 input string. + */ +void swkbdInlineAppearArgSetRightButtonText(SwkbdAppearArg* arg, const char* str); + /** * @brief Sets the audio volume. * @note \ref swkbdInlineUpdate must be called at some point afterwards for this to take affect. diff --git a/nx/source/applets/swkbd.c b/nx/source/applets/swkbd.c index efed3616..afac4f17 100644 --- a/nx/source/applets/swkbd.c +++ b/nx/source/applets/swkbd.c @@ -656,6 +656,14 @@ void swkbdInlineAppearArgSetOkButtonText(SwkbdAppearArg* arg, const char* str) _swkbdConvertToUTF16ByteSize(arg->okButtonText, str, sizeof(arg->okButtonText)); } +void swkbdInlineAppearArgSetLeftButtonText(SwkbdAppearArg* arg, const char* str) { + _swkbdConvertToUTF16(&arg->leftButtonText, str, 1); +} + +void swkbdInlineAppearArgSetRightButtonText(SwkbdAppearArg* arg, const char* str) { + _swkbdConvertToUTF16(&arg->rightButtonText, str, 1); +} + void swkbdInlineSetVolume(SwkbdInline* s, float volume) { if (s->calcArg.volume == volume) return; s->calcArg.volume = volume;