Page 1 of 1

Creating a button for self-voicing

Posted: Fri May 14, 2021 6:22 am
by Kinmoku
Hi all,

I need to remove the key binding (v) for self voicing, as there's a moment in my game where the player needs to press v for another reason...
So instead of removing the accessibility feature, is it possible to create a button in preferences where the player can switch this on if they want? I'm probably being dumb here, but I've no idea what the action would be and I can't seem to find anything in the doc or on the forums.

Thanks in advance :)

Re: Creating a button for self-voicing

Posted: Fri May 14, 2021 3:31 pm
by midgethetree
Something like

Code: Select all

label _("Self-Voicing")

textbutton _("Off"):
    action Preference("self voicing", "disable")
    alt _("self voicing off")

textbutton _("Text-to-speech"):
    action Preference("self voicing", "enable")

textbutton _("Clipboard"):
    action Preference("clipboard voicing", "enable")
will do the trick, or just

Code: Select all

textbutton _("Self-Voicing"):
    action Preference("self voicing", "toggle")
if you really just want one button and don't care about clipboard voicing (which allows Renpy's text-to-speech to be used with the player's preferred third-party screenreader, as I understand it).

That said, just adding a button in your settings menu is not enough to make up for removing the "v" keybinding. I remember reading an article from a blind person who plays visual novels, and they said if they don't hear anything after opening a Ren'Py game and pressing "v" they assume the VN doesn't support text-to-speech at all and give up on it. TTS is not a common game feature outside of Ren'Py games, so it's easy to assume there isn't any button for it in the settings menu, and even if they somehow know there is a button (and not everyone carefully reads everything about a game before downloading, so it's hard to guarantee they do know) they might not want/be able to get a sighted person to help them navigate to that button.

Is it really important that the keybinding for that moment be "v"? Would it work if you could have "v" turn on/off self-voicing except for in that moment?