mirror of
https://github.com/switchbrew/libnx.git
synced 2025-06-21 20:42:44 +02:00
swkbd: Added swkbdInlineGetMiniaturizedHeight.
This commit is contained in:
parent
c51918a605
commit
0d5dcde5b9
@ -650,6 +650,12 @@ Result swkbdInlineGetImage(SwkbdInline* s, void* buffer, u64 size, bool *data_av
|
||||
*/
|
||||
s32 swkbdInlineGetMaxHeight(SwkbdInline* s);
|
||||
|
||||
/**
|
||||
* @brief Gets the MiniaturizedHeight, relative to the bottom of the screen.
|
||||
* @param s SwkbdInline object.
|
||||
*/
|
||||
s32 swkbdInlineGetMiniaturizedHeight(SwkbdInline* s);
|
||||
|
||||
/**
|
||||
* @brief GetTouchRectangles. Returns number of valid Rects: 1 for only keytop, 2 for keytop/footer.
|
||||
* @param s SwkbdInline object.
|
||||
|
@ -589,6 +589,15 @@ s32 swkbdInlineGetMaxHeight(SwkbdInline* s) {
|
||||
return s->state == SwkbdState_Unknown6 ? height1 : height0;
|
||||
}
|
||||
|
||||
s32 swkbdInlineGetMiniaturizedHeight(SwkbdInline* s) {
|
||||
bool flag=0;
|
||||
if (s->calcArg.appearArg.type >= SwkbdType_ZhHans && s->calcArg.appearArg.type <= SwkbdType_Unknown9) flag = 1;
|
||||
else if (!(s->calcArg.appearArg.dicFlag && s->wordInfoInitialized && s->dicCustomInitialized)) {
|
||||
flag = !s->calcArg.appearArg.keySetDisableBitmask && (s->calcArg.appearArg.type != SwkbdType_NumPad && s->calcArg.appearArg.type != SwkbdType_QWERTY);
|
||||
}
|
||||
return flag ? 132 : 72;
|
||||
}
|
||||
|
||||
s32 swkbdInlineGetTouchRectangles(SwkbdInline* s, SwkbdRect *keytop, SwkbdRect *footer) {
|
||||
float keytop_max_height = (float)swkbdInlineGetMaxHeight(s);
|
||||
float footer_max_height = keytop_max_height;
|
||||
|
Loading…
Reference in New Issue
Block a user