I've been meaning ask this for a bit, but are the Tooltip functions not working?
I usually want this in my game to give description to what you're hovering over, but every time i try to copy the code, or do my research about how it works, it never does?
I don't get an error from the game itself, but the program i code in tells me that it's outdated or obsolete. And when i try it out, it just doesn't come up?
Is this a problem only i'm facing, and is there a solution to it?
Tooltips being obsolete
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.
- m_from_space
- Eileen-Class Veteran
- Posts: 1011
- Joined: Sun Feb 21, 2021 3:36 am
- Contact:
Re: Tooltips being obsolete
Tooltips are working fine. Maybe you might wanna show how you implemented the feature.
Hmm, what program? Maybe you're talking about the Tooltip class, which is obsolete.I don't get an error from the game itself, but the program i code in tells me that it's outdated or obsolete.
In stable Renpy tooltips work like this:
Code: Select all
screen myscreen():
$ tt = GetTooltip() or "(Tooltips are visible here.)"
vbox:
textbutton "Button 1" action NullAction() tooltip "Do nothing."
textbutton "Button 2" action Hide() tooltip "Close this screen."
text tt
Re: Tooltips being obsolete
m_from_space wrote: ↑Sat Jan 27, 2024 9:49 am Hmm, what program? Maybe you're talking about the Tooltip class, which is obsolete.
Sounds like VSC (Visual Studio Code). If you have an old project with - let's say - LiveComposite (nowadays it is just called Composite) it will tell you that it is outdated.
Re: Tooltips being obsolete
Like, the code i've been using? I've been using something from the document.m_from_space wrote: ↑Sat Jan 27, 2024 9:49 am Maybe you might wanna show how you implemented the feature.
Code: Select all
screen tooltip_example():
vbox:
textbutton "North":
action Return("n")
tooltip "To meet a polar bear."
textbutton "South":
action Return("s")
tooltip "All the way to the tropics."
textbutton "East":
action Return("e")
tooltip "So we can embrace the dawn."
textbutton "West":
action Return("w")
tooltip "Where to go to see the best sunsets."
$ tooltip = GetTooltip()
if tooltip:
text "[tooltip]"
Code: Select all
screen coat_menu():
hbox:
align(0.18,0.88)
imagebutton:
idle "coat"
hover "coat_hover"
action Jump("coatfound")
- m_from_space
- Eileen-Class Veteran
- Posts: 1011
- Joined: Sun Feb 21, 2021 3:36 am
- Contact:
Re: Tooltips being obsolete
Code looks fine to me. So what's not working? Tooltips not showing at all?
Make sure that the text object, that's actually showing the tooltip is not hidden by something else and has a font-color that's not matching the background (e.g. you're not going to see black text on black background). In the example the tooltip should appear below the "West" button.
Who is online
Users browsing this forum: Google [Bot]