Discuss how to use the Ren'Py engine to create visual novels and story-based games. New releases are announced in this section.
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.
-
sonejo
- Newbie
- Posts: 20
- Joined: Thu Jun 30, 2016 4:00 pm
-
Contact:
#1
Post
by sonejo » Thu Jun 30, 2016 4:07 pm
Hi Everybody,
How to disable the hover function of the screen buttons?
Thank in advance

-
xavimat
- Eileen-Class Veteran
- Posts: 1458
- Joined: Sat Feb 25, 2012 8:45 pm
- Completed: Yeshua, Jesus Life, Cops&Robbers
- Projects: Fear&Love, unknown
- Organization: Pilgrim Creations
- Github: xavi-mat
- itch: pilgrimcreations
- Location: Spain
-
Contact:
#2
Post
by xavimat » Thu Jun 30, 2016 6:21 pm
It depends on what is changing when you hover:
most elements can have a hover_whatever parameter defined.
With textbuttons it usually is the hover_background. If you define a background, the hover_background will be lost:
Code: Select all
textbutton _("Start Game") action Start() background "#fff8"
A different thing is the "hovered" action but I imagine you are not talking about this.
-
sonejo
- Newbie
- Posts: 20
- Joined: Thu Jun 30, 2016 4:00 pm
-
Contact:
#3
Post
by sonejo » Fri Jul 01, 2016 4:18 am
Hey xavimat,
thanks you for the answer.
Actually, my question might be the "hover" action: I'm looking for a command to disable the hover action on ALL textbuttons.
Is there something I could add in the theme options? something like theme.config.hovered = False ?
thank you!
-
xavimat
- Eileen-Class Veteran
- Posts: 1458
- Joined: Sat Feb 25, 2012 8:45 pm
- Completed: Yeshua, Jesus Life, Cops&Robbers
- Projects: Fear&Love, unknown
- Organization: Pilgrim Creations
- Github: xavi-mat
- itch: pilgrimcreations
- Location: Spain
-
Contact:
#4
Post
by xavimat » Fri Jul 01, 2016 4:08 pm
There is no "hovered" action in the textbuttons by default (IIRC).
Can you explain what exactly do you want to disable? The change of the background when the textbutton is hovered? The change of the text color for the same reason? (Actually, I'm not sure if there is a theme that does this, just imagining possibilities)
(I will be afk for a month from tomorrow, Surely someone else can answer you)
-
sonejo
- Newbie
- Posts: 20
- Joined: Thu Jun 30, 2016 4:00 pm
-
Contact:
#5
Post
by sonejo » Fri Jul 01, 2016 4:19 pm
My issue is the following:
I'm developing an app for a windows tablet. Sometimes the app is crashing while clicking on a button. I was wondering if the bug is coming from the tablet because there is no mouse (and therefore no hover). but when clicking once the button react with both actions: hover and click. Could it be possible that Renpy get confused doing both actions at the same time?
all the best
-
gas
- Miko-Class Veteran
- Posts: 838
- Joined: Mon Jan 26, 2009 7:21 pm
-
Contact:
#6
Post
by gas » Fri Jul 01, 2016 4:25 pm
No, there's nothing so declarative. You can "fake" hovering by style, but actually it happen.
You want to change the app to behave like a.. touch app.
When compiling the game, choose "Tablet" from the Android screen of the launcher.
In a windows tablet, everything must work as intended, automatically. But you want to create screens with the TABLET variant.
If this doesn't work, is a bug. Use the bug section of the forum for pertinent replies

.
If you want to debate on a reply I gave to your posts, please QUOTE ME or i'll not be notified about. << now red so probably you'll see it.
10 ? "RENPY"
20 GOTO 10
RUN
-
xavimat
- Eileen-Class Veteran
- Posts: 1458
- Joined: Sat Feb 25, 2012 8:45 pm
- Completed: Yeshua, Jesus Life, Cops&Robbers
- Projects: Fear&Love, unknown
- Organization: Pilgrim Creations
- Github: xavi-mat
- itch: pilgrimcreations
- Location: Spain
-
Contact:
#7
Post
by xavimat » Fri Jul 01, 2016 4:39 pm
I made an android app and the buttons hover and click without problem (hover when touching, click when releasing). So maybe the problem is elsewhere.
Btw, have you tried the solution i gave you in my first answer?
If the hover that is happening is the change of the background, maybe the hover_background is defined to a non existent image. That could be the problem. If you define a background, the hover_background should simply disappear. Or you can define hover_background as the same as idle_background.