I'd like some small text to show up when clicking on an image button. Sounds simple enough, but I can't figure it out.
something simple as:
p "I can't do that right now."
Have text show with imagebutton click?
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.
Re: Have text show with imagebutton click?
You can use Notify screen action.
Code: Select all
imagebutton idle "button.png":
action Notify("I can't do that right now.")
- Imperf3kt
- Lemma-Class Veteran
- Posts: 3794
- Joined: Mon Dec 14, 2015 5:05 am
- itch: Imperf3kt
- Location: Your monitor
- Contact:
Re: Have text show with imagebutton click?
I'd do it differently. "I can't do that right now" doesn't really belong in a notify window, but a say window, unless its an information blurb.
In any case, here's one way to do it.
Try this:
In any case, here's one way to do it.
Try this:
Code: Select all
screen my_button():
modal False
hbox:
xpos #
ypos #
imagebutton blah blah action Call("beam_me_up_scottie")
label start:
e "I'm talking"
show screen my_button
return
label beam_me_up_scottie:
P "I can't do that right now."
return
Warning: May contain trace amounts of gratuitous plot.
pro·gram·mer (noun) An organism capable of converting caffeine into code.
Current project: GGD Mentor
Twitter
pro·gram·mer (noun) An organism capable of converting caffeine into code.
Current project: GGD Mentor
- Milkymalk
- Miko-Class Veteran
- Posts: 753
- Joined: Wed Nov 23, 2011 5:30 pm
- Completed: Don't Look (AGS game)
- Projects: KANPEKI! ★Perfect Play★
- Organization: Crappy White Wings
- Location: Germany
- Contact:
Re: Have text show with imagebutton click?
Agreed. Notify should be used for system messages, like "screenshot taken" or "quicksave done".
Crappy White Wings (currently quite inactive)
Working on: KANPEKI!
(On Hold: New Eden, Imperial Sea, Pure Light)
Working on: KANPEKI!
(On Hold: New Eden, Imperial Sea, Pure Light)
Re: Have text show with imagebutton click?
That was some big help! But I do have a problem... The last "scene" picture I used takes place of the screen and imagebuttons oddly enough. I don't really know how to avoid that. Once I hit enter to pass the text I put in, it goes back to the screen, but I can't have it work unless I specifically tell it to show the screen image and imagebutton image within the label.
Hope that makes sense.
Hope that makes sense.
Re: Have text show with imagebutton click?
My apologies, when you said small text I misunderstood thinking you wanted to show a small information blurb, didn't realize you wanted a dialogue window, even though I should have, thank you Milkymalk and Imperfekt I completely agree, again I'm really sorry .
Who is online
Users browsing this forum: Sugar_and_rice