Harvid Posted February 22, 2024 Posted February 22, 2024 Actually, I can't think of any logic when user tap out prompt and user tap cancel button on prompt. local value will always be nil ;-; for example: test = gg.prompt ({ [1] = "..." }) if test == nil then -- user tap out prompt print("menu hide") -- code menu hide elseif -- how to know when user tap cancel button on prompt? main() -- back to main() end
kiynox Posted February 22, 2024 Posted February 22, 2024 [ @Harvid ] --- Tapping out of the prompt means cancelled. So it is the same thing and returns the same (nil). gg.prompt() is used far asking values to the user, you need to use gg.choice() if it's just altering to different function. ---
Question
Harvid
Actually, I can't think of any logic when user tap out prompt and user tap cancel button on prompt.
local value will always be nil ;-;
for example:
test = gg.prompt ({
[1] = "..." })
if test == nil then -- user tap out prompt
print("menu hide")
-- code menu hide
elseif -- how to know when user tap cancel button on prompt?
main() -- back to main()
end
1 answer to this question
Recommended Posts
Archived
This topic is now archived and is closed to further replies.