From 39e74b027e372dcaed33ffa1b18f0de4abf82eb1 Mon Sep 17 00:00:00 2001 From: Jaromir Wysoglad Date: Thu, 11 Jul 2019 00:14:28 +0200 Subject: TTS: Add part of linux TTS --- gui/widget.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'gui') diff --git a/gui/widget.h b/gui/widget.h index f87816b2e3..bcab3b4fa6 100644 --- a/gui/widget.h +++ b/gui/widget.h @@ -31,6 +31,8 @@ #include "graphics/surface.h" #include "gui/object.h" #include "gui/ThemeEngine.h" +#include "common/text-to-speech.h" +#include "common/system.h" namespace GUI { @@ -218,7 +220,7 @@ public: void handleMouseUp(int x, int y, int button, int clickCount); void handleMouseDown(int x, int y, int button, int clickCount); - void handleMouseEntered(int button) { if (_duringPress) { setFlags(WIDGET_PRESSED); } else { setFlags(WIDGET_HILITED); } markAsDirty(); } + void handleMouseEntered(int button) { g_system->getTextToSpeechManager()->say(_label); if (_duringPress) { setFlags(WIDGET_PRESSED); } else { setFlags(WIDGET_HILITED); } markAsDirty(); } void handleMouseLeft(int button) { clearFlags(WIDGET_HILITED | WIDGET_PRESSED); markAsDirty(); } void setHighLighted(bool enable); -- cgit v1.2.3