Compare commits

..

3 Commits

Author SHA1 Message Date
acfb09516c Improve and fix last 2023-11-17 03:16:28 +01:00
1672b2381a Replace show screen with call screen 2023-11-17 03:13:17 +01:00
e242c0e43a Factorize pos 2023-11-17 03:08:51 +01:00

View File

@ -28,27 +28,23 @@ label summon_menu(xx=723, yy=90):
$ current_sorting = summon_show_busy
label .after_init:
call screen summon(xx, yy)
show screen summon(xx, yy)
$ renpy.dynamic(__choice = ui.interact())
if __choice[0] == "summon":
hide screen summon
if not __choice[2]:
$ enable_game_menu()
$ renpy.jump_out_of_context("summon_"+__choice[1].lower())
else:
if game.daytime or __choice[1] in ["Tonks", "Snape"]:
nar "[__choice[1]] is currently busy. Try again later."
else:
nar "[__choice[1]] is currently asleep. Try again tomorrow."
else:
hide screen summon
return
jump .after_init
label .summon(char):
$ enable_game_menu()
$ renpy.jump_out_of_context("summon_"+char.lower())
return
label .summon_busy(char):
if game.daytime or char in ["Tonks", "Snape"]:
nar "[char] is currently busy. Try again later."
else:
nar "[char] is currently asleep. Try again tomorrow."
return
screen summon(xx, yy):
tag summon
@ -62,18 +58,18 @@ screen summon(xx, yy):
use close_button(key=["summon", "game_menu"])
fixed:
pos (xx, yy)
if settings.get("animations"):
at gui_animation
use summon_menu(xx, yy)
use summon_menu
screen summon_menu(xx, yy):
screen summon_menu():
tag summon_menu
modal True
zorder 15
window:
style "empty"
pos (xx, yy)
xysize (207, 454)
use invisible_button()
@ -115,10 +111,10 @@ screen summon_menu(xx, yy):
text_xanchor 0.5
text_size 20
if not summon_dict[char]["busy"]:
action Return(["summon", char, False])
action Call("summon_menu.summon", char, from_current=True)
else:
text_color "#8C8C70"
action Return(["summon", char, True])
action Call("summon_menu.summon_busy", char, from_current=True)
add gui.format("interface/achievements/{}/spacer_left.webp")