Imagebutton Instructions
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.
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.
Imagebutton Instructions
Can someone point me in the right direction for up-to-date instructions and/or tutorials for how to use Imagebuttons (or something similar if they aren't used anymore)? Everything I've found on the forums is at least a year or two old.
Re: Imagebutton Instructions
https://www.renpy.org/doc/html/screens.html#imagebutton
Still used, still quite simple.
You can do the auto thing but the simplest instruction is:
Still used, still quite simple.
You can do the auto thing but the simplest instruction is:
Code: Select all
imagebutton:
idle "images/someimage.png" #this is the button
pos (20,50) #this is the x,y position of the button
action NullAction() #what happens when you click the button, this means nothing will happen- Imperf3kt
- Lemma-Class Veteran
- Posts: 3636
- Joined: Mon Dec 14, 2015 5:05 am
- Location: Your monitor
- Contact:
Re: Imagebutton Instructions
You need at least an idle and a hover image for imagebutton.nananame wrote: ↑Wed Sep 30, 2020 12:14 pmhttps://www.renpy.org/doc/html/screens.html#imagebutton
Still used, still quite simple.
You can do the auto thing but the simplest instruction is:
Code: Select all
imagebutton: idle "images/someimage.png" #this is the button pos (20,50) #this is the x,y position of the button action NullAction() #what happens when you click the button, this means nothing will happen
Though originally created in 2013 and updated in 2017, this post still shows how imagebuttons work.
viewtopic.php?f=51&t=22565&start=75#p455107
Warning: May contain trace amounts of gratuitous plot.
pro·gram·mer (noun) An organism capable of converting caffeine into code.
Current project: GGD Mentor
Free Android GUI - Updated occasionally
Twitter
Imperf3kt Blackjack - a WIP blackjack game for Android made using Ren'Py
pro·gram·mer (noun) An organism capable of converting caffeine into code.
Current project: GGD Mentor
Free Android GUI - Updated occasionally
Imperf3kt Blackjack - a WIP blackjack game for Android made using Ren'Py
- Imperf3kt
- Lemma-Class Veteran
- Posts: 3636
- Joined: Mon Dec 14, 2015 5:05 am
- Location: Your monitor
- Contact:
Re: Imagebutton Instructions
Ah, you're right. I can't seem to find any mention of requiring both idle and hover in the official documentation or the tutorial game.
I think my confusion comes from https://fuckyeahrenpy.tumblr.com/post/9 ... -main-menu which I read about five years ago.
This only applies if you're using the "auto" property.You MUST have “idle” and “hover” in the file names for the button images or else they will NOT work properly!
Carry on!
Warning: May contain trace amounts of gratuitous plot.
pro·gram·mer (noun) An organism capable of converting caffeine into code.
Current project: GGD Mentor
Free Android GUI - Updated occasionally
Twitter
Imperf3kt Blackjack - a WIP blackjack game for Android made using Ren'Py
pro·gram·mer (noun) An organism capable of converting caffeine into code.
Current project: GGD Mentor
Free Android GUI - Updated occasionally
Imperf3kt Blackjack - a WIP blackjack game for Android made using Ren'Py
Who is online
Users browsing this forum: Google [Bot], TioNick