Re: Custom Menu
Posted: Sun Nov 16, 2008 2:06 pm
EvilDragon wrote:Read PyTom's reply.
You do like this:
It's important to order the image files correct way. So first you put "idle" image, then "hovered", then "selected", then "selected+hovered", then "insensitive".Code: Select all
init python: theme.image_buttons({ "Name of the button" : ("button_not_pressed.png", "button_hovered.png", "button_selected.png", "button_selected_and_hovered.png", "button_not_sensitive.png"), "Another button" : (order images the same way), # ... add other buttons like so })
I've tried this to customize my own menu, but all I get is a traceback with this message: AttributeError: 'RevertableObject' object has no attribute 'image_buttons'
I have the newest renpy. Is my options code just outdated or something? Or is there something in all the code examples I have read that I just don't get? (In all honesty, I don't get any of this imagemap stuff... so I'm just trying to paste in what everyone else says. I'm too dumb for the tutorial it seems
Here is the full traceback in case you need it:
Code: Select all
I'm sorry, but an exception occured while executing your Ren'Py
script.
AttributeError: 'RevertableObject' object has no attribute 'image_buttons'
While executing init code:
- script at line 3 of C:\Documents and Settings\Lonnie Brandt\My Documents\Andet\OEL vn\renpy-6.8.0\glass_wings/game/script.rpy
- python at line 4 of C:\Documents and Settings\Lonnie Brandt\My Documents\Andet\OEL vn\renpy-6.8.0\glass_wings/game/script.rpy.
-- Full Traceback ------------------------------------------------------------
File "C:\Documents and Settings\****\My Documents\Andet\OEL vn\renpy-6.8.0\renpy\bootstrap.py", line 247, in bootstrap
File "C:\Documents and Settings\****\My Documents\Andet\OEL vn\renpy-6.8.0\renpy\main.py", line 253, in main
File "C:\Documents and Settings\****\My Documents\Andet\OEL vn\renpy-6.8.0\renpy\execution.py", line 199, in run
File "C:\Documents and Settings\****\My Documents\Andet\OEL vn\renpy-6.8.0\renpy\ast.py", line 554, in execute
File "C:\Documents and Settings\****\My Documents\Andet\OEL vn\renpy-6.8.0\renpy\python.py", line 880, in py_exec_bytecode
File "C:\Documents and Settings\****\My Documents\Andet\OEL vn\renpy-6.8.0\glass_wings/game/script.rpy", line 4, in <module>
AttributeError: 'RevertableObject' object has no attribute 'image_buttons'
While executing init code:
Ren'Py Version: Ren'Py 6.8.0f