Compare commits

...

45 Commits

Author SHA1 Message Date
Tom Rothamel c0f4395a53 Bump version. 2014-02-21 21:56:44 -05:00
Tom Rothamel fd6f59e39a Fix typos. 2014-02-20 23:41:12 -05:00
Tom Rothamel de69ac7843 Update changelog. 2014-02-19 02:02:25 -05:00
Tom Rothamel a6174993d1 Merge pull request #297 from renpy/fix-doc
fix doc error ("width" -> "height" in ysize description)
2014-02-18 22:58:46 -05:00
Koichi Akabe d263552a79 fix doc error ("width" -> "height" in ysize description) 2014-02-18 17:15:41 +09:00
Tom Rothamel e67f671fe6 Fsdecode tail output.
This is stdout for the android tools, which is likely to be encoded
using the local encoding, at least when filenames are involved.
2014-02-17 21:29:58 -05:00
Tom Rothamel bee097f3cd Document store variables. 2014-02-16 16:06:53 -05:00
Tom Rothamel 61c2fc4e49 Revert "Return to the main menu on right click from load, save, prefs, etc."
This reverts commit 5bff9be02c.
2014-02-15 22:38:55 -05:00
Tom Rothamel 6f7398e4ae Improve prediction of side images. 2014-02-15 01:11:22 -05:00
Tom Rothamel 5f1e49978b Properly update the prediction info.
This lets us predict more than one image.
2014-02-15 00:22:59 -05:00
Tom Rothamel 564a82c187 Do not call missing_show during image prediction. 2014-02-14 23:41:00 -05:00
Tom Rothamel ea2243ea86 Predict partial image specifications.
Fixes #293.
2014-02-14 00:49:59 -05:00
Tom Rothamel 4be828ede3 A character should only stop skipping if it causes an interaction.
Fixes #294.
2014-02-13 23:08:10 -05:00
Tom Rothamel 88e14a14d8 Pass the results of a UserStatement predict to the predicition code.
Fixes #292.
2014-02-12 21:52:22 -05:00
Tom Rothamel b583d53f61 Document window auto. 2014-02-11 19:14:27 -05:00
Tom Rothamel fa79703f09 Implement window auto. 2014-02-10 23:29:21 -05:00
Tom Rothamel e122d22ef8 Add config.statement_callbacks.
These are functions that are called at the start of each statement,
with the statement name.
2014-02-10 23:24:56 -05:00
Tom Rothamel 34c070d37b Factor the window statements out into their own file, and
move the guts of _window_show and _window_hide into
functions.
2014-02-10 20:14:37 -05:00
Tom Rothamel b9c5f2f988 Rename window_during_transitions to show_empty_window.
We were already using window_during_transitions for an obsolete
function, and the preference controls all versions of this, rather
than just during transitions.
2014-02-09 21:21:31 -05:00
Tom Rothamel adb4ab80db Merge pull request #290 from vbkaisetsu/template-ja-translation
update Japanese translation of template
2014-02-09 11:12:02 -05:00
Tom Rothamel b55e36853e Update and fix documentation. 2014-02-08 18:21:10 -05:00
Koichi Akabe 46c547a9b0 update Japanese translation of template 2014-02-08 16:43:21 +09:00
Tom Rothamel 6c753a4a09 Remove window auto, adjust semantics of window during transitions.
This is separating the two functions out, since window during
transitions is useful with window show/window hide, and the
auto function should probably trigger window show/window hide.
2014-02-08 00:08:52 -05:00
kyouryuukunn 88417761ee Add Preference window during transitions 2014-02-07 23:31:08 -05:00
Tom Rothamel 5bff9be02c Return to the main menu on right click from load, save, prefs, etc.
Alternative implementation of #289.
2014-02-06 23:31:21 -05:00
Tom Rothamel de4c50bb2a Update changelog. 2014-02-05 22:16:20 -05:00
Tom Rothamel 5895fbcced The focus_mask style property can now as an argument a callable.
If the callable returns true, the displayable should be focused.
This lets us avoid an RTT.
2014-02-05 22:12:33 -05:00
Tom Rothamel 5fc7f32b5a Add new keywords to screenlang and sphinx. 2014-02-05 22:09:34 -05:00
Tom Rothamel a30500d665 Fix spanish translation. 2014-02-05 06:08:26 -05:00
Tom Rothamel 9cd9e126a2 Merge pull request #287 from javimat/master
Update Spanish translation
2014-02-04 16:56:18 -08:00
Tom Rothamel 6d7da4f882 Report an error if an imagebutton can't find its idle image. 2014-02-04 19:53:46 -05:00
Tom Rothamel bffa96a344 Use the unexpanded size of text when checking for overflows.
Fixes #286.
2014-02-03 19:49:51 -05:00
javimat 393df20e44 Update common.rpy 2014-02-03 10:09:03 +01:00
javimat 6acf2605bb Update common.rpy 2014-02-03 10:06:42 +01:00
javimat bd1524c362 Update common.rpy 2014-02-03 09:57:58 +01:00
javimat d9db6cc96a Update project.rpy 2014-02-03 09:49:55 +01:00
javimat 1f004edc6a Update distribute.rpy 2014-02-03 09:49:25 +01:00
javimat d6b9ea81de Update common.rpy 2014-02-03 09:48:55 +01:00
javimat d869f67126 Update common.rpy 2014-02-03 09:48:13 +01:00
javimat 92630baa6e Update options.rpy 2014-02-03 09:46:06 +01:00
Tom Rothamel e8adc17543 Make the fonts used by A White Tulip customizable. 2014-02-02 15:11:09 -05:00
Tom Rothamel d72a03aeb4 Add xsize, ysize, and xysize style properties.
These allow users to directly set the size of resizable
displayables.

The names are chosen so they don't conflict with height, width, and
size, which are already in use.
2014-02-01 17:33:26 -05:00
Tom Rothamel f5e75a7c4c Set the default template to english.
This fixes a bug that occurs when no template is selected.
2014-01-31 16:50:33 -05:00
Tom Rothamel 2aa92d02d3 Backup launcher styles (in Russian translation). 2014-01-31 16:37:36 -05:00
Tom Rothamel b04e511767 Fix location of logo. 2014-01-31 16:33:47 -05:00
48 changed files with 873 additions and 153 deletions
+1 -1
View File
@@ -32,7 +32,7 @@ screen about:
has vbox xfill True
add "logo.png" xalign 0.5 yoffset -5
add "images/logo.png" xalign 0.5 yoffset -5
null height 15
+1 -1
View File
@@ -27,7 +27,7 @@ init python:
screen select_template:
default result = project.manager.get("template")
default result = project.manager.get("english")
frame:
style_group "l"
+6
View File
@@ -34,6 +34,12 @@ init python:
try:
with open(self.filename) as f:
text = f.read()
try:
text = renpy.fsdecode(text)
except:
text = text.decode("latin-1")
text = text.strip()
text = text.split("\n")
+5
View File
@@ -572,6 +572,11 @@ init python in theme_data:
## should take up the full height and width of the screen.
gm_root = "%(gm_root)s",
## The fonts used by this theme. The default fonts may not be
## suitable for non-English languages.
regular_font = "_theme_awt/Quicksand-Regular.ttf",
bold_font = "_theme_awt/Quicksand-Bold.ttf",
## And we're done with the theme. The theme will customize
## various styles, so if we want to change them, we should
## do so below.
+8
View File
@@ -105,3 +105,11 @@ translate japanese strings:
old "A 32-bit Java Development Kit is required to build Android packages on Windows. The JDK is different from the JRE, so it's possible you have Java without having the JDK.\n\nPlease {a=http://www.oracle.com/technetwork/java/javase/downloads/index.html}download and install the JDK{/a}, then restart the Ren'Py launcher."
new "Windowsでは、Androidパッケージのビルドに32-bitのJava開発キットが必要です。JDKはJREとは異なるため、JDKが無くてもJavaが利用できます。\n\n{a=http://www.oracle.com/technetwork/java/javase/downloads/index.html}JDKのダウンロードとインストール{/a}を行い、Ren'Pyランチャーを再起動して下さい。"
# game/android.rpy:30
old "To build Android packages, please download RAPT, unzip it, and place it into the Ren'Py directory. Then restart the Ren'Py launcher."
new "Androidパッケージをビルドするには、RAPTをダウンロード・展開し、Ren'Pyのディレクトリーに設置して下さい。その後、Ren'Pyを再起動して下さい。"
# game/android.rpy:504
old "Before packaging Android apps, you'll need to download RAPT, the Ren'Py Android Packaging Tool. Would you like to download RAPT now?"
new "Androidアプリをパッケージングする前に、RAPT(Ren'Py Android Packaging Tool)をダウンロードする必要があります。今すぐダウンロードしますか?"
+3
View File
@@ -37,3 +37,6 @@ translate japanese strings:
old "No packages are selected, so there's nothing to do."
new "パッケージが選択されていないため、何もすることがありません。"
# game/distribute.rpy:335
old "Building distributions failed:\n\nThe build.directory_name variable may not include the space, colon, or semicolon characters."
new "配布物のビルドに失敗しました:\n\nbuild.directory_name 変数にスペース、コロン、セミコロンを含めてはいけません。"
+28
View File
@@ -25,3 +25,31 @@ translate japanese strings:
old "Ren'Py has set the projects directory to:"
new "Ren'Py は以下にプロジェクトディレクトリーを設定します:"
# game/project.rpy:48
old "After making changes to the script, press shift+R to reload your game."
new "スクリプトに変更を加えた後、Shift+Rを押すとゲームをリロードします。"
# game/project.rpy:49
old "Press shift+O (the letter) to access the console."
new "Shift+O(英字)を押すとコンソールを表示します。"
# game/project.rpy:50
old "Press shift+D to access the developer menu."
new "Shift+Dを押すと開発者メニューを表示します。"
# game/project.rpy:219
old "Launching the project failed."
new "プロジェクトの起動に失敗しました。"
# game/project.rpy:219
old "Please ensure that your project launches normally before running this command."
new "このコマンドを実行する前に、プロジェクトが通常通り起動することを確認して下さい。"
# game/project.rpy:515
old "Launching"
new "起動中"
# game/project.rpy:584
old "Ren'Py was unable to run python with tkinter to choose the projects directory. Please install the python-tk or tkinter package."
new "Ren'Pyはプロジェクトディレクトリー選択のためのtkinterをPythonの実行時に読み込めませんでした。python-tkもしくはtkinterパッケージをインストールして下さい。"
+8
View File
@@ -85,3 +85,11 @@ translate japanese strings:
old "Proceed"
new "続行"
# game/updater.rpy:129
old "Nightly"
new "Nightly"
# game/updater.rpy:135
old "The bleeding edge of Ren'Py development. This may have the latest features, or might not run at all."
new "Ren'Pyの開発版で、極めて不安定です。これには最新の機能が含まれていますが、すべては動かないかもしれません。"
+3
View File
@@ -0,0 +1,3 @@
translate russian python:
make_style_backup()
+21 -2
View File
@@ -1,4 +1,4 @@
#translation: renpy/common/00action_file.rpy
#translation: renpy/common/00action_file.rpy
translate spanish strings:
# renpy/common/00action_file.rpy:124
@@ -7,7 +7,7 @@ translate spanish strings:
# renpy/common/00action_file.rpy:587
old "Quick save complete."
new "Guardado rapido completado"
new "Guardado rápido completado"
#translation: renpy/common/00gallery.rpy
@@ -401,3 +401,22 @@ translate spanish strings:
old "Rectangle: %r"
new "Rectángulo: %r"
# renpy/common/_developer/developer.rpym:69
old "Console (Shift+O)"
new "Consola (Mayús.+O)"
# renpy/common/_developer/developer.rpym:81
old "Show Image Load Log"
new "Muestra registro de carga de imagen"
# renpy/common/_developer/developer.rpym:84
old "Hide Image Load Log"
new "Oculta registro de carga de imagen"
# renpy/common/_developer/developer.rpym:149
old "No variables have changed since the game started."
new "Ninguna variable ha cambiado desde el inicio del juego."
# renpy/common/_developer/developer.rpym:152
old "Return to the developer menu"
new "Volver al menú de desarrollo"
+5 -1
View File
@@ -1,4 +1,4 @@
translate spanish strings:
translate spanish strings:
# game/distribute.rpy:358
old "No packages are selected, so there's nothing to do."
@@ -31,3 +31,7 @@
# game/distribute.rpy:910
old "Processed {b}[complete]{/b} of {b}[total]{/b} files."
new "Procesados {b}[complete]{/b} de {b}[total]{/b} archivos."
# game/distribute.rpy:335
old "Building distributions failed:\n\nThe build.directory_name variable may not include the space, colon, or semicolon characters."
new "Ha fallado la construcción de distribuciones:\n\nLa variable build.directory_name no puede incluir espacios, dos puntos ni punto y coma."
+6 -1
View File
@@ -1,4 +1,4 @@
translate spanish strings:
translate spanish strings:
# game/project.rpy:201
old "Launching the project failed."
@@ -47,3 +47,8 @@
# game/project.rpy:496
old "Launching"
new "Ejecutando"
# game/project.rpy:584
old "Ren'Py was unable to run python with tkinter to choose the projects directory. Please install the python-tk or tkinter package."
new "Ren'Py no puede ejecutar python con tkinter para escoger el directorio de proyectos. Por favor, installa el paquete python-tk o tkinter."
+17
View File
@@ -287,6 +287,23 @@ synthetic_properties = sorted_dict(
('yminimum', 'index_1'),
],
xsize = [
('xminimum', None),
('xmaximum', None),
],
ysize = [
('yminimum', None),
('ymaximum', None),
],
xysize = [
('xminimum', 'index_0'),
('xmaximum', 'index_0'),
('yminimum', 'index_1'),
('ymaximum', 'index_1'),
],
area = [
('xpos', 'index_0'),
('ypos', 'index_1'),
+1 -1
View File
@@ -32,7 +32,7 @@ except ImportError:
vc_version = 0
# The tuple giving the version number.
version_tuple = (6, 17, 0, vc_version)
version_tuple = (6, 18, 0, vc_version)
# The name of this version.
version_name = "In This Decade..."
+79 -25
View File
@@ -32,6 +32,14 @@ import re
import time
import md5
def statement_name(name):
"""
Reports the name of this statement to systems like window auto.
"""
for i in renpy.config.statement_callbacks:
i(name)
def next_node(n):
"""
Indicates the next node that should be executed. When a statement
@@ -419,6 +427,7 @@ class Say(Node):
def execute(self):
next_node(self.next)
statement_name("say")
try:
@@ -541,6 +550,7 @@ class Init(Node):
def execute(self):
next_node(self.next)
statement_name("init")
def restructure(self, callback):
callback(self.block)
@@ -662,6 +672,7 @@ class Label(Node):
def execute(self):
next_node(self.next)
statement_name("label")
renpy.game.context().mark_seen()
@@ -715,6 +726,7 @@ class Python(Node):
def execute(self):
next_node(self.next)
statement_name("python")
try:
renpy.python.py_exec_bytecode(self.code.bytecode, self.hide, store=self.store)
@@ -760,6 +772,7 @@ class EarlyPython(Node):
def execute(self):
next_node(self.next)
statement_name("python early")
def early_execute(self):
renpy.python.create_store(self.store)
@@ -803,6 +816,7 @@ class Image(Node):
# accessing self.atl, as self.atl may not always exist.
next_node(self.next)
statement_name("image")
if self.code is not None:
img = renpy.python.py_eval_bytecode(self.code.bytecode)
@@ -843,6 +857,7 @@ class Transform(Node):
def execute(self):
next_node(self.next)
statement_name("transform")
parameters = getattr(self, "parameters", None)
@@ -861,14 +876,15 @@ def predict_imspec(imspec, scene=False, atl=None):
"""
if len(imspec) == 7:
name, expression, tag, _at_list, layer, _zorder, _behind = imspec
name, expression, tag, at_expr_list, layer, _zorder, _behind = imspec
elif len(imspec) == 6:
name, expression, tag, _at_list, layer, _zorder = imspec
name, expression, tag, at_expr_list, layer, _zorder = imspec
elif len(imspec) == 3:
name, _at_list, layer = imspec
name, at_expr_list, layer = imspec
tag = None
expression = None
if expression:
try:
@@ -876,30 +892,27 @@ def predict_imspec(imspec, scene=False, atl=None):
img = renpy.easy.displayable(img)
except:
return
else:
img = renpy.display.image.images.get(name, None)
if img is None:
return
img = None
full_name = name
if tag:
full_name = (tag,) + full_name[1:]
at_list = [ ]
for i in at_expr_list:
try:
at_list.append(renpy.python.py_eval(i))
except:
pass
if atl is not None:
try:
at_list.append(renpy.display.motion.ATLTransform(atl))
except:
pass
if scene:
renpy.game.context().images.predict_scene(layer)
renpy.game.context().images.predict_show(tag or name, layer)
if atl is not None:
try:
img = renpy.display.motion.ATLTransform(atl, child=img)
except:
import traceback
traceback.print_exc()
renpy.display.predict.displayable(img)
renpy.exports.predict_show(name, layer, what=img, tag=tag)
def show_imspec(imspec, atl=None):
@@ -961,6 +974,7 @@ class Show(Node):
def execute(self):
next_node(self.next)
statement_name("show")
show_imspec(self.imspec, atl=getattr(self, "atl", None))
@@ -988,6 +1002,8 @@ class ShowLayer(Node):
return (ShowLayer, self.layer)
def execute(self):
next_node(self.next)
statement_name("show layer")
at_list = [ renpy.python.py_eval(i) for i in self.at_list ]
@@ -996,7 +1012,6 @@ class ShowLayer(Node):
at_list.append(atl)
renpy.exports.layer_at_list(at_list, layer=self.layer)
next_node(self.next)
def predict(self):
return [ self.next ]
@@ -1035,6 +1050,7 @@ class Scene(Node):
def execute(self):
next_node(self.next)
statement_name("scene")
renpy.config.scene(self.layer)
@@ -1094,6 +1110,7 @@ class Hide(Node):
def execute(self):
next_node(self.next)
statement_name("hide")
if len(self.imspec) == 3:
name, _at_list, layer = self.imspec
@@ -1134,6 +1151,7 @@ class With(Node):
def execute(self):
next_node(self.next)
statement_name("with")
trans = renpy.python.py_eval(self.expr)
@@ -1183,6 +1201,8 @@ class Call(Node):
def execute(self):
statement_name("call")
label = self.label
if self.expression:
label = renpy.python.py_eval(label)
@@ -1256,6 +1276,8 @@ class Return(Node):
def execute(self):
statement_name("return")
if self.expression:
renpy.store._return = renpy.python.py_eval(self.expression)
else:
@@ -1317,6 +1339,7 @@ class Menu(Node):
def execute(self):
next_node(self.next)
statement_name("menu")
choices = [ ]
narration = [ ]
@@ -1402,6 +1425,8 @@ class Jump(Node):
def execute(self):
statement_name("jump")
target = self.target
if self.expression:
target = renpy.python.py_eval(target)
@@ -1438,6 +1463,7 @@ class Pass(Node):
def execute(self):
next_node(self.next)
statement_name("pass")
class While(Node):
@@ -1466,6 +1492,7 @@ class While(Node):
def execute(self):
next_node(self.next)
statement_name("while")
if renpy.python.py_eval(self.condition):
next_node(self.block[0])
@@ -1514,6 +1541,7 @@ class If(Node):
def execute(self):
next_node(self.next)
statement_name("if")
for condition, block in self.entries:
if renpy.python.py_eval(condition):
@@ -1562,11 +1590,17 @@ class UserStatement(Node):
def execute(self):
next_node(self.get_next())
statement_name(self.get_name())
self.call("execute")
def predict(self):
self.call("predict")
predictions = self.call("predict")
if predictions is not None:
for i in predictions:
renpy.easy.predict(i)
return [ self.get_next() ]
def call(self, method, *args, **kwargs):
@@ -1578,6 +1612,14 @@ class UserStatement(Node):
renpy.statements.call(method, parsed, *args, **kwargs)
def get_name(self):
parsed = self.parsed
if parsed is None:
parsed = renpy.statements.parse(self, self.line, self.block)
self.parsed = parsed
return renpy.statements.get_name(parsed)
def get_next(self):
rv = self.call("next")
if rv is not None:
@@ -1621,6 +1663,7 @@ class Define(Node):
def execute(self):
next_node(self.next)
statement_name("define")
value = renpy.python.py_eval_bytecode(self.code.bytecode)
renpy.dump.definitions.append((self.varname, self.filename, self.linenumber))
@@ -1650,6 +1693,8 @@ class Screen(Node):
def execute(self):
next_node(self.next)
statement_name("screen")
self.screen.define()
renpy.dump.screens.append((self.screen.name, self.filename, self.linenumber))
@@ -1694,11 +1739,14 @@ class Translate(Node):
def execute(self):
statement_name("translate")
if self.language is not None:
next_node(self.next)
raise Exception("Translation nodes cannot be run directly.")
next_node(renpy.game.script.translator.lookup_translate(self.identifier))
renpy.game.context().translate_identifier = self.identifier
def predict(self):
@@ -1731,6 +1779,8 @@ class EndTranslate(Node):
def execute(self):
next_node(self.next)
statement_name("end translate")
renpy.game.context().translate_identifier = None
@@ -1756,6 +1806,8 @@ class TranslateString(Node):
def execute(self):
next_node(self.next)
statement_name("translate string")
renpy.translation.add_string_translation(self.language, self.old, self.new)
class TranslatePython(Node):
@@ -1783,6 +1835,7 @@ class TranslatePython(Node):
def execute(self):
next_node(self.next)
statement_name("translate_python")
# def early_execute(self):
# renpy.python.create_store(self.store)
@@ -1833,13 +1886,14 @@ class Style(Node):
def execute(self):
next_node(self.next)
statement_name("style")
if self.variant is not None:
variant = renpy.python.py_eval(self.variant)
if not renpy.exports.variant(variant):
return
s = renpy.style.get_or_create_style(self.style_name)
s = renpy.style.get_or_create_style(self.style_name) # @UndefinedVariable
if self.clear:
s.clear()
+13 -8
View File
@@ -105,6 +105,16 @@ def predict_show_display_say(who, what, who_args, what_args, window_args, image=
list of images used by show_display_say.
"""
if side_image:
renpy.easy.predict(side_image)
if renpy.store._side_image_attributes:
renpy.easy.predict(renpy.display.image.ImageReference(("side",) + renpy.store._side_image_attributes))
if image:
if image != "<Dynamic>":
renpy.easy.predict(who)
if screen:
props = compute_widget_properties(who_args, what_args, window_args)
@@ -120,12 +130,6 @@ def predict_show_display_say(who, what, who_args, what_args, window_args, image=
return
if image:
if image != "<Dynamic>":
renpy.easy.predict(who)
if side_image:
renpy.easy.predict(side_image)
def compute_widget_properties(who_args, what_args, window_args, variant=None):
@@ -347,8 +351,9 @@ def display_say(
ctc_timedpause=None,
ctc_force=False):
if (not renpy.game.preferences.skip_unseen) and (not renpy.game.context().seen_current(True)) and renpy.config.skipping == "fast":
if interact and (not renpy.game.preferences.skip_unseen) and (not renpy.game.context().seen_current(True)) and renpy.config.skipping == "fast":
renpy.config.skipping = None
# If we're in fast skipping mode, don't bother with say
# statements at all.
if interact and renpy.config.skipping == "fast":
@@ -828,7 +833,7 @@ class ADVCharacter(object):
old_side_image_attributes = renpy.store._side_image_attributes
if self.image_tag:
attrs = self.image_tag + renpy.game.context().images.get_attributes("master", self.image_tag)
attrs = ( self.image_tag, ) + renpy.game.context().images.get_attributes("master", self.image_tag)
else:
attrs = None
-52
View File
@@ -331,55 +331,6 @@ python early hide:
lint=lint_stop_generic)
##########################################################################
# "window show" and "window hide" statements.
def parse_window(l):
p = l.simple_expression()
if not l.eol():
renpy.error('expected end of line')
return p
def lint_window(p):
if p is not None:
_try_eval(p, 'window transition')
def execute_window_show(p):
if store._window:
return
if p is not None:
trans = eval(p)
else:
trans = config.window_show_transition
renpy.with_statement(None)
store._window = True
renpy.with_statement(trans)
def execute_window_hide(p):
if not _window:
return
if p is not None:
trans = eval(p)
else:
trans = config.window_hide_transition
renpy.with_statement(None)
store._window = False
renpy.with_statement(trans)
renpy.register_statement('window show',
parse=parse_window,
execute=execute_window_show,
lint=lint_window)
renpy.register_statement('window hide',
parse=parse_window,
execute=execute_window_hide,
lint=lint_window)
##########################################################################
# Pause statement.
@@ -415,9 +366,6 @@ python early hide:
init -1200 python:
config.window_show_transition = None
config.window_hide_transition = None
def _try_eval(e, what):
try:
return eval(e)
+135
View File
@@ -0,0 +1,135 @@
# Copyright 2004-2014 Tom Rothamel <pytom@bishoujo.us>
#
# Permission is hereby granted, free of charge, to any person
# obtaining a copy of this software and associated documentation files
# (the "Software"), to deal in the Software without restriction,
# including without limitation the rights to use, copy, modify, merge,
# publish, distribute, sublicense, and/or sell copies of the Software,
# and to permit persons to whom the Software is furnished to do so,
# subject to the following conditions:
#
# The above copyright notice and this permission notice shall be
# included in all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
# This file contains the definition and implementation of the window show,
# window hide, and window auto statements.
init -1200 python:
config.window_show_transition = None
config.window_hide_transition = None
# A list of statements that cause the window to be auto-shown.
config.window_auto_show = [ "say" ]
# A list of statements that cause the window to be auto-hidden.
config.window_auto_hide = [ "scene" ]
_window_auto = False
def _window_show(trans=None):
if store._window:
return
if trans is None:
trans = config.window_show_transition
if _preferences.show_empty_window:
renpy.with_statement(None)
store._window = True
renpy.with_statement(trans)
else:
store._window = True
def _window_hide(trans=None):
if not store._window:
return
if trans is None:
trans = config.window_hide_transition
if _preferences.show_empty_window:
renpy.with_statement(None)
store._window = False
renpy.with_statement(trans)
else:
store._window = False
def _window_auto_callback(statement):
if not store._window_auto:
return
if statement in config.window_auto_hide:
_window_hide()
if statement in config.window_auto_show:
_window_show()
config.statement_callbacks.append(_window_auto_callback)
python early hide:
##########################################################################
# "window show" and "window hide" statements.
def parse_window(l):
p = l.simple_expression()
if not l.eol():
renpy.error('expected end of line')
return p
def lint_window(p):
if p is not None:
_try_eval(p, 'window transition')
def execute_window_show(p):
store._window_auto = False
if p is not None:
trans = eval(p)
else:
trans = None
_window_show(trans)
def execute_window_hide(p):
store._window_auto = False
if p is not None:
trans = eval(p)
else:
trans = None
_window_hide(trans)
def parse_window_auto(l):
if not l.eol():
renpy.error('expected end of line')
return { }
def execute_window_auto(p):
store._window_auto = True
renpy.register_statement('window show',
parse=parse_window,
execute=execute_window_show,
lint=lint_window)
renpy.register_statement('window hide',
parse=parse_window,
execute=execute_window_hide,
lint=lint_window)
renpy.register_statement('window auto',
parse=parse_window_auto,
execute=execute_window_auto)
+1 -1
View File
@@ -436,7 +436,7 @@ init -1500 python:
Returns the name of the numbered slot. This assumes that slots on
normal pages are numbered in a linear order starting with 1, and
that page numbers start with 1. When slot is 2, and slots_per_page
is 10, and the other variables are the defauts:
is 10, and the other variables are the defaults:
* When the first page is showing, this returns "2".
* When the second page is showing, this returns "12".
+6
View File
@@ -47,6 +47,9 @@ init -1500 python:
# If not None, the default value of mouse_move.
config.default_mouse_move = True
# If not None, the default value of show_empty_window.
config.default_show_empty_window = True
init 1500 python:
@@ -77,6 +80,9 @@ init 1500 python:
if config.default_afm_enable is not None:
_preferences.afm_enable = config.default_afm_enable
if config.default_show_empty_window is not None:
_preferences.show_empty_window = config.default_show_empty_window
# Use default_afm_enable to decide if we use the afm_enable
# preference.
if config.default_afm_enable is not None:
+13
View File
@@ -68,6 +68,10 @@ init -1500 python:
* Preference("transitions", "none") - do not show transitions.
* Preference("transitions", "toggle") - toggle transitions.
* Preference("show empty window", "show") - Allow the "window show" and "window auto" statement to show an empty window outside of the say statement.
* Preference("show empty window", "hide") - Prevent the above.
* Preference("show empty window", "toggle") - Toggle the above.
* Preference("text speed", 0) - make text appear instantaneously.
* Preference("text speed", 142) - set text speed to 142 characters per second.
@@ -159,6 +163,15 @@ init -1500 python:
elif value == "toggle":
return ToggleField(_preferences, "transitions", true_value=2, false_value=0)
elif name == "show empty window":
if value == "show":
return SetField(_preferences, "show_empty_window", True)
elif value == "hide":
return SetField(_preferences, "show_empty_window", False)
elif value == "toggle":
return ToggleField(_preferences, "show_empty_window")
elif name == "text speed":
if value is None:
+10 -6
View File
@@ -810,7 +810,8 @@ init -1110 python hide:
widget_selected,
disabled,
disabled_text,
small):
small,
font="_theme_awt/Quicksand-Regular.ttf"):
theme.clear_buttons()
@@ -820,7 +821,7 @@ init -1110 python hide:
style.button.selected_hover_background = __AWTButton("button_selected", widget_hover, True, low_sat=True)
style.button.insensitive_background = __AWTButton("button", disabled, False)
style.button_text.font = "_theme_awt/Quicksand-Regular.ttf"
style.button_text.font = font
style.button_text.size = text_size
style.button_text.color = widget_text
@@ -927,7 +928,8 @@ init -1110 python hide:
widget_selected,
disabled,
disabled_text,
small):
small,
font="_theme_awt/Quicksand-Regular.ttf"):
theme.clear_large_buttons()
@@ -937,7 +939,7 @@ init -1110 python hide:
style.large_button.selected_hover_background = __AWTButton("button_selected", widget_hover, True)
style.large_button.insensitive_background = __AWTButton("button", disabled, False)
style.large_button_text.font = "_theme_awt/Quicksand-Regular.ttf"
style.large_button_text.font = font
style.large_button_text.size = text_size
style.large_button_text.color = widget_text
style.large_button_text.selected_color = widget_selected
@@ -1133,6 +1135,8 @@ init -1110 python hide:
button_menu = None,
mm_root = "#ffffff",
gm_root = "#ffffff",
regular_font = "_theme_awt/Quicksand-Regular.ttf",
bold_font = "_theme_awt/Quicksand-Bold.ttf",
# for compatibility - unused:
**properties
@@ -1214,13 +1218,13 @@ init -1110 python hide:
style.window.bottom_padding = 35
style.window.ymargin = 6
style.say_dialogue.font = "_theme_awt/Quicksand-Regular.ttf"
style.say_dialogue.font = regular_font
style.say_dialogue.color = widget_text
style.say_dialogue.outlines = [
(0, widget_text, 1, 0)
]
style.say_label.font = "_theme_awt/Quicksand-Bold.ttf"
style.say_label.font = bold_font
style.say_label.color = widget_text
style.say_label.outlines = [
(2, "#20202008", 2, 2),
+3
View File
@@ -489,6 +489,9 @@ longpress_radius = 15
# How long we vibrate the device upon a longpress.
longpress_vibrate = .1
# A list of callbacks that are called before each statement, with the name
# of the statement.
statement_callbacks = [ ]
del renpy
del os
+8 -2
View File
@@ -552,8 +552,14 @@ class Button(renpy.display.layout.Window):
if mask is True:
mask = rv
elif mask is not None:
mask = renpy.easy.displayable(mask)
mask = renpy.display.render.render(mask, rv.width, rv.height, st, at)
try:
mask = renpy.easy.displayable(mask)
mask = renpy.display.render.render(mask, rv.width, rv.height, st, at)
except:
if callable(mask):
mask = mask
else:
raise Exception("Focus_mask must be None, True, a displayable, or a callable.")
if mask is not None:
fmx = 0
+3
View File
@@ -1637,6 +1637,9 @@ class Interface(object):
if not renpy.store._window:
return
if not renpy.game.preferences.show_empty_window:
return
if renpy.game.context().scene_lists.shown_window:
return
+1 -1
View File
@@ -395,7 +395,7 @@ class FileCurrentScreenshot(renpy.display.core.Displayable):
:func:`FileTakeScreenshot`.
If there is no current screenshot, `empty` is shown in its place. (If `empty` is
None, it defaults to :func:`Null`().)
None, it defaults to :func:`Null`.)
"""
def __init__(self, empty=None, **properties):
+7 -3
View File
@@ -834,7 +834,7 @@ cdef class Render:
this focus is assumed to be the singular full-screen focus.
"""
if mask is not None and mask is not self:
if isinstance(mask, Render) and mask is not self:
self.depends_on(mask)
t = (d, arg, x, y, w, h, mx, my, mask)
@@ -929,8 +929,12 @@ cdef class Render:
if self.forward:
cx, cy = self.forward.transform(cx, cy)
if mask.is_pixel_opaque(cx, cy):
rv = d, arg
if isinstance(mask, Render):
if mask.is_pixel_opaque(cx, cy):
rv = d, arg
else:
if mask(cx, cy):
rv = d, arg
elif xo <= x < xo + w and yo <= y < yo + h:
rv = d, arg
+57
View File
@@ -295,6 +295,63 @@ def showing(name, layer='master'):
return renpy.game.context().images.showing(layer, name)
def predict_show(name, layer='master', what=None, tag=None, at_list=[ ]):
"""
:undocumented:
Predicts a scene or show statement.
`name`
The name of the image to show, a string.
`layer`
The layer the image is being show non.
`what`
What is being show - if given, overrides `name`.
`tag`
The tag of the thing being shown.
`at_list`
A list of transforms to apply to the displayable.
"""
key = tag or name[0]
if what is None:
what = name
elif isinstance(what, basestring):
what = tuple(what.split())
if isinstance(what, renpy.display.core.Displayable):
base = img = what
else:
if renpy.config.image_attributes:
new_what = renpy.game.context().images.apply_attributes(layer, key, name)
if new_what is not None:
what = new_what
name = (key,) + new_what[1:]
base = img = renpy.display.image.ImageReference(what, style='image_placement')
if not base.find_target():
return
for i in at_list:
if isinstance(i, renpy.display.motion.Transform):
img = i(child=img)
else:
img = i(img)
renpy.game.context().images.predict_show(layer, name, True)
renpy.display.predict.displayable(img)
def show(name, at_list=[ ], layer='master', what=None, zorder=0, tag=None, behind=[ ], atl=None, transient=False, munge_name=True):
"""
:doc: se_images
+4 -1
View File
@@ -25,7 +25,7 @@ class Preferences(renpy.object.Object):
"""
Stores preferences that will one day be persisted.
"""
__version__ = 9
__version__ = 11
def after_upgrade(self, version):
if version < 1:
@@ -47,6 +47,8 @@ class Preferences(renpy.object.Object):
self.mouse_move = False
if version < 9:
self.afm_after_click = False
if version < 11:
self.show_empty_window = True
def __init__(self):
self.fullscreen = False
@@ -56,6 +58,7 @@ class Preferences(renpy.object.Object):
self.afm_enable = True
self.voice_sustain = False
self.mouse_move = False
self.show_empty_window = True
# Should we wait for the voice to stop?
self.wait_voice = True
+3
View File
@@ -506,6 +506,9 @@ position_property_names = [
# no center, since it can conflict with the center transform.
"xcenter",
"ycenter",
"xsize",
"ysize",
"xysize",
]
position_properties = [ Style(i) for i in position_property_names ]
+4
View File
@@ -142,3 +142,7 @@ def call(method, parsed, *args, **kwargs):
return None
return method(parsed, *args, **kwargs)
def get_name(parsed):
name, _parsed = parsed
return " ".join(name)
+3 -1
View File
@@ -695,7 +695,9 @@ class Layout(object):
# Log an overflow if the laid out width or height is larger than the
# size of the provided area.
if renpy.config.debug_text_overflow:
if sw > width or sh > height:
ow, oh = self.size
if ow > width or oh > height:
filename, line = renpy.exports.get_filename_line()
renpy.display.to_log.write("")
+8 -5
View File
@@ -347,7 +347,7 @@ def style_group_style(s, style_group):
else:
new_style = style_group + "_" + s
return renpy.style.get_style(new_style)
return renpy.style.get_style(new_style) # @UndefinedVariable
# The screen we're using as we add widgets. None if there isn't a
# screen.
@@ -824,7 +824,7 @@ def _imagebutton(idle_image = None,
auto=None,
**properties):
def choice(a, b, name):
def choice(a, b, name, required=False):
if a:
return a
@@ -834,9 +834,12 @@ def _imagebutton(idle_image = None,
if auto is not None:
return renpy.config.imagemap_auto_function(auto, name)
if required:
raise Exception("Could not find a %s image for imagemap." % name)
return None
idle = choice(idle, idle_image, "idle")
idle = choice(idle, idle_image, "idle", required=True)
hover = choice(hover, hover_image, "hover")
insensitive = choice(insensitive, insensitive_image, "insensitive")
selected_idle = choice(selected_idle, selected_idle_image, "selected_idle")
@@ -879,7 +882,7 @@ def textbutton(label, clicked=None, style=None, text_style=None, substitute=True
style = style_group_style('button', NoStyleGroupGiven)
if text_style is None:
text_style = renpy.style.get_text_style(style, style_group_style('button_text', NoStyleGroupGiven))
text_style = renpy.style.get_text_style(style, style_group_style('button_text', NoStyleGroupGiven)) # @UndefinedVariable
button(style=style, clicked=clicked, **button_kwargs)
text(label, style=text_style, substitute=substitute, scope=scope, **text_kwargs)
@@ -899,7 +902,7 @@ def label(label, style=None, text_style=None, substitute=True, scope=None, **kwa
style = style_group_style('label', NoStyleGroupGiven)
if text_style is None:
text_style = renpy.style.get_text_style(style, style_group_style('label_text', NoStyleGroupGiven))
text_style = renpy.style.get_text_style(style, style_group_style('label_text', NoStyleGroupGiven)) # @UndefinedVariable
window(style=style, **label_kwargs)
text(label, style=text_style, substitute=substitute, scope=scope, **text_kwargs)
+1
View File
@@ -42,6 +42,7 @@ define
screen
label
voice
translate
"""
# Words that are sometimes statement keywords, like for ATL
+40 -10
View File
@@ -27,7 +27,7 @@ remains fully supported.) Lengthy and redundant code like::
can be replaced with::
style quick_button_text is defaut:
style quick_button_text is default:
size 12
idle_color "#8888"
hover_color "#ccc"
@@ -38,7 +38,7 @@ rewritten.
Syntax Changes
--------------
In addition to the new style statement, there are three other syntax
In addition to the new style statement, there are four other syntax
changes:
* The definition of a simple expression has been expanded. Simple expressions
@@ -53,7 +53,7 @@ changes:
is now legal. Previously, the expression had to be parenthesized.
* The new show layer statement allows one to apply a transform
* The new ``show layer`` statement allows one to apply a transform
or ATL transform to an entire layer, using syntax like::
show layer master at flip
@@ -63,6 +63,11 @@ changes:
show layer master:
xalign 0.5 yalign 0.5 rotate 180
* The new ``window auto`` statement makes it possible for Ren'Py to
automatically show and hide the dialogue window. By default, it is
shown before ``say`` statements, and hidden before ``scene`` statements,
but this can be customized.
* The init statement has been extended so it can be combined with
other statements. It's now possible to write "init 1 image = ...",
"init -2 define name = ..." and so on.
@@ -85,22 +90,29 @@ Buttons may now have an alternate action that is triggered by longpress
on Android and right-click on desktop computers.
This release fixes a bug in which Ren'Py would not save persistent data
(including preferences) before being terminated by the Android system.
(including preferences) before being terminated by the Android system, and
a regression that broke compatibility with some Android 2.3 systems.
New Preferences
---------------
New and Changed Preferences
---------------------------
There are a couple of preference changes that can be accessed through the
:func:`Preferences` function:
There are two new preferences accessible through the :func:`Preferences`
function:
* "auto-forward after click" controls if auto-forward mode is stopped
by a click.
* "show empty window" determines is if the "window show" and "window auto"
statements will cause an empty window to be shown.
Neither of these is exposed as part of the default preferences screen, but
both can be added by interested developers.
There is one changed preference:
* "display" now has an "any window" option, which restores a fullscreen
Ren'Py to its prior windowed size.
Neither of these is exposed as part of the default preferences screen, but
both can be added by interesting
Other
-----
@@ -112,6 +124,14 @@ the size of the input field it a certain number of pixels.
The :func:`FileCurrentScreenshot` function
The new :propref:`xsize`, :propref:`ysize`, and :propref:`xysize` style
properties make it possible to directly set the size of a displayble.
The :propref:`focus_mask` style property can now take as an argument a callable
that returns true when a displayable should be focused. If such a callable
can be written, it may be much faster than the current method of determining
pixel opacity.
Viewport now respects the xfill and yfill properties. The default viewport
style sets these to true. Setting them to False will cause the viewport to
shrink to fit its contents when those contents do not fill the entire
@@ -124,6 +144,16 @@ to it.
The new :func:`renpy.retain_after_load` can be used to retain data updated
by a screen after the game is loaded.
The new :propref:`xsize`, :propref:`ysize`, and :propref:`xysize` style
properties make it possible to directly set the size of resizable
displayables.
Prediction of images with partial attributes and side images used in
dialogue has been improved. Prediction of creator-defined statements
now works as documented.
Ren'Py 6.16.2
=============
+17
View File
@@ -242,6 +242,13 @@ cleared.
This sets the default value of the language preference. This is only
used the first time the game starts.
.. var:: config.default_show_empty_window = True
This determines if Ren'Py will show an empty window during
non-say statements. If True, Ren'Py respects the "window show", "window hide",
and "window auto" statements. If False, Ren'Py will not show an empty
window.
.. var:: config.default_text_cps = None
If not None, this sets the default number of characters per second
@@ -578,6 +585,16 @@ Occasionally Used
When using a load_save layout, a different default may be used.
.. var:: config.window_auto_hide = [ 'scene' ]
A list of statements that cause ``window auto`` to hide the empty
dialogue window.
.. var:: config.window_auto_show = [ 'say' ]
A list of statements that cause ``window auto`` to show the empty
dialogue window.
.. var:: config.window_overlay_functions = []
A list of overlay functions that are only called when the window
+65 -6
View File
@@ -88,7 +88,7 @@ character.
The define statement causes its expression to be evaluated, and assigned to the
supplied name. If not inside an init block, the define statement will
automatically be run with init priority 0.
automatically be run with init priority 0.
.. include:: inc/character
@@ -172,20 +172,20 @@ them can be a problem.
``centered``
A character that causes what it says to be displayed centered,
in the middle of the screen, outside of any window.
in the middle of the screen, outside of any window.
``vcentered``
A character that causes what it says to be displayed centered
in vertically oriented text, in the middle of the screen,
outside of any window.
outside of any window.
``extend``
A character that causes the last character to speak to say a line
of dialogue consisting of the last line of dialogue spoken, "{fast}",
and the dialogue given to extend. This can be used to have the screen
change over the course of dialogue.
Extend is aware of NVL-mode, and treats it correctly.
Extend is aware of NVL-mode, and treats it correctly.
For example::
@@ -198,10 +198,69 @@ For example::
extend " But I usually quickly get over it!"
# Similar, but automatically changes the expression when the first line is finished
# showing. This only makes sense when the user doesn't have text speed set all the
# showing. This only makes sense when the user doesn't have text speed set all the
# way up.
show eileen concerned
e "Sometimes, I feel sad.{nw}"
show eileen happy
extend " But I usually quickly get over it!"
Dialogue Window Management
--------------------------
Ren'Py includes several statements that allow for management of the
dialogue window. As dialogue window is always shown during dialogue,
these statements control the presence or absence of the window during
non-dialogue interactions.
``window show``
The window show statement causes the window to be shown.
It takes as an argument an optional transition, which is used to show the
window. If the transition is omitted, :var:`config.window_show_transition`
is used.
``window hide``
The window hide statement causes the window to be hidden. It takes as an
argument an optional transition, which is used to hide the window. If
the transition is omitted, :var:`config.window_hide_transition` is
used.
``window auto``
This enables automatic management of the window. The window is shown
before statements listed in :var:`config.window_auto_show` - by default,
say statements. The window is hidden before statements listed in
:var:`config.window_auto_hide` - by default, scene statements.
The ``window auto`` statement uses :var:`config.window_show_transition`
and :var:`config.window_hide_transition` to show and hide the window,
respectively. ``window auto`` is cancelled by ``window show`` or ``window hide``.
For example::
window show # shows the window with the default transition, if any.
pause # the window is shown during this pause.
window hide # hides the window.
pause # the window is hidden during this pause.
window show dissolve # shows the window with dissolve.
pause # the window is shown during this pause.
window hide dissolve # hides the window with dissolve.
pause # the window is hidden during this pause.
window auto
"The window is automatically shown before this line of dialogue."
pause # the window is shown during this pause.
scene bg washington # the window is hidden before the scene change.
with dissolve
Dialogue window management is subject to the "show empty window"
:func:`Preference`. If the preference is disabled, the statements above
have no effect.
+2 -2
View File
@@ -11,7 +11,7 @@
:func:`FileTakeScreenshot`.
If there is no current screenshot, `empty` is shown in its place. (If `empty` is
None, it defaults to :func:`Null`().)
None, it defaults to :func:`Null`.)
.. function:: FileJson(name, key=None, empty=None, missing=None, page=None)
@@ -57,7 +57,7 @@
Returns the name of the numbered slot. This assumes that slots on
normal pages are numbered in a linear order starting with 1, and
that page numbers start with 1. When slot is 2, and slots_per_page
is 10, and the other variables are the defauts:
is 10, and the other variables are the defaults:
* When the first page is showing, this returns "2".
* When the second page is showing, this returns "12".
+4
View File
@@ -20,6 +20,10 @@
* Preference("transitions", "none") - do not show transitions.
* Preference("transitions", "toggle") - toggle transitions.
* Preference("show empty window", "show") - Allow the "window show" and "window auto" statement to show an empty window outside of the say statement.
* Preference("show empty window", "hide") - Prevent the above.
* Preference("show empty window", "toggle") - Toggle the above.
* Preference("text speed", 0) - make text appear instantaneously.
* Preference("text speed", 142) - set text speed to 142 characters per second.
+6 -6
View File
@@ -151,7 +151,7 @@
* Zoom
* ZoomInOut
* absolute
* adv
* :var:`adv`
* anim
* :var:`blinds`
* build
@@ -183,9 +183,9 @@
* layout
* :var:`left`
* library
* main_menu
* :var:`main_menu`
* :func:`menu`
* mouse_visible
* :var:`mouse_visible`
* :var:`move`
* moveinbottom
* moveinleft
@@ -195,8 +195,8 @@
* moveoutleft
* :var:`moveoutright`
* moveouttop
* name_only
* narrator
* :var:`name_only`
* :var:`narrator`
* nvl
* nvl_clear
* nvl_clear_next
@@ -223,7 +223,7 @@
* :var:`reset`
* :var:`right`
* :var:`save_name`
* say
* :var:`say`
* skip_indicator
* slideawaydown
* :var:`slideawayleft`
+1
View File
@@ -68,6 +68,7 @@ Customizing Ren'Py
screen_actions
screen_special
config
store_variables
Other Functionality
-------------------
File diff suppressed because one or more lines are too long
+104
View File
@@ -0,0 +1,104 @@
Store Variables
===============
Ren'Py has a number of store variables that control its function. Store
variables may be changed at any time. If a store variable is changed after
the game has started, it will be be saved and loaded by the save system,
and rolled-back when rollback occurs.
.. var:: adv = Character(...)
This is a template ADV-mode character, and the default character kind
that is used when :func:`Character` is called.
.. var:: _game_menu_screen = "save"
This is the screen that is displayed when entering the game menu with no
more specific screen selected. (For example, when right-clicking, pressing
escape, or when :func:`ShowMenu` is not given an argument.) If None, entry
to the game menu is disallowed.
This is set to None at the start of the splashscreen, and restored to its
original value when the splashscreen ends.
.. var:: main_menu = False
Ren'Py sets this variable to True while in the main menu. This can be used
to have screens display differently while in the main menu.
.. var:: menu = renpy.display_menu
The function that's called to display the in-gamemenu. It should take the same
arguments as :func`renpy.display_menu`. Assigning :func:`nvl_menu` to this
will display an nvl-mode menu.
.. var:: mouse_visible = True
Controls if the mouse is visible. This is automatically set to true when
entering the standard game menus.
.. var:: name_only = Character(...)
This is a template character that is used when a string is given as the
character name in a say statement. The code::
"Eileen" "Hello, world."
is equivalent to::
$ temp_char = Character("Eileen", kind=name_only)
temp_char "Hello, world."
except that the temp_char variable is not used.
.. var:: narrator = Character(...)
This is the character that speaks narration (say statements that do not
give a character or character name). The code::
"Hello, world."
is equivalent to::
narrator "Hello, world."
.. var:: _rollback = True
Controls if rollback is allowed.
.. var:: say = ...
A function that is called by Ren'Py to display dialogue. This is called
with three arguments. The first argument (`who`) is the character saying the
dialogue (or None for the narrator). The second argument(`what`) is what dialogue
is being said.
The third argument must be a keyword argument named `interact` and defaulting
to True. If true, the say function will wait for a click. If false, it will
immediately return with the dialogue displayed on the screen.
It's rare to call this function directly, as one can simply call a character
with dialogue. This variable mostly exists to be redefined, as a way of
hooking the say statement.
.. var:: save_name = ""
A save name that is included with saves.
.. var:: _window = False
This set by the ``window show`` and ``window hide`` statements, and indirectly
by ``window auto``. If true, the dialogue window is shown during non-dialogue
statements.
.. var:: _window_auto = False
This is set to true by ``window auto`` and to false by ``window show`` and
``window hide``. If true, the window auto behavior occurs.
.. var:: _window_subtitle = ''
This is appended to :var:`config.window_title` to produce the caption for the game
window. This is automatically set to :var:`config.menu_window_subtitle` while in
the game menu.
+35 -6
View File
@@ -261,6 +261,22 @@ allocated to it by a layout, or on the screen when not inside a layout.
Equivalent to setting xminimum to the first component of the
tuple, and yminimum to the second.
.. style-property:: xsize int
Equivalent to setting xminimum and xmaximum to the same value. This
has the effect of setting the width of the displayable.
.. style-property:: ysize int
Equivalent to setting yminimum and ymaximum to the same value. This
has the effect of setting the height of the displayable.
.. style-property:: xysize tuple of (int, int)
Equivalent to setting xminimum and xmaximum to the first component of
the tuple, and yminimum and ymaximum to the second component. This
has the effect of setting the size of the displayable.
.. style-property:: xfill boolean
If true, the displayable will expand to fill all available
@@ -631,14 +647,27 @@ Button Style Properties
The mouse style that is used when the button is focused. This
should be one of the styles in :var:`config.mouse`.
.. style-property:: focus_mask displayable or True or None
.. style-property:: focus_mask multiple
A mask that's used to control what portions of the button can be
focused, and hence clicked on. If it's a displayable, then areas
of the displayable that are not transparent can be focused. If
it's True, then the button itself is used as the displayable (so
non-transparent areas of the button can be focused.) Otherwise,
the entire button can be focused.
focused, and hence clicked on. The type of this propertie determines
how it is interpreted.
Displayable
The areas of the displayable that are not transparent cause the button
to be focused.
True
The button itself is used as the displayable (so
non-transparent areas of the button cause the button to be
focused).
callable
If a non-displayable callable (like a function, method, or object
with a __call__ method) is given, the function is called with two
arguments, the x and y offset from the top-left corner of the
displayable. If the function returns true, the displayable is
focused.
None
If none is given, the entire button can be focused.
.. _bar-style-properties:
+108
View File
@@ -282,3 +282,111 @@ translate None strings:
old "Quick save complete."
new "クイックセーブ完了。"
# Translation updated at 2014-02-08 16:38
translate None strings:
# renpy/common/_developer/inspector.rpym:43
old "Displayable Inspector"
new "Displayableインスペクター"
# renpy/common/_developer/inspector.rpym:49
old "Nothing to inspect."
new "インスペクトするものがありません"
# renpy/common/_developer/inspector.rpym:58
old "Size"
new "サイズ"
# renpy/common/_developer/inspector.rpym:63
old "Style"
new "スタイル"
# renpy/common/_developer/inspector.rpym:123
old "Inspecting Styles of [displayable_name!q]"
new "[displayable_name!q]のスタイルをインスペクト中"
# renpy/common/_developer/inspector.rpym:135
old "displayable:"
new "Displayable:"
# renpy/common/_developer/inspector.rpym:142
old " (no properties affect the displayable)"
new " (Displayableに影響しているプロパティーはありません)"
# renpy/common/_developer/inspector.rpym:144
old " (default properties omitted)"
new " (デフォルトのプロパティーは省略)"
# renpy/common/_developer/inspector.rpym:174
old "<repr() failed>"
new "<repr() 失敗>"
# Translation updated at 2014-02-08 16:38
translate None strings:
# renpy/common/_developer/developer.rpym:65
old "Developer Menu"
new "開発者メニュー"
# renpy/common/_developer/developer.rpym:67
old "Reload Game (Shift+R)"
new "ゲームのリロード (Shift+R)"
# renpy/common/_developer/developer.rpym:69
old "Console (Shift+O)"
new "コンソール (Shift+D)"
# renpy/common/_developer/developer.rpym:71
old "Variable Viewer"
new "変数ビューアー"
# renpy/common/_developer/developer.rpym:73
old "Theme Test"
new "テーマのテスト"
# renpy/common/_developer/developer.rpym:75
old "Image Location Picker"
new "画像位置ピッカー"
# renpy/common/_developer/developer.rpym:77
old "Filename List"
new "ファイル名のリスト"
# renpy/common/_developer/developer.rpym:81
old "Show Image Load Log"
new "画像ロード履歴の表示"
# renpy/common/_developer/developer.rpym:84
old "Hide Image Load Log"
new "画像ロード履歴の非表示"
# renpy/common/_developer/developer.rpym:149
old "No variables have changed since the game started."
new "ゲーム起動時から変更された変数はありません。"
# renpy/common/_developer/developer.rpym:152
old "Return to the developer menu"
new "開発者メニューに戻ります"
# renpy/common/_developer/developer.rpym:309
old "Undefined Images"
new "未定義の画像"
# renpy/common/_developer/developer.rpym:409
old "Rectangle: %r"
new "矩形: %r"
# renpy/common/_developer/developer.rpym:414
old "Mouse position: %r"
new "マウス位置: %r"
# renpy/common/_developer/developer.rpym:416
old "Right-click or escape to quit."
new "右クリックまたはEscで終了。"
# renpy/common/_developer/developer.rpym:467
old "Done"
new "完了"
+3 -5
View File
@@ -50,16 +50,14 @@ init -1 python hide:
## Themes
## - Temas
## We then want to call a theme function. themes.roundrect is
## a theme that features the use of rounded rectangles. It's
## the only theme we currently support.
## We then want to call a theme function. theme.roundrect is
## a theme that features the use of rounded rectangles.
##
## The theme function takes a number of parameters that can
## customize the color scheme.
## - Para utilizar una función de tema, utilizamos themes.roundrect.
## Este tema configura el uso de rectángulos redondeados.
## Actualmente es la única función soportada.
##
## - La función de tema acepta una serie de parámetros que pueden
## personalizar la paleta de colores.
@@ -367,7 +365,7 @@ init -1 python hide:
#########################################
## This is the name of the directory where the game's data is
## stored. (It needs to be set early, before any other init code
## is run, so the persisten information can be found by the init code.)
## is run, so the persistent information can be found by the init code.)
## - Nombre del directorio en el cual se almacenan los datos del juego.
## (Debe ajustarse al inicio, antes de los otros bloques 'init', para
## que la información persistente pueda ser encontrada por el código
+12 -2
View File
@@ -1,4 +1,3 @@
translate None strings:
# renpy/common/_layout/classic_load_save.rpym:152
@@ -359,7 +358,7 @@ translate None strings:
# renpy/common/_developer/developer.rpym:122
old "No variables have changed since the game started."
new "No hay variables que hayan cambiado desde que empezo el jeugo."
new "Ninguna variable ha cambiado desde el inicio del juego."
# renpy/common/_developer/developer.rpym:125
old "Return to the developer menu"
@@ -369,3 +368,14 @@ translate None strings:
old "Rectangle: %r"
new "Rectángulo: %r"
# renpy/common/_developer/developer.rpym:69
old "Console (Shift+O)"
new "Consola (Mayús.+O)"
# renpy/common/_developer/developer.rpym:81
old "Show Image Load Log"
new "Muestra registro de carga de imagen"
# renpy/common/_developer/developer.rpym:84
old "Hide Image Load Log"
new "Oculta registro de carga de imagen"
File diff suppressed because one or more lines are too long