diff --git a/game/scripts/gui/say.rpy b/game/scripts/gui/say.rpy index cada75b1..f5a7fa24 100644 --- a/game/scripts/gui/say.rpy +++ b/game/scripts/gui/say.rpy @@ -105,7 +105,7 @@ screen quickbox(): hbox: xalign 1.0 if states.settings.quickbox_expanded: - textbutton "󰈉" action ToggleVariable("states.settings.interface_hidden", True, False) tooltip _("Hide Interface") keysym "K_h" # Hide Interface (\F0209) + textbutton "󰈉" action ToggleVariable("states.settings.interface_hidden", True, False) tooltip _("Hide Interface") keysym "hide_windows" # Hide Interface (\F0209) textbutton "󰇚" action QuickSave() tooltip _("Quick Save") # File Save (\F01DA) textbutton "󰕒" action QuickLoad() tooltip _("Quick Load") # File Load (\F0552) textbutton "󰁪" action Preference("auto-forward", "toggle") tooltip _("Auto-Forward Dialogue") # Autoplay (\F18F2) diff --git a/game/scripts/interface/achievements.rpy b/game/scripts/interface/achievements.rpy index 1dc60032..22a673ee 100644 --- a/game/scripts/interface/achievements.rpy +++ b/game/scripts/interface/achievements.rpy @@ -179,8 +179,11 @@ init python in achievements: unlocked_achievements = sum(1 for x in items if renpy.store.achievement.has(x)) return round((unlocked_achievements / total_achievements) * 100) -label achievements: +label achievements(inter_pause=True): $ disable_game_menu() + if inter_pause: + # Ensures all irrelevant screens are hidden before capturing the surface tree + with Pause(0.2) call screen achievements $ enable_game_menu() jump main_room_menu @@ -220,7 +223,7 @@ screen achievements(): for i in menu_categories: textbutton "[i.capitalize()]" action [SetScreenVariable("category", i), SetScreenVariable("menu_items", achievements.get_list(i))] selected (category==i) at navigation_tabs null height 35 - textbutton _("Return") action [SetScreenVariable("navigation_last_frame_atl", navigation_last_frame_hide), SetScreenVariable("navigation_atl", navigation_hide), SetScreenVariable("navigation_exit", True)] keysym ["game_menu"] at navigation_tabs + textbutton _("Return") action [SetScreenVariable("navigation_last_frame_atl", navigation_last_frame_hide), SetScreenVariable("navigation_atl", navigation_hide), SetScreenVariable("navigation_exit", True)] keysym ["game_menu", "achievements"] at navigation_tabs frame: label _("Achievements") diff --git a/game/scripts/interface/gifts.rpy b/game/scripts/interface/gifts.rpy index 707366fd..1f576c26 100644 --- a/game/scripts/interface/gifts.rpy +++ b/game/scripts/interface/gifts.rpy @@ -1,6 +1,9 @@ -label gift_menu: +label gift_menu(inter_pause=True): $ disable_game_menu() $ inventory_mode = 1 + if inter_pause: + # Ensures all irrelevant screens are hidden before capturing the surface tree + with Pause(0.2) call screen inventory if not _return == True: diff --git a/game/scripts/interface/hotkeys.rpy b/game/scripts/interface/hotkeys.rpy index 058cc8ce..0a9fd1b8 100644 --- a/game/scripts/interface/hotkeys.rpy +++ b/game/scripts/interface/hotkeys.rpy @@ -13,6 +13,7 @@ init 1 python: sleep = ["K_s"], fap = ["K_f"], summon = ["K_d"], + achievements = ["K_o"], # Bindings present almost everywhere, unless explicitly disabled. rollback = ["K_PAGEUP", "repeat_K_PAGEUP", "K_AC_BACK", "mousedown_4"], @@ -169,7 +170,8 @@ screen hotkeys_main(): key "work" action Jump("paperwork") key "stats" action Jump("stats") - key "inventory" action Jump("inventory") + key "inventory" action JumpWith("inventory", inter_pause=False) + key "achievements" action JumpWith("achievements", inter_pause=False) key "fap" action Jump("jerk_off") key "summon" action Jump("door") key "sleep" action If(states.env.daytime, Jump("night_start"), Jump("day_start")) diff --git a/game/scripts/interface/inventory.rpy b/game/scripts/interface/inventory.rpy index 5bf8a8ca..f7a3b3fd 100644 --- a/game/scripts/interface/inventory.rpy +++ b/game/scripts/interface/inventory.rpy @@ -1,7 +1,10 @@ default inventory_mode = 0 # 0 - Inventory, 1 - gifts -label inventory: +label inventory(inter_pause=True): $ disable_game_menu() + if inter_pause: + # Ensures all irrelevant screens are hidden before capturing the surface tree + with Pause(0.2) call screen inventory $ enable_game_menu() jump main_room_menu diff --git a/game/scripts/interface/wheelmenu.rpy b/game/scripts/interface/wheelmenu.rpy index bd289f60..bf95430b 100644 --- a/game/scripts/interface/wheelmenu.rpy +++ b/game/scripts/interface/wheelmenu.rpy @@ -112,7 +112,7 @@ style wheelmenu_button_text is wheelmenu_text transform wheelmenu_anim: on show: - zoom 0.0 + zoom 0.0 alpha 0.0 easein_back 0.2 zoom 1.0 alpha 1.0 on hide: diff --git a/game/scripts/rooms/main_room/init.rpy b/game/scripts/rooms/main_room/init.rpy index debd4a93..a95e6877 100644 --- a/game/scripts/rooms/main_room/init.rpy +++ b/game/scripts/rooms/main_room/init.rpy @@ -131,6 +131,7 @@ label main_room: # Return to main_room at menu point (after quests and events) # Used to return from main room interactions label main_room_menu: + $ renpy.set_return_stack([]) hide screen bld1 with d3 diff --git a/game/scripts/utility/engine.rpy b/game/scripts/utility/engine.rpy index bfd306d9..a0195fb6 100644 --- a/game/scripts/utility/engine.rpy +++ b/game/scripts/utility/engine.rpy @@ -362,3 +362,24 @@ init -100 python: renpy.config.after_replay_callback() renpy.call_replay = _call_replay + + # Implement pseudo jump with arguments required to simplify code, + @renpy.pure + class JumpWith(Action, DictEquality): + """ + :doc: control_action + + Causes control to transfer to `label`, given as a string. + """ + + args = tuple() + kwargs = dict() + + def __init__(self, label, *args, **kwargs): + self.label = label + self.args = args + self.kwargs = kwargs + + def __call__(self): + renpy.set_return_stack([]) + renpy.call(self.label, *self.args, **self.kwargs)