From f486d2beb0bd1f4039c77dc9e092273241d9000d Mon Sep 17 00:00:00 2001 From: chrys87 Date: Tue, 26 Jul 2016 15:59:27 +0200 Subject: [PATCH] Update outputManager.py --- src/fenrir-package/core/outputManager.py | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/src/fenrir-package/core/outputManager.py b/src/fenrir-package/core/outputManager.py index 5d06648f..84f33f53 100644 --- a/src/fenrir-package/core/outputManager.py +++ b/src/fenrir-package/core/outputManager.py @@ -3,9 +3,10 @@ class outputManager(): def __init__(self): pass - def presentText(self, environment, Text, Interrupt=True): + def presentText(self, environment, Text, Interrupt=True, soundIconName = ''): self.speakText(environment, Text, Interrupt) self.brailleText(environment, Text) + self.playSoundIcon(environment, soundIconName): def speakText(self, environment, Text, Interrupt=True): if environment['runtime']['speechDriver'] == None: @@ -23,14 +24,20 @@ class outputManager(): environment['runtime']['speechDriver'].speak(Text) - def brailleText(self, environment, Text): + def brailleText(self, environment, Text, Interrupt=True): if not environment['runtime']['settingsManager'].getSettingAsBool(environment, 'braille', 'enabled'): return print('braille') def interruptOutput(self, environment): environment['runtime']['speechDriver'].cancel() - def playSoundIcon(self, environment, IconName): + def playSoundIcon(self, environment, IconName, Interrupt=True): + if soundIconName == '': + return if not environment['runtime']['settingsManager'].getSettingAsBool(environment, 'sound', 'enabled'): return print(IconName) + try: + print(environment['soundIcons'][IconName]) + except: + print('no icon there for' + IconName)