summaryrefslogtreecommitdiff
path: root/game
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2020-12-23 10:27:41 -0300
committerJesusaves <cpntb1@ymail.com>2020-12-23 10:27:41 -0300
commit618eb6a7526b7fcb84ec15a1b7062f62005509a0 (patch)
tree6eae8b2cd1cc6031495ffc5a04619c5d1f78ccd4 /game
parent12bc33f8185488e17bfcf8ffd50d9bb1c4e2245b (diff)
downloadclient-618eb6a7526b7fcb84ec15a1b7062f62005509a0.tar.gz
client-618eb6a7526b7fcb84ec15a1b7062f62005509a0.tar.bz2
client-618eb6a7526b7fcb84ec15a1b7062f62005509a0.tar.xz
client-618eb6a7526b7fcb84ec15a1b7062f62005509a0.zip
msgbox() may now autoclose itself.
Currently, only tavern will use this autoclosing feature after 6 seconds.
Diffstat (limited to 'game')
-rw-r--r--game/recruit.rpy3
-rw-r--r--game/screens.rpy5
2 files changed, 6 insertions, 2 deletions
diff --git a/game/recruit.rpy b/game/recruit.rpy
index 1abdac2..cb28d79 100644
--- a/game/recruit.rpy
+++ b/game/recruit.rpy
@@ -34,6 +34,7 @@ init python:
Player[rc["currency"][0]]=rc["currency"][1]
except:
renpy.notify("ERROR, Currency is undefined.")
+ stdout("ERROR, Undefined currency")
for unit in rc["units"]:
_window_hide(None)
@@ -54,7 +55,7 @@ init python:
sprite=str(unit["unit_id"])
show_img("unit_"+sprite, at_list=[truecenter])
renpy.pause(0.1)
- renpy.call_screen("msgbox", "%s\n\nRecruited %d★ %s" % (star, rar, txt))
+ renpy.call_screen("msgbox", "%s\n\nRecruited %d★ %s" % (star, rar, txt), autoclose=6.0)
renpy.hide("unit_"+sprite)
_window_show(None)
diff --git a/game/screens.rpy b/game/screens.rpy
index 2265998..50fb397 100644
--- a/game/screens.rpy
+++ b/game/screens.rpy
@@ -1105,7 +1105,7 @@ transform msgbox_emp:
yalign 0.50
linear 0.1
-screen msgbox(message, anim=True):
+screen msgbox(message, anim=True, autoclose=0.0):
## Ensure other screens do not get input while this screen is displayed.
modal True
@@ -1132,6 +1132,9 @@ screen msgbox(message, anim=True):
textbutton _("Ok") action Return()
+ if autoclose > 0.0:
+ timer autoclose action Return()
+
## Right-click and escape answer "no".
key "game_menu" action Return()