[Solved] idle_background and hover_background don't seem to work

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.
Post Reply
Message
Author
sevenshrubs
Newbie
Posts: 2
Joined: Fri Dec 08, 2017 11:04 am
Contact:

[Solved] idle_background and hover_background don't seem to work

#1 Post by sevenshrubs »

Hello Everyone!

I can't make idle_background and hover_background style properties work for Button. If I just set background property, it works as expected, but idle_ and hover_ do nothing and the button is just transparent. What am I doing wrong?
Here's the sample code that doesn't work:

Code: Select all

screen test:
    button:
        idle_background Solid("#000000")
        hover_background Solid("#FFFF00")
        text "something"
Last edited by sevenshrubs on Fri Dec 08, 2017 11:53 am, edited 1 time in total.

Nero
Veteran
Posts: 248
Joined: Tue Aug 09, 2016 2:59 pm
Contact:

Re: idle_background and hover_background don't seem to work

#2 Post by Nero »

This happens because your button does not have any action or purpose so it is "not active" you need to give it some action for example I gave it NullAction() this will make button appear active but when you press it nothing will happen.

Code: Select all

    screen test:
        button:
            idle_background Solid("#000000")
            hover_background Solid("#FFFF00")
            action NullAction()
            text "something"

sevenshrubs
Newbie
Posts: 2
Joined: Fri Dec 08, 2017 11:04 am
Contact:

Re: idle_background and hover_background don't seem to work

#3 Post by sevenshrubs »

Thanks so much! There's a lot of not-immediately-obvious-stuff to learn!

Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot], Google [Bot]