[solved] Textbutton color is the same color as text?

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
Carter
Newbie
Posts: 7
Joined: Thu Mar 24, 2022 4:59 pm
Contact:

[solved] Textbutton color is the same color as text?

#1 Post by Carter » Mon Mar 28, 2022 11:44 am

For some reason the one of my buttons is the same color as the text, and I'm not sure why. It still acts like a button but it doesn't highlight when the cursor is over it.


Image

The code for this screen is pretty simple, a little messy sure but i don't get what could possibly be causing this:

Code: Select all

screen observationlist:

    frame:
        xpos 50 ypos 50
        vbox:
            text "Select an observation"
            textbutton observations[0] action [SetVariable("selectedobs1", 0), Hide("observationlist"), Show("observationlist2")]
            textbutton observations[1] action [SetVariable("selectedobs1", 1), Hide("observationlist"), Show("observationlist2")]
            textbutton observations[2] action [SetVariable("selectedobs1", 2), Hide("observationlist"), Show("observationlist2")]
            textbutton observations[3] action [SetVariable("selectedobs1", 3), Hide("observationlist"), Show("observationlist2")]
            textbutton observations[4] action [SetVariable("selectedobs1", 4), Hide("observationlist"), Show("observationlist2")]
            textbutton observations[5] action [SetVariable("selectedobs1", 5), Hide("observationlist"), Show("observationlist2")]
            textbutton observations[6] action [SetVariable("selectedobs1", 6), Hide("observationlist"), Show("observationlist2")]
            textbutton "Return" action [Hide("observationlist"), Return()]
Does anyone know what's going on here?
Last edited by Carter on Mon Mar 28, 2022 1:04 pm, edited 1 time in total.

User avatar
Ocelot
Eileen-Class Veteran
Posts: 1882
Joined: Tue Aug 23, 2016 10:35 am
Github: MiiNiPaa
Discord: MiiNiPaa#4384
Contact:

Re: Textbutton color is the same color as text?

#2 Post by Ocelot » Mon Mar 28, 2022 12:07 pm

This is selected button. In your case it is because [selectedobs1 variable already has value of 0.

If you do not want that, slap selected False property on your textbuttons
< < insert Rick Cook quote here > >

Carter
Newbie
Posts: 7
Joined: Thu Mar 24, 2022 4:59 pm
Contact:

Re: Textbutton color is the same color as text?

#3 Post by Carter » Mon Mar 28, 2022 1:04 pm

Ocelot wrote:
Mon Mar 28, 2022 12:07 pm
This is selected button. In your case it is because [selectedobs1 variable already has value of 0.

If you do not want that, slap selected False property on your textbuttons
I see! I never even thought about that
thank you!

Post Reply

Who is online

Users browsing this forum: Google [Bot]