Add support for send_only_translated_messages_overlay to only send translation to XS-Overlay

This commit is contained in:
McHauge
2024-11-27 16:04:35 +01:00
parent 1ebd32fea9
commit 6572fb96a3
10 changed files with 71 additions and 6 deletions

View File

@@ -762,6 +762,17 @@ class Config:
self._ENABLE_SEND_ONLY_TRANSLATED_MESSAGES = value
saveJson(self.PATH_CONFIG, inspect.currentframe().f_code.co_name, value)
@property
@json_serializable('ENABLE_SEND_ONLY_TRANSLATED_MESSAGES_OVERLAY')
def ENABLE_SEND_ONLY_TRANSLATED_MESSAGES_OVERLAY(self):
return self._ENABLE_SEND_ONLY_TRANSLATED_MESSAGES_OVERLAY
@ENABLE_SEND_ONLY_TRANSLATED_MESSAGES_OVERLAY.setter
def ENABLE_SEND_ONLY_TRANSLATED_MESSAGES_OVERLAY(self, value):
if isinstance(value, bool):
self._ENABLE_SEND_ONLY_TRANSLATED_MESSAGES_OVERLAY = value
saveJson(self.PATH_CONFIG, inspect.currentframe().f_code.co_name, value)
@property
@json_serializable('SEND_MESSAGE_BUTTON_TYPE')
def SEND_MESSAGE_BUTTON_TYPE(self):
@@ -1107,6 +1118,7 @@ class Config:
self._RECEIVED_MESSAGE_FORMAT_WITH_T = "[message]([translation])"
self._ENABLE_AUTO_CLEAR_MESSAGE_BOX = True
self._ENABLE_SEND_ONLY_TRANSLATED_MESSAGES = False
self._ENABLE_SEND_ONLY_TRANSLATED_MESSAGES_OVERLAY = False
self._SEND_MESSAGE_BUTTON_TYPE = "show"
self._OVERLAY_SETTINGS = {
"opacity": 1.0,