Added swkbdInlineAppearArgSetLeftButtonText and swkbdInlineAppearArgSetRightButtonText.

This commit is contained in:
yellows8 2019-01-28 21:15:45 -05:00
parent 2ebac06061
commit b3b5816fd0
2 changed files with 22 additions and 0 deletions

View File

@ -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.

View File

@ -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;