itch.io is community of indie game creators and players

Devlogs

Added Preferences Sample Code!

Speech Pauses for Ren'Py
A downloadable Plugin

Wow, thank you so much for the support, everyone!

I didn't expect to reach the donation goal so quickly, but here we are: Some sample code for your preferences screen!

You don't necessarily have to download speech_pauses_screens.rpy and can just get the code here:

vbox:
    style_prefix "radio"
    textbutton _("Speech Pauses") action ToggleField(persistent,"speech_pauses")
    showif persistent.speech_pauses:
        vbox at expander:
            style_prefix "slider"
            label _("Commas")
            bar value FieldValue(persistent, "speech_pause_comma", step=.05, style=u'slider', min=0.05, max=1.0)
            label _("Sentences")
            bar value FieldValue(persistent, "speech_pause_period", step=.05, style=u'slider', min=0.1, max=2.0)

Simply place the above vbox where you want it in your preferences screen (with the right indentation level), and you should be good to go!

transform expander(y=90):
    on show:
        alpha 0 yoffset -y
        easein 0.3 alpha 1 yoffset 0
    on hide:
        alpha 1 yoffset 0
        easein 0.3 alpha 0 yoffset -y

The optional "expander" transform simply shows and hides the sliders whenever the main preference is toggled. (If you don't use it, also make sure to remove "at expander" from the vbox above!)

Of course, feel free to modify any of this however you like.

Thank you again, and happy speech pausing!

Files

  • speech_pauses_screen.rpy 1.6 kB
    Feb 02, 2025
Download Speech Pauses for Ren'Py
Read comments (3)