Here's my code in script.rpy:
Code: Select all
image notification = "images/notification.png"
transform menu_notifications:
xanchor 0.0 xpos 174
yanchor 0.0 ypos 756
label start:
# etc
$ notification_on = True ## to show the image in the screen
show screen shark_userpage
pause
Code: Select all
screen shark_interface:
modal True
add "interface"
imagebutton idle Solid("#0000", xysize=(250, 200)) clicked [hide_screens(), Show("shark_userpage")] xpos 0 ypos 144 focus_mask None #[hide_screens, Show("shark_userpage")] xpos 0 ypos 144 focus_mask None
imagebutton idle Solid("#0000", xysize=(250, 200)) clicked [hide_screens(), Show("shark_communities")] xpos 0 ypos 344 focus_mask None#[hide_screens, Show("shark_communities")] xpos 0 ypos 344 focus_mask None
imagebutton idle Solid("#0000", xysize=(250, 200)) clicked Jump("message_inbox") xpos 0 ypos 544 focus_mask None#[hide_screens, Show("shark_messages")] xpos 0 ypos 544 focus_mask None
imagebutton idle Solid("#0000", xysize=(250, 200)) clicked [hide_screens(), Show("shark_notifications")] xpos 0 ypos 744 focus_mask None#[hide_screens, Show("shark_notifications")] xpos 0 ypos 744 focus_mask None
if notification_on == True: ## if the notification is on, the icon appears in the specified location - this works
add "notification" at menu_notifications
# One of my mock interface screens below. I want it to hide the icon when selected, as the notifications have then been seen.
screen shark_notifications:
$ notification_on = False ## this doesn't appear to register, as the variable viewer says it's still "True" and the image remains.
modal True
tag sharkmenu
use shark_interface
add "images/menu_on.png" xpos 0 ypos 744
text _("Your Notifications") color "#000000" xpos 30 ypos 16
Does anyone know what I'm doing wrong?