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.
Have text show with imagebutton click?
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."
something simple as:
p "I can't do that right now."
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: 3636
- Joined: Mon Dec 14, 2015 5:05 am
- 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."
returnWarning: 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
- Milkymalk
- Miko-Class Veteran
- Posts: 752
- 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: No registered users