🗑️[Remove] Model : remove xsoverlay module
This commit is contained in:
@@ -769,17 +769,6 @@ class Config:
|
|||||||
self._SEND_MESSAGE_BUTTON_TYPE = value
|
self._SEND_MESSAGE_BUTTON_TYPE = value
|
||||||
saveJson(self.PATH_CONFIG, inspect.currentframe().f_code.co_name, value)
|
saveJson(self.PATH_CONFIG, inspect.currentframe().f_code.co_name, value)
|
||||||
|
|
||||||
@property
|
|
||||||
@json_serializable('ENABLE_NOTICE_XSOVERLAY')
|
|
||||||
def ENABLE_NOTICE_XSOVERLAY(self):
|
|
||||||
return self._ENABLE_NOTICE_XSOVERLAY
|
|
||||||
|
|
||||||
@ENABLE_NOTICE_XSOVERLAY.setter
|
|
||||||
def ENABLE_NOTICE_XSOVERLAY(self, value):
|
|
||||||
if isinstance(value, bool):
|
|
||||||
self._ENABLE_NOTICE_XSOVERLAY = value
|
|
||||||
saveJson(self.PATH_CONFIG, inspect.currentframe().f_code.co_name, value)
|
|
||||||
|
|
||||||
@property
|
@property
|
||||||
@json_serializable('OVERLAY_SETTINGS')
|
@json_serializable('OVERLAY_SETTINGS')
|
||||||
def OVERLAY_SETTINGS(self):
|
def OVERLAY_SETTINGS(self):
|
||||||
@@ -1116,7 +1105,6 @@ class Config:
|
|||||||
self._ENABLE_AUTO_CLEAR_MESSAGE_BOX = True
|
self._ENABLE_AUTO_CLEAR_MESSAGE_BOX = True
|
||||||
self._ENABLE_SEND_ONLY_TRANSLATED_MESSAGES = False
|
self._ENABLE_SEND_ONLY_TRANSLATED_MESSAGES = False
|
||||||
self._SEND_MESSAGE_BUTTON_TYPE = "show"
|
self._SEND_MESSAGE_BUTTON_TYPE = "show"
|
||||||
self._ENABLE_NOTICE_XSOVERLAY = False
|
|
||||||
self._OVERLAY_SETTINGS = {
|
self._OVERLAY_SETTINGS = {
|
||||||
"opacity": 1.0,
|
"opacity": 1.0,
|
||||||
"ui_scaling": 1.0,
|
"ui_scaling": 1.0,
|
||||||
|
|||||||
@@ -672,9 +672,6 @@ class Model:
|
|||||||
self.speaker_energy_recorder.stop()
|
self.speaker_energy_recorder.stop()
|
||||||
self.speaker_energy_recorder = None
|
self.speaker_energy_recorder = None
|
||||||
|
|
||||||
def notificationXSOverlay(self, message):
|
|
||||||
xsoverlayForVRCT(content=f"{message}")
|
|
||||||
|
|
||||||
def createOverlayImageShort(self, message, translation):
|
def createOverlayImageShort(self, message, translation):
|
||||||
your_language = config.TARGET_LANGUAGE
|
your_language = config.TARGET_LANGUAGE
|
||||||
target_language = config.SOURCE_LANGUAGE
|
target_language = config.SOURCE_LANGUAGE
|
||||||
|
|||||||
@@ -224,10 +224,6 @@ class SpeakerMessage:
|
|||||||
})
|
})
|
||||||
|
|
||||||
if config.ENABLE_TRANSCRIPTION_RECEIVE is True:
|
if config.ENABLE_TRANSCRIPTION_RECEIVE is True:
|
||||||
if config.ENABLE_NOTICE_XSOVERLAY is True:
|
|
||||||
xsoverlay_message = messageFormatter("RECEIVED", translation, message)
|
|
||||||
model.notificationXSOverlay(xsoverlay_message)
|
|
||||||
|
|
||||||
if config.ENABLE_OVERLAY_SMALL_LOG is True:
|
if config.ENABLE_OVERLAY_SMALL_LOG is True:
|
||||||
if model.overlay.initialized is True:
|
if model.overlay.initialized is True:
|
||||||
overlay_image = model.createOverlayImageShort(message, translation)
|
overlay_image = model.createOverlayImageShort(message, translation)
|
||||||
@@ -1173,16 +1169,6 @@ def callbackSetSendMessageButtonType(data, *args, **kwargs) -> dict:
|
|||||||
config.SEND_MESSAGE_BUTTON_TYPE = data
|
config.SEND_MESSAGE_BUTTON_TYPE = data
|
||||||
return {"status":200, "result":config.SEND_MESSAGE_BUTTON_TYPE}
|
return {"status":200, "result":config.SEND_MESSAGE_BUTTON_TYPE}
|
||||||
|
|
||||||
def callbackEnableNoticeXsoverlay(*args, **kwargs) -> dict:
|
|
||||||
printLog("Enable Notice Xsoverlay")
|
|
||||||
config.ENABLE_NOTICE_XSOVERLAY = True
|
|
||||||
return {"status":200, "result":config.ENABLE_NOTICE_XSOVERLAY}
|
|
||||||
|
|
||||||
def callbackDisableNoticeXsoverlay(*args, **kwargs) -> dict:
|
|
||||||
printLog("Disable Notice Xsoverlay")
|
|
||||||
config.ENABLE_NOTICE_XSOVERLAY = False
|
|
||||||
return {"status":200, "result":config.ENABLE_NOTICE_XSOVERLAY}
|
|
||||||
|
|
||||||
def callbackEnableAutoExportMessageLogs(*args, **kwargs) -> dict:
|
def callbackEnableAutoExportMessageLogs(*args, **kwargs) -> dict:
|
||||||
printLog("Enable Auto Export Message Logs")
|
printLog("Enable Auto Export Message Logs")
|
||||||
config.ENABLE_LOGGER = True
|
config.ENABLE_LOGGER = True
|
||||||
|
|||||||
@@ -73,7 +73,6 @@ config_mapping = {
|
|||||||
"/config/enable_auto_clear_message_box": "ENABLE_AUTO_CLEAR_MESSAGE_BOX",
|
"/config/enable_auto_clear_message_box": "ENABLE_AUTO_CLEAR_MESSAGE_BOX",
|
||||||
"/config/enable_send_only_translated_messages": "ENABLE_SEND_ONLY_TRANSLATED_MESSAGES",
|
"/config/enable_send_only_translated_messages": "ENABLE_SEND_ONLY_TRANSLATED_MESSAGES",
|
||||||
"/config/send_message_button_type": "SEND_MESSAGE_BUTTON_TYPE",
|
"/config/send_message_button_type": "SEND_MESSAGE_BUTTON_TYPE",
|
||||||
"/config/enable_notice_xsoverlay": "ENABLE_NOTICE_XSOVERLAY",
|
|
||||||
"/config/overlay_settings": "OVERLAY_SETTINGS",
|
"/config/overlay_settings": "OVERLAY_SETTINGS",
|
||||||
"/config/enable_overlay_small_log": "ENABLE_OVERLAY_SMALL_LOG",
|
"/config/enable_overlay_small_log": "ENABLE_OVERLAY_SMALL_LOG",
|
||||||
"/config/overlay_small_log_settings": "OVERLAY_SMALL_LOG_SETTINGS",
|
"/config/overlay_small_log_settings": "OVERLAY_SMALL_LOG_SETTINGS",
|
||||||
|
|||||||
Reference in New Issue
Block a user