Closing a custom screen chooses a menu item.
Posted: Thu Jan 04, 2024 6:33 am
Hey guys, I have a phone UI in my game. Whenever I open this UI in a zone with a menu, the last item in the menu is selected.
Does anyone have any idea why this might be happening?
Here's a video of the bug in action.
https://youtu.be/hz1tgVsYOB0
This is the MC's bedroom, where menus are present.
This is the button to close the phone:
This is the "function" that closes the phone screen.
Does anyone have any idea why this might be happening?
Here's a video of the bug in action.
https://youtu.be/hz1tgVsYOB0
This is the MC's bedroom, where menus are present.
Code: Select all
label bedroom:
call screensrefresh
if clock.time_of_day in ["10PM", "11PM", "12AM", "1AM", "2AM", "3AM"]:
scene bedroomnighttime with fade
else:
scene bedroomday with fade
menu:
"Work out":
"You work out for an hour."
$ clock.advance(1)
jump bedroom
"Study":
"You study for an hour."
$ clock.advance(1)
jump bedroom
"nada":
"de nada" #exiting the hud will always choose the last menu item
jump bedroom
return
Code: Select all
screen hud():
hbox xalign 0.5 yalign 0.945:
#phone home button
imagebutton:
idle "homebutton.png"
hover "homebuttonhover.png"
action Call ("phoneexit")
Code: Select all
label phoneexit:
hide screen hud
show screen hud
hide screen phonebuttons
hide screen phoneprofiles
hide screen contactnames
hide phonehome
hide phoneprofiles
hide phonemain
hide screen phoneprofilescreen
hide screen contactnames
hide phonemap
hide screen map
pause .1
return