Reimplement hide interface hotkey and allow hiding choice menus as well as the say screen

This commit is contained in:
LoafyLemon 2024-06-26 16:23:32 +01:00
parent 0709368ea4
commit 578310ad71

View File

@ -69,7 +69,6 @@ screen say(who, what, side_doll=None, icon=None):
add SideImage()
screen hider():
variant "pc"
if states.settings.interface_hidden:
button action ToggleVariable("states.settings.interface_hidden", True, False) style "empty"
@ -84,8 +83,6 @@ default states.settings.interface_hidden = False
default states.settings.interface_alpha = 0.5
screen quickbox():
variant "pc"
window:
id "quickbox"
style "quickbox"
@ -94,7 +91,7 @@ screen quickbox():
hbox:
xalign 1.0
if states.settings.quickbox_expanded:
textbutton "󰈉" action ToggleVariable("states.settings.interface_hidden", True, False) tooltip _("Hide Interface") # Hide Interface (\F0209)
textbutton "󰈉" action ToggleVariable("states.settings.interface_hidden", True, False) tooltip _("Hide Interface") keysym "K_h" # 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)
@ -166,7 +163,15 @@ screen choice(items):
default has_icons = any(x is not None for x in [e.kwargs.get("icon", None) for e in items])
default columns = math.ceil(len(items) / 12)
key "K_h" action ToggleVariable("states.settings.interface_hidden", True, False)
if states.settings.interface_hidden:
use hider
hbox:
if states.settings.interface_hidden:
yoffset 1000
at gui_choice_show_hide
for column in range(columns):
vbox: