Is it possible to add outlines to button 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
crimsonnight
Veteran
Posts: 298
Joined: Fri Apr 20, 2012 4:44 am
Contact:

Is it possible to add outlines to button text?

#1 Post by crimsonnight »

If so how is it accomplished? I've tried the following in screens.rpy:

Code: Select all

init:
    $ my_c = [(3.3, "#087199", 0, 0)]

init -2 python:
    style.menu_choice.what_outlines = my_c
I've also placed the first half of the above in script.rpy - whenever I try to boot the game though it says 'my_c is not defined'. What am I doing wrong?

Thanks
alwaysthesamebluesky.com

philat
Eileen-Class Veteran
Posts: 1910
Joined: Wed Dec 04, 2013 12:33 pm
Contact:

Re: Is it possible to add outlines to button text?

#2 Post by philat »

Well, the init -2 block would be run before the init block, so...

User avatar
PyTom
Ren'Py Creator
Posts: 16096
Joined: Mon Feb 02, 2004 10:58 am
Completed: Moonlight Walks
Projects: Ren'Py
IRC Nick: renpytom
Github: renpytom
itch: renpytom
Location: Kings Park, NY
Contact:

Re: Is it possible to add outlines to button text?

#3 Post by PyTom »

Code: Select all

init -2:
    $ my_c = [(3.3, "#087199", 0, 0)]

init -2 python:
    style.menu_choice.outlines = my_c
would work. But

Code: Select all

style menu_choice:
    outlines [(3.3, "#087199", 0, 0)]
is probably more stylish.
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom
Software > Drama • https://www.patreon.com/renpytom

crimsonnight
Veteran
Posts: 298
Joined: Fri Apr 20, 2012 4:44 am
Contact:

Re: Is it possible to add outlines to button text?

#4 Post by crimsonnight »

Cheers Tom! :)
alwaysthesamebluesky.com

Post Reply

Who is online

Users browsing this forum: Baidu [Spider], Google [Bot]