it sure would help with the animation when I have to calculate the values I'm passing to each button depending on their order in the menu.
I've wrote something that I thought might work:
Code: Select all
default menuz = [["Start",'Start()'],["Load",'ShowMenu("load")']]
screen main_menu():
tag menu
style_prefix "mm"
hbox:
for i in range(2):
button:
text menuz[i][0]
action menuz[i][1]
Code: Select all
I'm sorry, but an uncaught exception occurred.
While running game code:
TypeError: 'unicode' object is not callable
-- Full Traceback ------------------------------------------------------------
Full traceback:
File "renpy/common/_layout/screen_main_menu.rpym", line 28, in script
python hide:
File "D:\gamedev\renpy-6.99.14.1-sdk\renpy\ast.py", line 848, in execute
renpy.python.py_exec_bytecode(self.code.bytecode, self.hide, store=self.store)
File "D:\gamedev\renpy-6.99.14.1-sdk\renpy\python.py", line 1812, in py_exec_bytecode
exec bytecode in globals, locals
File "renpy/common/_layout/screen_main_menu.rpym", line 35, in <module>
ui.interact()
File "D:\gamedev\renpy-6.99.14.1-sdk\renpy\ui.py", line 287, in interact
rv = renpy.game.interface.interact(roll_forward=roll_forward, **kwargs)
File "D:\gamedev\renpy-6.99.14.1-sdk\renpy\display\core.py", line 2624, in interact
repeat, rv = self.interact_core(preloads=preloads, trans_pause=trans_pause, **kwargs)
File "D:\gamedev\renpy-6.99.14.1-sdk\renpy\display\core.py", line 3417, in interact_core
rv = root_widget.event(ev, x, y, 0)
File "D:\gamedev\renpy-6.99.14.1-sdk\renpy\display\layout.py", line 986, in event
rv = i.event(ev, x - xo, y - yo, cst)
File "D:\gamedev\renpy-6.99.14.1-sdk\renpy\display\layout.py", line 986, in event
rv = i.event(ev, x - xo, y - yo, cst)
File "D:\gamedev\renpy-6.99.14.1-sdk\renpy\display\layout.py", line 986, in event
rv = i.event(ev, x - xo, y - yo, cst)
File "D:\gamedev\renpy-6.99.14.1-sdk\renpy\display\screen.py", line 667, in event
rv = self.child.event(ev, x, y, st)
File "D:\gamedev\renpy-6.99.14.1-sdk\renpy\display\layout.py", line 986, in event
rv = i.event(ev, x - xo, y - yo, cst)
File "D:\gamedev\renpy-6.99.14.1-sdk\renpy\display\layout.py", line 986, in event
rv = i.event(ev, x - xo, y - yo, cst)
File "D:\gamedev\renpy-6.99.14.1-sdk\renpy\display\behavior.py", line 897, in event
return handle_click(self.clicked)
File "D:\gamedev\renpy-6.99.14.1-sdk\renpy\display\behavior.py", line 832, in handle_click
rv = run(action)
File "D:\gamedev\renpy-6.99.14.1-sdk\renpy\display\behavior.py", line 306, in run
return action(*args, **kwargs)
TypeError: 'unicode' object is not callable
Windows-7-6.1.7601-SP1
Ren'Py 6.99.14.1.3218
menu on loop 1.0
Sat Apr 14 22:26:06 2018
of curse I need to figure out solutions to more problems like how to translate them but for now, one step at a time.