Page 1 of 1

Text Speed Preview?

Posted: Tue Mar 13, 2012 6:15 pm
by HigurashiKira
Just a quick question: is it possible to make a text speed preview? (As in, give a preview of how fast the text will move)

The clip is an example of what I mean

Re: Text Speed Preview?

Posted: Thu Mar 15, 2012 12:11 am
by PyTom
Yes, but not exactly like that.

The basics of a text speed menu is a second screen, something like:

Code: Select all

screen text_test:
    frame:
        xalign 0.5 yalign 0.5
        
        text "This is a test." slow_cps True
        
    timer 2.0 action Hide("text_test")
There are two key points here. The first is the slow_cps property. That controls text speed, and by setting it to True, it tells Ren'Py to make the speed of that text the user-selected speed.

The second thing is that this is a separate screen from preferences. This is because the number of characters displayed in a text box displayed inside a screen is controlled by the time since the screen the text is in was last shown. Showing the screen starts that counter from 0, allowing the text to slowly display. (If the text was part of preferences screen, it would never re-display.)

Finally, you want to add a button to preferences to show the text speed. Something like:

Code: Select all

    textbutton "Test Text Speed" action Show("text_test")
And that's it.