how to set ruby text color inside an ui.label()?

In this forum we discuss the future of Ren'Py, both bug fixes and longer-term development. Pre-releases are announced and discussed here.
Post Reply
Message
Author
iichan_lolbot
Veteran
Posts: 205
Joined: Tue Dec 30, 2008 9:18 am
Projects: iichan erogame
Contact:

how to set ruby text color inside an ui.label()?

#1 Post by iichan_lolbot » Sun Jun 04, 2017 1:18 pm

I have tried both

Code: Select all

ui.label("赤{rt}あか{/rt}い",text_color="#f00")
and

Code: Select all

ui.label("{color=#f00}赤{rt}あか{/rt}い{/color}")
.
Neither works for me with RenPy 6.99.11.

iichan_lolbot
Veteran
Posts: 205
Joined: Tue Dec 30, 2008 9:18 am
Projects: iichan erogame
Contact:

Re: how to set ruby text color inside an ui.label()?

#2 Post by iichan_lolbot » Mon Jun 05, 2017 4:41 pm

Found a workaround patch.

At renpy/text/text.py, replace

Code: Select all

                ts.take_style(style.ruby_style, self)
with

Code: Select all

                color_style = ts.color
                ts.take_style(style.ruby_style, self)
                ts.color = color_style
There is already a workaround for ts.vertical, so why not...

Post Reply

Who is online

Users browsing this forum: No registered users