[Solved] Changing Textbutton Color

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
User avatar
XxrenxX
Veteran
Posts: 265
Joined: Tue Oct 02, 2012 2:40 am
Projects: Chasing
Deviantart: bara-ettie
Location: Canada
Contact:

[Solved] Changing Textbutton Color

#1 Post by XxrenxX » Tue Nov 05, 2019 2:47 pm

Having some trouble changing colours for a textbutton. I changed the colours in GUI as well as the style for said button but nothing is changing and I have no idea where it's grabbing the code from.

This is the button:

Code: Select all

textbutton "Example" action ShowMenu("notes_example") style "notes_button"

style notes_button is gui_text:
    properties gui.text_properties("button")
    xoffset 30
    xsize 365 ysize 55
this is the GUI:

Code: Select all

define gui.button_text_idle_color =  '#cb9dea'
define gui.button_text_hover_color = '#9d6cbf'
define gui.button_text_selected_color = '#9d6cbf'
define gui.button_text_insensitive_color =  '#cb9dea'
I've deleted persistent data multiple times and gone through all my RPY files and cannot find the issue. I even deleted the cache cause why not.
Attachments
Renpy_I.jpg
screenshot0001.png
How the text is appearing
Last edited by XxrenxX on Tue Nov 05, 2019 3:27 pm, edited 1 time in total.

User avatar
XxrenxX
Veteran
Posts: 265
Joined: Tue Oct 02, 2012 2:40 am
Projects: Chasing
Deviantart: bara-ettie
Location: Canada
Contact:

Re: Changing Textbutton Color

#2 Post by XxrenxX » Tue Nov 05, 2019 3:27 pm

Created a temp fix but takes more space than I'd like. Made the background frame the button and put text on top.

Code: Select all

viewport:
                scrollbars "vertical"
                mousewheel True
                draggable True

                vbox:
                    button:
                        imagemap:
                            ground "GUI/Phone/Note_Frame.png"
                            hover "GUI/Phone/Note_Frame_H.png"
                            hotspot (0, 0, 365, 55) action ShowMenu("notes_textimages")
                            text "Text Images" style "notes_button"
                    button:
                        imagemap:
                            ground "GUI/Phone/Note_Frame.png"
                            hover "GUI/Phone/Note_Frame_H.png"
                            hotspot (0, 0, 365, 55) action ShowMenu("notes_example")
                            text "Example" style "notes_button"

style notes_button:
    color "#9d6cbf"
    size 33
    xoffset 30 yalign 0.5
    xsize 365 ysize 55
Attachments
screenshot0002.png

Post Reply

Who is online

Users browsing this forum: No registered users