Compare commits
6 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 8f706107ac | |||
| d489199e00 | |||
| bf023dc2e3 | |||
| ac6b04b5e3 | |||
| a34de5d601 | |||
| b9900776a8 |
+10
-1
@@ -238,7 +238,8 @@ init -1180 python:
|
||||
|
||||
config.screenshot_callback = _screenshot_callback
|
||||
|
||||
|
||||
_predict_screens = [ ]
|
||||
|
||||
init -1180 python hide:
|
||||
|
||||
def dump_styles():
|
||||
@@ -352,6 +353,11 @@ init -1180 python hide:
|
||||
|
||||
# Prediction of screens.
|
||||
def predict():
|
||||
|
||||
for s in _predict_screens:
|
||||
if renpy.has_screen(s):
|
||||
renpy.predict_screen(s)
|
||||
|
||||
s = _game_menu_screen
|
||||
|
||||
if s is None:
|
||||
@@ -367,6 +373,7 @@ init -1180 python hide:
|
||||
renpy.predict_screen(s)
|
||||
return
|
||||
|
||||
|
||||
config.predict_callbacks.append(predict)
|
||||
|
||||
def imagemap_auto_function(auto_param, variant):
|
||||
@@ -782,7 +789,9 @@ label _start:
|
||||
$ renpy.block_rollback()
|
||||
|
||||
$ _old_game_menu_screen = _game_menu_screen
|
||||
$ _old_predict_screens = _predict_screens
|
||||
$ _game_menu_screen = None
|
||||
$ _predict_screens = [ 'main_menu' ]
|
||||
|
||||
if renpy.has_label("splashscreen") and not _restart:
|
||||
call expression "splashscreen" from _call_splashscreen_1
|
||||
|
||||
+28
-2
@@ -989,6 +989,9 @@ init -1140 python:
|
||||
If true, then this file will be marked as the newest save
|
||||
file when it's saved. (Set this to false for a quicksave,
|
||||
for example.)
|
||||
|
||||
`page`
|
||||
The name of the page that it will be saved to.
|
||||
"""
|
||||
|
||||
def __init__(self, name, confirm=True, newest=True, page=None):
|
||||
@@ -1025,6 +1028,9 @@ init -1140 python:
|
||||
return True
|
||||
|
||||
def get_selected(self):
|
||||
if not self.confirm:
|
||||
return False
|
||||
|
||||
return persistent._file_newest == __filename(self.name, self.page)
|
||||
|
||||
class FileLoad(Action):
|
||||
@@ -1060,6 +1066,9 @@ init -1140 python:
|
||||
return renpy.scan_saved_game(__filename(self.name, self.page))
|
||||
|
||||
def get_selected(self):
|
||||
if not self.confirm:
|
||||
return False
|
||||
|
||||
return persistent._file_newest == __filename(self.name, self.page)
|
||||
|
||||
class FileDelete(Action):
|
||||
@@ -1132,7 +1141,7 @@ init -1140 python:
|
||||
def get_sensitive(self):
|
||||
if self.page == "auto" and not config.has_autosave:
|
||||
return False
|
||||
elif self.page == "quicksave" and not config.has_quicksave:
|
||||
elif self.page == "quick" and not config.has_quicksave:
|
||||
return False
|
||||
else:
|
||||
return True
|
||||
@@ -1140,7 +1149,24 @@ init -1140 python:
|
||||
def get_selected(self):
|
||||
return self.page == persistent._file_page
|
||||
|
||||
|
||||
def FilePageName(auto="a", quick="q"):
|
||||
"""
|
||||
:doc: file_action_function
|
||||
|
||||
Returns the name of the current file page, as a string. If a normal
|
||||
page, this returns the page number. Otherwise, it returns
|
||||
`auto` or `quick`.
|
||||
"""
|
||||
|
||||
page = persistent._file_page
|
||||
|
||||
if page == "quick":
|
||||
return quick
|
||||
elif page == "auto":
|
||||
return auto
|
||||
else:
|
||||
return page
|
||||
|
||||
class FilePageNext(Action):
|
||||
"""
|
||||
:doc: file_action
|
||||
|
||||
+1
-1
@@ -29,7 +29,7 @@ import os
|
||||
# ***** ***** ***** ***** ***** ***** **** ***** ***** ***** *****
|
||||
# Be sure to change script_version in launcher/script_version.rpy, too!
|
||||
# Be sure to change _renpy.pyx and module.py, if necessary.
|
||||
version = "Ren'Py 6.12.0c"
|
||||
version = "Ren'Py 6.12.0d"
|
||||
|
||||
|
||||
# Other versions.
|
||||
|
||||
+7
-3
@@ -154,7 +154,7 @@ class Cache(object):
|
||||
# image. It also takes care of updating the age of images in the
|
||||
# cache to be current, and maintaining the size of the current
|
||||
# generation of images.
|
||||
def get(self, image):
|
||||
def get(self, image, predict=False):
|
||||
|
||||
if not isinstance(image, ImageBase):
|
||||
raise Exception("Expected an image of some sort, but got" + str(image) + ".")
|
||||
@@ -201,8 +201,12 @@ class Cache(object):
|
||||
renpy.display.render.mutated_surface(ce.surf)
|
||||
|
||||
if renpy.config.debug_image_cache:
|
||||
renpy.log.debug("IC Added %r (%.02f%%)", ce.what, 100.0 * self.total_cache_size / self.cache_limit)
|
||||
|
||||
if predict:
|
||||
renpy.log.debug("IC Added %r (%.02f%%)", ce.what, 100.0 * self.total_cache_size / self.cache_limit)
|
||||
else:
|
||||
renpy.log.debug("IC Total Miss %r", ce.what)
|
||||
|
||||
renpy.display.draw.load_texture(ce.surf)
|
||||
|
||||
self.lock.release()
|
||||
@@ -317,7 +321,7 @@ class Cache(object):
|
||||
|
||||
if image not in self.preload_blacklist:
|
||||
try:
|
||||
self.get(image)
|
||||
self.get(image, True)
|
||||
except:
|
||||
self.preload_blacklist.add(image)
|
||||
|
||||
|
||||
@@ -589,7 +589,9 @@ def SnowBlossom(d,
|
||||
as long as the second number in a tuple is larger than the first.
|
||||
|
||||
`start`
|
||||
The delay, in seconds, to start each particle.
|
||||
The delay, in seconds, before each particle is added. This can be
|
||||
allows the particles to start at the top of the screen, while not
|
||||
looking like a "wave" effect.
|
||||
|
||||
`fast`
|
||||
If true, particles start in the center of the screen, rather than
|
||||
|
||||
+1
-1
@@ -162,7 +162,7 @@ class Preferences(renpy.object.Object):
|
||||
self.volumes[mixer] = volume
|
||||
|
||||
def get_volume(self, mixer):
|
||||
return self.volumes[mixer]
|
||||
return self.volumes.get(mixer, 0)
|
||||
|
||||
def set_mute(self, mixer, mute):
|
||||
self.mute[mixer] = mute
|
||||
|
||||
+2
-2
@@ -309,7 +309,7 @@ autosave_counter = 0
|
||||
def autosave_thread(take_screenshot):
|
||||
|
||||
global autosave_counter
|
||||
|
||||
|
||||
renpy.display.core.cpu_idle.wait()
|
||||
cycle_saves("auto-", renpy.config.autosave_slots)
|
||||
|
||||
@@ -318,7 +318,7 @@ def autosave_thread(take_screenshot):
|
||||
extra_info = renpy.config.auto_save_extra_info()
|
||||
else:
|
||||
extra_info = ""
|
||||
|
||||
|
||||
try:
|
||||
try:
|
||||
if take_screenshot:
|
||||
|
||||
+1
-1
@@ -404,7 +404,7 @@ class StyleManager(object):
|
||||
|
||||
rest = name
|
||||
|
||||
while "_" in name:
|
||||
while "_" in rest:
|
||||
first, rest = rest.split("_", 1)
|
||||
if rest in style_map:
|
||||
s = Style(rest)
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
.. Automatically generated file - do not modify.
|
||||
|
||||
.. class:: Drag(d=None, drag_name=None, draggable=True, droppable=True, drag_raise=True, dragged=None, dropped=None, drag_handle=(0.0, 0.0, 1.0, 1.0), drag_joined=<function default_drag_joined at 0x1b922a8>, clicked=None, hovered=None, unhovered=None, replaces=None, **properties)
|
||||
.. class:: Drag(d=None, drag_name=None, draggable=True, droppable=True, drag_raise=True, dragged=None, dropped=None, drag_handle=(0.0, 0.0, 1.0, 1.0), drag_joined=<function default_drag_joined at 0x22fb2a8>, clicked=None, hovered=None, unhovered=None, replaces=None, **properties)
|
||||
|
||||
A displayable that represents an object that can be dragged around
|
||||
its enclosing area. A Drag can also represent an area that
|
||||
|
||||
@@ -50,6 +50,9 @@
|
||||
If true, then this file will be marked as the newest save
|
||||
file when it's saved. (Set this to false for a quicksave,
|
||||
for example.)
|
||||
|
||||
`page`
|
||||
The name of the page that it will be saved to.
|
||||
|
||||
.. function:: FileTakeScreenshot()
|
||||
|
||||
|
||||
@@ -5,6 +5,12 @@
|
||||
This is a function that returns true
|
||||
if the file is loadable, and false otherwise.
|
||||
|
||||
.. function:: FilePageName(auto='a', quick='q')
|
||||
|
||||
Returns the name of the current file page, as a string. If a normal
|
||||
page, this returns the page number. Otherwise, it returns
|
||||
`auto` or `quick`.
|
||||
|
||||
.. function:: FileSaveName(name, empty='', page=None)
|
||||
|
||||
Return the save_name that was in effect when the file was saved,
|
||||
|
||||
@@ -22,7 +22,9 @@
|
||||
as long as the second number in a tuple is larger than the first.
|
||||
|
||||
`start`
|
||||
The delay, in seconds, to start each particle.
|
||||
The delay, in seconds, before each particle is added. This can be
|
||||
allows the particles to start at the top of the screen, while not
|
||||
looking like a "wave" effect.
|
||||
|
||||
`fast`
|
||||
If true, particles start in the center of the screen, rather than
|
||||
|
||||
@@ -93,23 +93,24 @@ with the menu statement. It is given the following parameter:
|
||||
|
||||
screen choice:
|
||||
|
||||
window:
|
||||
id "window"
|
||||
window:
|
||||
style "menu_window"
|
||||
|
||||
vbox:
|
||||
id "menu"
|
||||
style "menu"
|
||||
|
||||
for caption, action, button_id, caption_id in items:
|
||||
for caption, action, chosen in items:
|
||||
|
||||
if action:
|
||||
|
||||
if action:
|
||||
button:
|
||||
action action
|
||||
id button_id
|
||||
style "menu_choice_button"
|
||||
|
||||
text caption id caption_id
|
||||
text caption style "menu_choice"
|
||||
|
||||
else:
|
||||
text caption id caption_id
|
||||
text caption style "menu_caption"
|
||||
|
||||
|
||||
Input
|
||||
|
||||
+39
-33
@@ -65,9 +65,12 @@ screen choice:
|
||||
|
||||
window:
|
||||
style "menu_window"
|
||||
|
||||
xalign 0.5
|
||||
yalign 0.5
|
||||
|
||||
vbox:
|
||||
style "menu"
|
||||
spacing 2
|
||||
|
||||
for caption, action, chosen in items:
|
||||
|
||||
@@ -82,13 +85,10 @@ screen choice:
|
||||
else:
|
||||
text caption style "menu_caption"
|
||||
|
||||
init python:
|
||||
init -2 python:
|
||||
config.narrator_menu = True
|
||||
|
||||
style.menu.box_spacing = 2
|
||||
style.menu_window.set_parent(style.default)
|
||||
style.menu_window.xalign = 0.5
|
||||
style.menu_window.yalign = 0.5
|
||||
style.menu_choice.set_parent(style.button_text)
|
||||
style.menu_choice.clear()
|
||||
style.menu_choice_button.set_parent(style.button)
|
||||
@@ -189,7 +189,7 @@ screen main_menu:
|
||||
textbutton _("Help") action Help()
|
||||
textbutton _("Quit") action Quit(confirm=False)
|
||||
|
||||
init python:
|
||||
init -2 python:
|
||||
|
||||
# Make all the main menu buttons be the same size.
|
||||
style.mm_button.size_group = "mm"
|
||||
@@ -210,7 +210,9 @@ screen navigation:
|
||||
# The various buttons.
|
||||
frame:
|
||||
style_group "gm_nav"
|
||||
|
||||
xalign .98
|
||||
yalign .98
|
||||
|
||||
has vbox
|
||||
|
||||
textbutton _("Return") action Return()
|
||||
@@ -221,10 +223,8 @@ screen navigation:
|
||||
textbutton _("Help") action Help()
|
||||
textbutton _("Quit") action Quit()
|
||||
|
||||
init python:
|
||||
init -2 python:
|
||||
style.gm_nav_button.size_group = "gm_nav"
|
||||
style.gm_nav_frame.xalign = .98
|
||||
style.gm_nav_frame.yalign = .98
|
||||
|
||||
|
||||
##############################################################################
|
||||
@@ -283,7 +283,12 @@ screen file_picker:
|
||||
add FileScreenshot(i)
|
||||
|
||||
# Format the description, and add it as text.
|
||||
$ description = "% 2d. %s\n%s" % (i, FileTime(i, empty=_("Empty Slot.")), FileSaveName(i))
|
||||
$ description = "%s-%d. %s\n%s" % (
|
||||
FilePageName(),
|
||||
i,
|
||||
FileTime(i, empty=_("Empty Slot.")),
|
||||
FileSaveName(i))
|
||||
|
||||
text description
|
||||
|
||||
key "save_delete" action FileDelete(i)
|
||||
@@ -305,7 +310,7 @@ screen load:
|
||||
use navigation
|
||||
use file_picker
|
||||
|
||||
init python:
|
||||
init -2 python:
|
||||
style.file_picker_frame = Style(style.menu_frame)
|
||||
|
||||
style.file_picker_nav_button = Style(style.small_button)
|
||||
@@ -427,15 +432,19 @@ screen preferences:
|
||||
action Play("voice", config.sample_voice)
|
||||
style "soundtest_button"
|
||||
|
||||
init python:
|
||||
init -2 python:
|
||||
style.pref_frame.xfill = True
|
||||
style.pref_frame.xmargin = 5
|
||||
style.pref_frame.top_margin = 5
|
||||
|
||||
style.pref_vbox.xfill = True
|
||||
|
||||
style.pref_button.size_group = "pref"
|
||||
style.pref_button.xalign = 1.0
|
||||
|
||||
style.pref_slider.xmaximum = 192
|
||||
style.pref_slider.xalign = 1.0
|
||||
|
||||
style.soundtest_button.xalign = 1.0
|
||||
|
||||
|
||||
@@ -455,31 +464,28 @@ screen yesno_prompt:
|
||||
frame:
|
||||
style_group "yesno"
|
||||
|
||||
has vbox
|
||||
|
||||
label _(message)
|
||||
xfill True
|
||||
xmargin .05
|
||||
ypos .1
|
||||
yanchor 0
|
||||
ypadding .05
|
||||
|
||||
has vbox:
|
||||
xalign .5
|
||||
yalign .5
|
||||
spacing 30
|
||||
|
||||
label _(message):
|
||||
xalign 0.5
|
||||
|
||||
hbox:
|
||||
xalign 0.5
|
||||
spacing 100
|
||||
|
||||
textbutton _("Yes") action yes_action
|
||||
textbutton _("No") action no_action
|
||||
|
||||
|
||||
init python:
|
||||
|
||||
style.yesno_frame.xfill = True
|
||||
style.yesno_frame.xmargin = .05
|
||||
style.yesno_frame.ypos = .1
|
||||
style.yesno_frame.yanchor = 0
|
||||
style.yesno_frame.ypadding = .05
|
||||
|
||||
style.yesno_vbox.xalign = 0.5
|
||||
style.yesno_vbox.yalign = 0.5
|
||||
style.yesno_vbox.box_spacing = 30
|
||||
|
||||
style.yesno_hbox.xalign = 0.5
|
||||
style.yesno_hbox.spacing = 100
|
||||
|
||||
init -2 python:
|
||||
style.yesno_button.size_group = "yesno"
|
||||
|
||||
style.yesno_label.xalign = 0.5
|
||||
style.yesno_label_text.text_align = 0.5
|
||||
|
||||
+39
-33
@@ -65,9 +65,12 @@ screen choice:
|
||||
|
||||
window:
|
||||
style "menu_window"
|
||||
|
||||
xalign 0.5
|
||||
yalign 0.5
|
||||
|
||||
vbox:
|
||||
style "menu"
|
||||
spacing 2
|
||||
|
||||
for caption, action, chosen in items:
|
||||
|
||||
@@ -82,13 +85,10 @@ screen choice:
|
||||
else:
|
||||
text caption style "menu_caption"
|
||||
|
||||
init python:
|
||||
init -2 python:
|
||||
config.narrator_menu = True
|
||||
|
||||
style.menu.box_spacing = 2
|
||||
style.menu_window.set_parent(style.default)
|
||||
style.menu_window.xalign = 0.5
|
||||
style.menu_window.yalign = 0.5
|
||||
style.menu_choice.set_parent(style.button_text)
|
||||
style.menu_choice.clear()
|
||||
style.menu_choice_button.set_parent(style.button)
|
||||
@@ -189,7 +189,7 @@ screen main_menu:
|
||||
textbutton _("Help") action Help()
|
||||
textbutton _("Quit") action Quit(confirm=False)
|
||||
|
||||
init python:
|
||||
init -2 python:
|
||||
|
||||
# Make all the main menu buttons be the same size.
|
||||
style.mm_button.size_group = "mm"
|
||||
@@ -210,7 +210,9 @@ screen navigation:
|
||||
# The various buttons.
|
||||
frame:
|
||||
style_group "gm_nav"
|
||||
|
||||
xalign .98
|
||||
yalign .98
|
||||
|
||||
has vbox
|
||||
|
||||
textbutton _("Return") action Return()
|
||||
@@ -221,10 +223,8 @@ screen navigation:
|
||||
textbutton _("Help") action Help()
|
||||
textbutton _("Quit") action Quit()
|
||||
|
||||
init python:
|
||||
init -2 python:
|
||||
style.gm_nav_button.size_group = "gm_nav"
|
||||
style.gm_nav_frame.xalign = .98
|
||||
style.gm_nav_frame.yalign = .98
|
||||
|
||||
|
||||
##############################################################################
|
||||
@@ -283,7 +283,12 @@ screen file_picker:
|
||||
add FileScreenshot(i)
|
||||
|
||||
# Format the description, and add it as text.
|
||||
$ description = "% 2d. %s\n%s" % (i, FileTime(i, empty=_("Empty Slot.")), FileSaveName(i))
|
||||
$ description = "%s-%d. %s\n%s" % (
|
||||
FilePageName(),
|
||||
i,
|
||||
FileTime(i, empty=_("Empty Slot.")),
|
||||
FileSaveName(i))
|
||||
|
||||
text description
|
||||
|
||||
key "save_delete" action FileDelete(i)
|
||||
@@ -305,7 +310,7 @@ screen load:
|
||||
use navigation
|
||||
use file_picker
|
||||
|
||||
init python:
|
||||
init -2 python:
|
||||
style.file_picker_frame = Style(style.menu_frame)
|
||||
|
||||
style.file_picker_nav_button = Style(style.small_button)
|
||||
@@ -427,15 +432,19 @@ screen preferences:
|
||||
action Play("voice", config.sample_voice)
|
||||
style "soundtest_button"
|
||||
|
||||
init python:
|
||||
init -2 python:
|
||||
style.pref_frame.xfill = True
|
||||
style.pref_frame.xmargin = 5
|
||||
style.pref_frame.top_margin = 5
|
||||
|
||||
style.pref_vbox.xfill = True
|
||||
|
||||
style.pref_button.size_group = "pref"
|
||||
style.pref_button.xalign = 1.0
|
||||
|
||||
style.pref_slider.xmaximum = 192
|
||||
style.pref_slider.xalign = 1.0
|
||||
|
||||
style.soundtest_button.xalign = 1.0
|
||||
|
||||
|
||||
@@ -455,31 +464,28 @@ screen yesno_prompt:
|
||||
frame:
|
||||
style_group "yesno"
|
||||
|
||||
has vbox
|
||||
|
||||
label _(message)
|
||||
xfill True
|
||||
xmargin .05
|
||||
ypos .1
|
||||
yanchor 0
|
||||
ypadding .05
|
||||
|
||||
has vbox:
|
||||
xalign .5
|
||||
yalign .5
|
||||
spacing 30
|
||||
|
||||
label _(message):
|
||||
xalign 0.5
|
||||
|
||||
hbox:
|
||||
xalign 0.5
|
||||
spacing 100
|
||||
|
||||
textbutton _("Yes") action yes_action
|
||||
textbutton _("No") action no_action
|
||||
|
||||
|
||||
init python:
|
||||
|
||||
style.yesno_frame.xfill = True
|
||||
style.yesno_frame.xmargin = .05
|
||||
style.yesno_frame.ypos = .1
|
||||
style.yesno_frame.yanchor = 0
|
||||
style.yesno_frame.ypadding = .05
|
||||
|
||||
style.yesno_vbox.xalign = 0.5
|
||||
style.yesno_vbox.yalign = 0.5
|
||||
style.yesno_vbox.box_spacing = 30
|
||||
|
||||
style.yesno_hbox.xalign = 0.5
|
||||
style.yesno_hbox.spacing = 100
|
||||
|
||||
init -2 python:
|
||||
style.yesno_button.size_group = "yesno"
|
||||
|
||||
style.yesno_label.xalign = 0.5
|
||||
style.yesno_label_text.text_align = 0.5
|
||||
|
||||
Reference in New Issue
Block a user