How to change color of text in history log?

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
salceous
Newbie
Posts: 19
Joined: Sun Apr 09, 2017 12:12 pm
itch: shuttt
Contact:

How to change color of text in history log?

#1 Post by salceous »

So when you click "History" and the history log of everything the characters have said shows up, the color of the text is grey. It's hard to see against the red background, so is there a way to turn the font to gold or white? I'll post my code below, which is pretty much the default code that Ren'Py gave me in the beginning. Not sure how much I need to post, so I'll just post the entire history code.

Code: Select all

screen history():

    tag menu

    ## Avoid predicting this screen, as it can be very large.
    predict False

    use game_menu(_("History"), scroll=("vpgrid" if gui.history_height else "viewport")):

        style_prefix "history"

        for h in _history_list:

            window:

                ## This lays things out properly if history_height is None.
                has fixed:
                    yfit True

                if h.who:

                    label h.who:
                        style "history_name"

                        ## Take the color of the who text from the Character, if
                        ## set.
                        if "color" in h.who_args:
                            text_color h.who_args["color"]

                text h.what

        if not _history_list:
            label _("The dialogue history is empty.")


style history_window is empty

style history_name is gui_label
style history_name_text is gui_label_text
style history_text is gui_text

style history_text is gui_text

style history_label is gui_label
style history_label_text is gui_label_text

style history_window:
    xfill True
    ysize gui.history_height

style history_name:
    xpos gui.history_name_xpos
    xanchor gui.history_name_xalign
    ypos gui.history_name_ypos
    xsize gui.history_name_width

style history_name_text:
    min_width gui.history_name_width
    text_align gui.history_name_xalign

style history_text:
    xpos gui.history_text_xpos
    ypos gui.history_text_ypos
    xanchor gui.history_text_xalign
    xsize gui.history_text_width
    min_width gui.history_text_width
    text_align gui.history_text_xalign
    layout ("subtitle" if gui.history_text_xalign else "tex")

style history_label:
    xfill True

style history_label_text:
    xalign 0.5
Help much appreciated!

User avatar
Per K Grok
Miko-Class Veteran
Posts: 882
Joined: Fri May 18, 2018 1:02 am
Completed: the Ghost Pilot, Sea of Lost Ships, Bubbles and the Pterodactyls, Defenders of Adacan Part 1-3, the Phantom Flyer
itch: per-k-grok
Location: Sverige
Contact:

Re: How to change color of text in history log?

#2 Post by Per K Grok »

salceous wrote: Mon Aug 13, 2018 12:30 pm So when you click "History" and the history log of everything the characters have said shows up, the color of the text is grey. It's hard to see against the red background, so is there a way to turn the font to gold or white?

text h.what color "#FFD700"

should do the trick I think.

salceous
Newbie
Posts: 19
Joined: Sun Apr 09, 2017 12:12 pm
itch: shuttt
Contact:

Re: How to change color of text in history log?

#3 Post by salceous »

Per K Grok wrote: Mon Aug 13, 2018 1:02 pm
salceous wrote: Mon Aug 13, 2018 12:30 pm So when you click "History" and the history log of everything the characters have said shows up, the color of the text is grey. It's hard to see against the red background, so is there a way to turn the font to gold or white?

text h.what color "#FFD700"

should do the trick I think.
Yeah, that did the trick. Thank you!

Post Reply

Who is online

Users browsing this forum: Andredron