Image buttons

Discuss how to use the Ren'Py engine to create visual novels and story-based games. New releases are announced in this section.
Forum rules
This is the right place for Ren'Py help. Please ask one question per thread, use a descriptive subject like 'NotFound error in option.rpy' , and include all the relevant information - especially any relevant code and traceback messages. Use the code tag to format scripts.
Post Reply
Message
Author
RedReality
Newbie
Posts: 19
Joined: Thu Mar 22, 2012 2:22 am
Contact:

Image buttons

#1 Post by RedReality »

I just discovered that there are image buttons. But the code doesn't work?

init python hide:
buttons = dict()
buttons["Start Game"] = (
"theme/Start Game.idle.png",
"theme/Start Game.hover.png",
"theme/Start Game.selidle.png",
"theme/Start Game.selhover.png",
"theme/Start Game.insensitive.png"
)

theme.image_buttons(buttons)

I don't get it. My filenames are right but it doesn't work... :(

Ex of my filename: "Start Game.idle.png". Is the "theme/" included or what??

DragoonHP
Miko-Class Veteran
Posts: 758
Joined: Tue Jun 22, 2010 12:54 am
Completed: Christmas
IRC Nick: DragoonHP
Location: Zion Island, Solario
Contact:

Re: Image buttons

#2 Post by DragoonHP »

Where did you find that code?

Anyway, here are the two ways to code an imagebutton
http://www.renpy.org/wiki/renpy/doc/ref ... magebutton

For screen: http://www.renpy.org/doc/html/screens.html#imagebutton

RedReality
Newbie
Posts: 19
Joined: Thu Mar 22, 2012 2:22 am
Contact:

Re: Image buttons

#3 Post by RedReality »

DragoonHP wrote:Where did you find that code?

Anyway, here are the two ways to code an imagebutton
http://www.renpy.org/wiki/renpy/doc/ref ... magebutton

For screen: http://www.renpy.org/doc/html/screens.html#imagebutton
It found here. http://www.renpy.org/wiki/renpy/doc/ref ... ge_buttons
Is is possible to use your links for the main menu? That's what I'm trying to do :/

DragoonHP
Miko-Class Veteran
Posts: 758
Joined: Tue Jun 22, 2010 12:54 am
Completed: Christmas
IRC Nick: DragoonHP
Location: Zion Island, Solario
Contact:

Re: Image buttons

#4 Post by DragoonHP »

Yes...
You can also you imagemaps for main menu... http://lemmasoft.renai.us/forums/viewto ... =8&t=14237

RedReality
Newbie
Posts: 19
Joined: Thu Mar 22, 2012 2:22 am
Contact:

Re: Image buttons

#5 Post by RedReality »

DragoonHP wrote:Yes...
You can also you imagemaps for main menu... http://lemmasoft.renai.us/forums/viewto ... =8&t=14237
Thank you very much. I'll try it now.

Post Reply

Who is online

Users browsing this forum: Google [Bot], Majestic-12 [Bot]