Convert ball_hint to a screen variable

no leak
This commit is contained in:
Gouvernathor 2023-11-15 00:17:26 +01:00
parent f51f3a30a1
commit 4ec94d28f5
2 changed files with 56 additions and 57 deletions

File diff suppressed because it is too large Load Diff

View File

@ -34,9 +34,6 @@ label desk:
else:
jump main_room_menu
#Define hints variable
$ ball_hint = None
# TODO: Refactor. Low priority.
call update_character_map_locations
@ -148,6 +145,8 @@ screen desk_menu():
zorder 5
default ball_hint = None
#Background
add "interface/desk/_bg_.webp"
@ -157,7 +156,7 @@ screen desk_menu():
# Ugly hands
# add "interface/desk/_hands_.webp" xpos 0 ypos -30
use crystal_ball
use crystal_ball(ball_hint)
use watch
#Book
@ -169,9 +168,9 @@ screen desk_menu():
xalign 1.0
idle "interface/desk/book.webp"
hover "interface/desk/book_hover.webp"
hovered SetVariable("ball_hint", "book")
hovered SetScreenVariable("ball_hint", "book")
keysym "inventory"
unhovered SetVariable("ball_hint", None)
unhovered SetScreenVariable("ball_hint", None)
action Return("inventory")
#Tissue Box
@ -182,9 +181,9 @@ screen desk_menu():
xalign 1.0
idle "interface/desk/tissues.webp"
hover "interface/desk/tissues_hover.webp"
hovered SetVariable("ball_hint", "jerk_off")
hovered SetScreenVariable("ball_hint", "jerk_off")
keysym "fap"
unhovered SetVariable("ball_hint", None)
unhovered SetScreenVariable("ball_hint", None)
action Return("jerk_off")
#Work
@ -195,9 +194,9 @@ screen desk_menu():
xalign 0.0
idle "interface/desk/work.webp"
hover "interface/desk/work_hover.webp"
hovered SetVariable("ball_hint", "work")
hovered SetScreenVariable("ball_hint", "work")
keysym "work"
unhovered SetVariable("ball_hint", None)
unhovered SetScreenVariable("ball_hint", None)
action Return("paperwork")
#Cards
@ -209,8 +208,8 @@ screen desk_menu():
yalign 1.0
idle "interface/desk/cards.webp"
hover "interface/desk/cards_hover.webp"
hovered SetVariable("ball_hint", "cards")
unhovered SetVariable("ball_hint", None)
hovered SetScreenVariable("ball_hint", "cards")
unhovered SetScreenVariable("ball_hint", None)
action Return("deck_builder")
#exit
@ -221,8 +220,8 @@ screen desk_menu():
ypos 600
idle "interface/desk/exit_mask.webp"
hover "interface/desk/exit.webp"
hovered SetVariable("ball_hint", "exit")
unhovered SetVariable("ball_hint", None)
hovered SetScreenVariable("ball_hint", "exit")
unhovered SetScreenVariable("ball_hint", None)
action Return("Close")
#Night Overlay
@ -232,7 +231,7 @@ screen desk_menu():
use close_button
screen crystal_ball():
screen crystal_ball(ball_hint):
tag desk_interface
zorder 8
@ -250,9 +249,9 @@ screen watch():
ypos 0
idle "interface/desk/watch.webp"
hover "interface/desk/watch_hover.webp"
unhovered SetVariable("ball_hint", None)
unhovered SetScreenVariable("ball_hint", None)
keysym "sleep"
hovered If(game.daytime, SetVariable("ball_hint", "doze_off"), SetVariable("ball_hint", "sleep"))
hovered If(game.daytime, SetScreenVariable("ball_hint", "doze_off"), SetScreenVariable("ball_hint", "sleep"))
action If(game.daytime, Return("night_start"), Return("day_start"))
$ watch_x = 603 +67