mirror of
https://github.com/bryanthaboi/gen1recomp.git
synced 2026-08-27 17:01:44 +02:00
fix(kit): open VirtualKeyboard on pointer click as well as D-pad activation on handhelds
This commit is contained in:
+6
-1
@@ -848,7 +848,12 @@ function Kit.textfield(id, x, y, w, h, value, placeholder)
|
||||
local focusRing = Kit.focusable(id, x, y, w, h)
|
||||
value = tostring(value or "")
|
||||
|
||||
if Kit._activateId == id and not mobile() then
|
||||
local isHandheld = os.getenv("HANDHELD") == "1" or os.getenv("PORTMASTER") == "1"
|
||||
or os.getenv("POKEPORT_HANDHELD") == "1" or os.getenv("TRIMUI") == "1"
|
||||
or os.getenv("MUOS") == "1" or os.getenv("KNULLI") == "1"
|
||||
|
||||
local clickedOrActivated = (Kit._activateId == id) or (isHandheld and Kit.press(x, y, w, h))
|
||||
if clickedOrActivated and not mobile() then
|
||||
VirtualKeyboard.open({
|
||||
text = value,
|
||||
targetId = id,
|
||||
|
||||
Reference in New Issue
Block a user