I started off with the two-person-say code. Incidentally, this didn't pause for the mouse when I first picked it out the /extras directory - it looks to my untrained eye like it's from some previous version of the code where the ui.text method incorporated the ui.saybehaviour functionality? After reading through the reference I changed the end of the method from the ui.text call onwards to read like the following, which worked for me, but I'd obviously appreciate knowing whether there's something I'm missing:
Code: Select all
ui.text(what, **what_args)
ui.close()
rv = ui.saybehavior()
ui.interact()
return rv
Code: Select all
def trySay(self, what):
ui.hbox()
ui.window()
ui.image("portrait.png")
ui.window()
ui.text(what)
ui.close()
val = ui.saybehavior()
ui.interact()
return val
Curiously, if I change the call to ui.hbox to a call to ui.grid(2,1), it renders the image window before crashing out, and renders it full-width.
Is there something I'm getting wrong, or perhaps some style that could be forcing the text window to inconvinient sizes or something? Again, I'm working within the demo script for convinience. The full text of the traceback is as follows:
Code: Select all
I'm sorry, but an exception occured while executing your Ren'Py
script.
ValueError: Cannot scale to negative size
The last script statement executed was on line 94 of game/script.rpy.
-- Full Traceback ------------------------------------------------------------
File "renpy\bootstrap.pyo", line 96, in bootstrap
File "renpy\main.pyo", line 233, in main
File "renpy\main.pyo", line 158, in run
File "renpy\execution.pyo", line 76, in run
File "renpy\ast.pyo", line 334, in execute
File "renpy\python.pyo", line 763, in py_exec_bytecode
File "game/script.rpy", line 94, in <module>
File "game/PortraitCharacter.rpy", line 66, in trySay
File "renpy\ui.pyo", line 51, in interact
File "renpy\display\core.pyo", line 985, in interact
File "renpy\display\core.pyo", line 1207, in interact_core
File "renpy\display\core.pyo", line 718, in show
File "renpy\display\render.pyo", line 155, in render_screen
File "renpy\display\render.pyo", line 81, in render
File "renpy\display\layout.pyo", line 197, in render
File "renpy\display\render.pyo", line 81, in render
File "renpy\display\layout.pyo", line 197, in render
File "renpy\display\render.pyo", line 81, in render
File "renpy\display\layout.pyo", line 197, in render
File "renpy\display\render.pyo", line 81, in render
File "renpy\display\layout.pyo", line 440, in render
File "renpy\display\render.pyo", line 81, in render
File "renpy\display\layout.pyo", line 597, in render
File "renpy\display\render.pyo", line 81, in render
File "renpy\display\image.pyo", line 201, in render
File "renpy\display\render.pyo", line 81, in render
File "renpy\display\im.pyo", line 251, in render
File "renpy\display\im.pyo", line 103, in get
File "renpy\display\im.pyo", line 458, in load
File "renpy\display\im.pyo", line 448, in draw
ValueError: Cannot scale to negative size
The last script statement executed was on line 94 of game/script.rpy.
Ren'Py Version: Ren'Py 5.5.2a