Search found 337 matches

by henvu50
Fri Aug 27, 2021 1:09 pm
Forum: Ren'Py Questions and Announcements
Topic: [Solved] How to get the screen x & y position of a displayable?
Replies: 7
Views: 828

Re: How to get the screen x & y position of a displayable?

Currently my tooltip is in a fixed location. I wanted to create an improved tooltip that shows up near the displayable it's hovering over, dynamically. For now, I do this manually. I place a tooltip like text displayable near the button manually. The problem with this, is if I change the design of t...
by henvu50
Thu Aug 26, 2021 1:53 pm
Forum: Ren'Py Questions and Announcements
Topic: [Solved] How to get the screen x & y position of a displayable?
Replies: 7
Views: 828

[Solved] How to get the screen x & y position of a displayable?

edit: Thanks to Alex & Philat. Scroll down to alex's post for the solution. Solution: renpy.focus_coordinates() # returns (x, y, w, h) of focused displayable https://www.renpy.org/doc/html/other.html#renpy.focus_coordinates I'm very close. I'm trying to get the xpos & ypos of the textbutton....
by henvu50
Thu Aug 26, 2021 12:15 pm
Forum: Ren'Py Questions and Announcements
Topic: [Solved] Can I use renpy.variant('small') instead of renpy.variant('mobile'), touch, pc, web?
Replies: 3
Views: 680

[Solved] Can I use renpy.variant('small') instead of renpy.variant('mobile'), touch, pc, web?

Edit: solutions in comments below. For the sake of keeping things simple. Instead of doing this: if renpy.variant('mobile') or renpy.variant('touch'): #or if renpy.variant('pc') or renpy.variant('web'): [code] Can I get away with using this instead in 99% of cases? If this returns true, I know it ha...
by henvu50
Tue Aug 24, 2021 2:06 pm
Forum: Ren'Py Questions and Announcements
Topic: [Solved] Tooltips flash for a split second when button tapped on mobile.
Replies: 8
Views: 753

Re: [Solved] Tooltips flash for a split second when button tapped on mobile.

Just an FYI. I can't get Alex's code to work when using transclusion (USE statement).... Not tested, but you could try to show a tooltip text at some transform, like transform tt_transform(): alpha 0.0 0.4 alpha 1.0 if tooltip: text "[tooltip]" at tt_transform That worked very well. This ...
by henvu50
Tue Aug 24, 2021 1:19 pm
Forum: Ren'Py Questions and Announcements
Topic: [Solved] Tooltips flash for a split second when button tapped on mobile.
Replies: 8
Views: 753

Re: [Solved] Tooltips flash for a split second when button tapped on mobile.

Just an FYI. I can't get Alex's code to work when using transclusion (USE statement). For example, the tooltip & timer trick doesn't work here for some reason because the screen is being called via use: screen testA(): text 'hi' use tooltip_example screen tooltip_example(): default flag = False ...
by henvu50
Tue Aug 24, 2021 12:22 pm
Forum: Ren'Py Questions and Announcements
Topic: [Solved] Tooltips flash for a split second when button tapped on mobile.
Replies: 8
Views: 753

Re: Tooltips flash for a split second when button tapped on mobile.

If you press and hold a button on mobile, the tooltip shows correctly. It's quite helpful, but if you tap the button real fast, the tooltip will flash for a split second which is kind of annoying. Anyone know a solution where I can keep the tooltips on mobile, but not have it flash if the button ta...
by henvu50
Tue Aug 24, 2021 11:43 am
Forum: Ren'Py Questions and Announcements
Topic: [Solved] Tooltips flash for a split second when button tapped on mobile.
Replies: 8
Views: 753

Re: Tooltips flash for a split second when button tapped on mobile.

Tool tips activate on the hover event. If you only tap, you aren't hovering. One solution I can think of might be to use the legacy tool tip listed in the documentation. When I simulate Android Phone via renpy, a click (simulating a tap) will trigger the tooltip to show for a split second. Are you ...
by henvu50
Mon Aug 23, 2021 7:16 pm
Forum: Ren'Py Questions and Announcements
Topic: [Solved] Tooltips flash for a split second when button tapped on mobile.
Replies: 8
Views: 753

[Solved] Tooltips flash for a split second when button tapped on mobile.

If you press and hold a button on mobile, the tooltip shows correctly. It's quite helpful, but if you tap the button real fast, the tooltip will flash for a split second which is kind of annoying. Anyone know a solution where I can keep the tooltips on mobile, but not have it flash if the button tap...
by henvu50
Sat Aug 21, 2021 2:13 pm
Forum: Ren'Py Questions and Announcements
Topic: [Solved] hover_background None doesn't work in style navigation_button: variant('small')
Replies: 1
Views: 465

[Solved] hover_background None doesn't work in style navigation_button: variant('small')

EDIT: [Solved] It's because the styles were in different rpy files. I split up screens.rpy into multiple sub rpy files to organize, but that was causing the background to not get set in the variant small version. As soon as I copied the style navigation button variant small to the same rpy file that...
by henvu50
Sat Aug 21, 2021 4:25 am
Forum: Ren'Py Questions and Announcements
Topic: How can you change specific style text size at runtime?
Replies: 5
Views: 675

Re: How can you change specific style text size at runtime?

I assumed the default would be whatever is in the screens.rpy. So, if you set a default size of 33 in the screens.rpy file, then that should be the default. Then when you register an alternative style, it doesn't kick in until you set it. If you have to register your own default stylepreference, the...
by henvu50
Fri Aug 20, 2021 6:14 pm
Forum: Ren'Py Questions and Announcements
Topic: How can you change specific style text size at runtime?
Replies: 5
Views: 675

Re: How can you change specific style text size at runtime?

The proper way would probably be to register alternatives for selected styles and then changing it with set_style_preference https://www.renpy.org/doc/html/style.html#style-preferences Or use GUI preferences: https://www.renpy.org/doc/html/gui_advanced.html#gui-preferences Thanks! I'm trying the St...
by henvu50
Fri Aug 20, 2021 5:16 pm
Forum: Ren'Py Questions and Announcements
Topic: How can you change specific style text size at runtime?
Replies: 5
Views: 675

How can you change specific style text size at runtime?

How can you change specific style text size at runtime? I tried this code, but it doesn't actually make the text bigger. def func_text_size_adjust(): print gui.text_size #style.default.size = 99 style.default.size = 99 style.radio_button_text.size = 99 #style.rebuild() gui.rebuild() (I know about th...
by henvu50
Tue Aug 17, 2021 2:29 am
Forum: Ren'Py Questions and Announcements
Topic: How can I set a navigation button's ysize & xalign from gui.rpy, via button properties?
Replies: 1
Views: 510

How can I set a navigation button's ysize & xalign from gui.rpy, via button properties?

I can't set a navigation button's ysize & xalign from gui.rpy, but if I add ysize & xalign to the style directly, it works. #gui.rpy define gui.navigation_button_ysize = 50 #can't get this to work define gui.navigation_button_xalign = 0.5 #can't get this to work #screens.rpy style navigation...
by henvu50
Sat Aug 14, 2021 10:25 pm
Forum: Ren'Py Questions and Announcements
Topic: How to completely disable saving, loading, preferences?
Replies: 1
Views: 677

Re: How to completely disable saving, loading, preferences?

Open screens.rpy All the main menu buttons are in screen preferences, you can delete them or set each button's sensitive status to False, which will disable it, turning it grey (inactive, unclickable) # screens.rpy screen preferences: #.. all the main menu buttons are here # like this one if not mai...