From d4f58fdb90c03055220aad5bfba1c5e4c475cbcf Mon Sep 17 00:00:00 2001 From: misyaguziya <53165965+misyaguziya@users.noreply.github.com> Date: Sat, 9 Nov 2024 17:16:35 +0900 Subject: [PATCH] =?UTF-8?q?=F0=9F=91=8D=EF=B8=8F[Update]=20Model=20:=20Ove?= =?UTF-8?q?rlay=20Large=20log=E3=82=92=E6=96=87=E5=AD=97=E8=B5=B7=E3=81=93?= =?UTF-8?q?=E3=81=97=E5=8B=95=E4=BD=9C=E6=99=82=E3=81=AB=E8=A8=AD=E5=AE=9A?= =?UTF-8?q?=E3=81=99=E3=82=8B=E3=82=88=E3=81=86=E3=81=AB=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src-python/model.py | 4 ++-- src-python/webui_controller.py | 15 ++++++++------- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/src-python/model.py b/src-python/model.py index c6a30735..98a6588a 100644 --- a/src-python/model.py +++ b/src-python/model.py @@ -742,10 +742,10 @@ class Model: def shutdownOverlaySmall(self): self.overlay_small_log.shutdownOverlay() - def createOverlayImageLarge(self, message, translation): + def createOverlayImageLarge(self, message_type:str, message:str, translation:str): your_language = config.SELECTED_TARGET_LANGUAGES[config.SELECTED_TAB_NO]["primary"]["language"] target_language = config.SELECTED_YOUR_LANGUAGES[config.SELECTED_TAB_NO]["primary"]["language"] - return self.overlay_image.createOverlayImageLarge(message, your_language, translation, target_language) + return self.overlay_image.createOverlayImageLarge(message_type, message, your_language, translation, target_language) def clearOverlayImageLarge(self): self.overlay_large_log.clearImage() diff --git a/src-python/webui_controller.py b/src-python/webui_controller.py index f46fd67e..405617b8 100644 --- a/src-python/webui_controller.py +++ b/src-python/webui_controller.py @@ -250,11 +250,9 @@ class Controller: translation = " (" + "/".join(translation) + ")" model.logger.info(f"[SENT] {message}{translation}") - # if config.OVERLAY_SMALL_LOG is True: - # overlay_image = model.createOverlayImageSmall(message, translation) - # model.updateOverlay(overlay_image) - # overlay_image = model.createOverlayImageLong("send", message, translation) - # model.updateOverlay(overlay_image) + if config.OVERLAY_LARGE_LOG is True: + overlay_image = model.createOverlayImageLarge("send", message, translation) + model.updateOverlayLarge(overlay_image) def speakerMessage(self, message) -> None: if isinstance(message, bool) and message is False: @@ -295,8 +293,11 @@ class Controller: if model.overlay_small_log.initialized is True: overlay_image = model.createOverlayImageSmall(message, translation) model.updateOverlaySmall(overlay_image) - # overlay_image = model.createOverlayImageLong("receive", message, translation) - # model.updateOverlay(overlay_image) + + if config.OVERLAY_LARGE_LOG is True: + if model.overlay_large_log.initialized is True: + overlay_image = model.createOverlayImageLarge("receive", message, translation) + model.updateOverlayLarge(overlay_image) if config.SEND_RECEIVED_MESSAGE_TO_VRC is True: osc_message = self.messageFormatter("RECEIVED", translation, [message])