diff options
author | Jaromir Wysoglad | 2019-07-29 12:16:21 +0200 |
---|---|---|
committer | Filippos Karapetis | 2019-09-01 22:47:55 +0300 |
commit | f89ca9ad5c28731b5a95525eb220d43fca55d14b (patch) | |
tree | a0cc38daeca462280a30735725551fa611d490d7 | |
parent | 59631627c8e21fceeeb53b6a75853a5be6c273a7 (diff) | |
download | scummvm-rg350-f89ca9ad5c28731b5a95525eb220d43fca55d14b.tar.gz scummvm-rg350-f89ca9ad5c28731b5a95525eb220d43fca55d14b.tar.bz2 scummvm-rg350-f89ca9ad5c28731b5a95525eb220d43fca55d14b.zip |
TTS: Add tooltip reading when they appear.
-rw-r--r-- | gui/Tooltip.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/gui/Tooltip.cpp b/gui/Tooltip.cpp index dfa1d54ec7..9d34fd4593 100644 --- a/gui/Tooltip.cpp +++ b/gui/Tooltip.cpp @@ -54,6 +54,15 @@ void Tooltip::setup(Dialog *parent, Widget *widget, int x, int y) { _x = MIN<int16>(parent->_x + x + _xdelta, g_gui.getWidth() - _w - 3); _y = MIN<int16>(parent->_y + y + _ydelta, g_gui.getHeight() - _h - 3); +#ifdef USE_TTS + if (ConfMan.hasKey("tts_enabled", "scummvm") && + ConfMan.getBool("tts_enabled", "scummvm")) { + Common::TextToSpeechManager *ttsMan = g_system->getTextToSpeechManager(); + if (ttsMan == nullptr) + return; + ttsMan->say(widget->getTooltip()); + } +#endif } void Tooltip::drawDialog(DrawLayer layerToDraw) { |