Optional ruby text (toggle)

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
koiriko
Newbie
Posts: 1
Joined: Sat Dec 30, 2017 11:54 am
Contact:

Optional ruby text (toggle)

#1 Post by koiriko »

Hello all, and thank you for making this amazing site!

Perhaps you can help me :)

I will have lots of ruby text in my game, and I would like the player to have an option to *show* or *hide* all of it (ruby text).
Is this possible? If so, what would be the best way to go about it it?
(Best scenario would be a toggle visible during dialogue in the menu. A single click would reveal/hide all ruby text.)

The little project I'm working on aims to help folks in language learning, so that's why this feature would be very valuable.

Code: Select all

init python:
    style.default.line_leading = 12

    style.ruby_style = Style(style.default)
    style.ruby_style.size = 10
    style.ruby_style.yoffset = -20

    style.default.ruby_style = style.ruby_style
Thank you :)

User avatar
Ocelot
Lemma-Class Veteran
Posts: 2384
Joined: Tue Aug 23, 2016 10:35 am
Github: MiiNiPaa
Discord: MiiNiPaa#4384
Contact:

Re: Optional ruby text (toggle)

#2 Post by Ocelot »

How about setting text alpha to be completely transparent? It would mak affected text invisible.
< < insert Rick Cook quote here > >

Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot], Google [Bot]