New tooltip class and imagebuttons
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.
- Bruni Multimedia
- Regular
- Posts: 114
- Joined: Mon May 15, 2017 12:23 pm
- Projects: Yomi Alliance
- Organization: Bruni Multimedia
- itch: brunimultimedia
- Contact:
New tooltip class and imagebuttons
Ren'Py documentation has an example of the new Tooltip class recently introduced with a textbutton.
I tried to do the same with imagebuttons but it doesn't work (nor does it give any error).
Does the new class work with imagebuttons?
I tried to do the same with imagebuttons but it doesn't work (nor does it give any error).
Does the new class work with imagebuttons?
Re: New tooltip class and imagebuttons
Renpy textbook (in Russian). https://disk.yandex.ru/i/httNEajU7iFWHA (all information is out of date) Update 22.06.18
Sawa - a game of the Drow Nation
Honest Critique
Poses in visual novels, or how to hold a character properly in the frame
Help save articles to the webarchive. [/color]
Sawa - a game of the Drow Nation
Honest Critique
Poses in visual novels, or how to hold a character properly in the frame
Help save articles to the webarchive. [/color]
Re: New tooltip class and imagebuttons
Working fine for me, maybe a bug in most recent release? I'm still using stable 6.99.14.1.
Code: Select all
screen tooltip_test():
frame:
xalign .5 yalign .5
has vbox
imagebutton auto "gui/tbutton_%s.png":
action Return()
tooltip "Testing imagebutton."
textbutton "Test":
action Return()
tooltip "Testing textbutton"
$ tt = GetTooltip() #I've noticed this variable can't be declared with default, is this intended?
if tt:
text "[tt]"
- Imperf3kt
- Lemma-Class Veteran
- Posts: 3794
- Joined: Mon Dec 14, 2015 5:05 am
- itch: Imperf3kt
- Location: Your monitor
- Contact:
Re: New tooltip class and imagebuttons
You can still use the old tooltip way. I prefer it myself, its easier to understand.
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
- Bruni Multimedia
- Regular
- Posts: 114
- Joined: Mon May 15, 2017 12:23 pm
- Projects: Yomi Alliance
- Organization: Bruni Multimedia
- itch: brunimultimedia
- Contact:
- Bruni Multimedia
- Regular
- Posts: 114
- Joined: Mon May 15, 2017 12:23 pm
- Projects: Yomi Alliance
- Organization: Bruni Multimedia
- itch: brunimultimedia
- Contact:
Re: New tooltip class and imagebuttons
Ok, it seems to work.
https://www.renpy.org/doc/html/changelog.html
According to changelog we should be able to default it though:
https://www.renpy.org/doc/html/changelog.html
Code: Select all
default tt = Tooltip("No button selected.")
textbutton "One.":
action Return(1)
hovered tt.Action("The loneliest number.")
text tt.value
Last edited by Bruni Multimedia on Tue Mar 06, 2018 5:35 am, edited 1 time in total.
Re: New tooltip class and imagebuttons
I see now, I was trying to default it inside the screen, as a screen variable, my bad. Thanks!According to changelog we should be able to default it though
- 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: New tooltip class and imagebuttons
One advantage the old tooltip way has is that you can have different elements activate different tooltips, or even have one element activate several tooltips at once. With the new way, you have to crunch all tooltips into one comprehensive string and then parse it.
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)
Who is online
Users browsing this forum: 3N16M4, Bing [Bot], Google [Bot]