[Solved] Changing color of text for the notify function.

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
SpicyMayo1429
Regular
Posts: 36
Joined: Tue Mar 20, 2018 11:23 am
Contact:

[Solved] Changing color of text for the notify function.

#1 Post by SpicyMayo1429 »

I've gotten the function to work, but since I've updated versions I can't seem to figure out how to change the color of the text for the notify function. I only want specific parts to have a different color, not the whole thing.

Here's the code that I initially used :

Code: Select all

$ renpy.notify('Keypoint unlocked: {color=#ff0000}Erotica{/color}') ## Here is the notification that shows on screen. 
## The color tag should change the color of text within the tag.
    ## This is what we are unlocking. Keypoint 1: Erotica
    $ persistent.unlock_tip_1 = True ## This triggers the unlocking system so it is now accessible in the menu.
It worked fine in version 6.99.8 but now it'll show the tag in the notification instead of changing color.

Code: Select all

Keypoint unlocked: {color=#ff0000}Erotica{/color}
Last edited by SpicyMayo1429 on Wed Mar 13, 2019 11:01 pm, edited 1 time in total.

User avatar
wyverngem
Miko-Class Veteran
Posts: 615
Joined: Mon Oct 03, 2011 7:27 pm
Completed: Simple as Snow, Lady Luck's Due,
Projects: Aether Skies, Of the Waterfall
Tumblr: casting-dreams
itch: castingdreams
Location: USA
Contact:

Re: Changing color of text for the notify function.

#2 Post by wyverngem »

Find this in your screens code

Code: Select all

screen notify(message):

    zorder 100
    style_prefix "notify"

    frame at notify_appear:
        text "[message!tq]"

    timer 3.25 action Hide('notify')
See [message!tq] change it to [message] and it works for me again.

User avatar
SpicyMayo1429
Regular
Posts: 36
Joined: Tue Mar 20, 2018 11:23 am
Contact:

Re: Changing color of text for the notify function.

#3 Post by SpicyMayo1429 »

wyverngem wrote: Wed Mar 13, 2019 10:55 pm Find this in your screens code

Code: Select all

screen notify(message):

    zorder 100
    style_prefix "notify"

    frame at notify_appear:
        text "[message!tq]"

    timer 3.25 action Hide('notify')
See [message!tq] change it to [message] and it works for me again.
It worked, thanks!!

Post Reply

Who is online

Users browsing this forum: Google [Bot]