From 80a1ad5d1aa8f0a99d664b8c617011033bdc48fd Mon Sep 17 00:00:00 2001 From: Sakamoto Shiina <68018796+ShiinaSakamoto@users.noreply.github.com> Date: Tue, 12 Sep 2023 07:14:36 +0900 Subject: [PATCH] =?UTF-8?q?[Add]=20Config=20Window:=20Auto=20Export=20Mess?= =?UTF-8?q?age=20Logs(LOG=E3=83=95=E3=82=A1=E3=82=A4=E3=83=AB=E5=87=BA?= =?UTF-8?q?=E5=8A=9B=E6=A9=9F=E8=83=BD)=E3=82=92=E8=A8=AD=E5=AE=9A?= =?UTF-8?q?=E9=A0=85=E7=9B=AE=E3=81=AB=E8=BF=BD=E5=8A=A0=E3=80=82=E3=82=AB?= =?UTF-8?q?=E3=83=86=E3=82=B4=E3=83=AA=E3=83=BC=E3=81=AFOthers=E3=81=A8?= =?UTF-8?q?=E3=81=97=E3=81=9F=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- view.py | 7 +++++++ .../setting_box_others/createSettingBox_Others.py | 15 +++++++++++++++ 2 files changed, 22 insertions(+) diff --git a/view.py b/view.py index 91d5f827..f004f9b8 100644 --- a/view.py +++ b/view.py @@ -219,6 +219,12 @@ class View(): CALLBACK_SET_ENABLE_NOTICE_XSOVERLAY=None, VAR_ENABLE_NOTICE_XSOVERLAY=BooleanVar(value=config.ENABLE_NOTICE_XSOVERLAY), + VAR_LABEL_ENABLE_AUTO_EXPORT_MESSAGE_LOGS=StringVar(value="Auto Export Message Logs"), + VAR_DESC_ENABLE_AUTO_EXPORT_MESSAGE_LOGS=StringVar(value="Automatically export the conversation messages as a text file."), + CALLBACK_SET_ENABLE_AUTO_EXPORT_MESSAGE_LOGS=None, + VAR_ENABLE_AUTO_EXPORT_MESSAGE_LOGS=BooleanVar(value=config.ENABLE_LOGGER), + + VAR_LABEL_MESSAGE_FORMAT=StringVar(value="Message Format"), VAR_DESC_MESSAGE_FORMAT=StringVar(value="You can change the decoration of the message you want to send. (Default: \"[message]([translation])\" )"), CALLBACK_SET_MESSAGE_FORMAT=None, @@ -314,6 +320,7 @@ class View(): # Others Tab self.view_variable.CALLBACK_SET_ENABLE_AUTO_CLEAR_MESSAGE_BOX = config_window["callback_set_enable_auto_clear_chatbox"] self.view_variable.CALLBACK_SET_ENABLE_NOTICE_XSOVERLAY = config_window["callback_set_enable_notice_xsoverlay"] + self.view_variable.CALLBACK_SET_ENABLE_AUTO_EXPORT_MESSAGE_LOGS = config_window.get("callback_set_enable_auto_export_message_logs", None) self.view_variable.CALLBACK_SET_MESSAGE_FORMAT = config_window["callback_set_message_format"] # Advanced Settings Tab diff --git a/vrct_gui/config_window/widgets/createSideMenuAndSettingsBoxContainers/setting_box_containers/setting_box_others/createSettingBox_Others.py b/vrct_gui/config_window/widgets/createSideMenuAndSettingsBoxContainers/setting_box_containers/setting_box_others/createSettingBox_Others.py index dd730e92..311fbbbd 100644 --- a/vrct_gui/config_window/widgets/createSideMenuAndSettingsBoxContainers/setting_box_containers/setting_box_others/createSettingBox_Others.py +++ b/vrct_gui/config_window/widgets/createSideMenuAndSettingsBoxContainers/setting_box_containers/setting_box_others/createSettingBox_Others.py @@ -15,6 +15,9 @@ def createSettingBox_Others(setting_box_wrapper, config_window, settings, view_v def checkbox_notice_xsoverlay_callback(checkbox_box_widget): callFunctionIfCallable(view_variable.CALLBACK_SET_ENABLE_NOTICE_XSOVERLAY, checkbox_box_widget.get()) + def checkbox_auto_export_message_logs_callback(checkbox_box_widget): + callFunctionIfCallable(view_variable.CALLBACK_SET_ENABLE_AUTO_EXPORT_MESSAGE_LOGS, checkbox_box_widget.get()) + def entry_message_format_callback(value): callFunctionIfCallable(view_variable.CALLBACK_SET_ENABLE_NOTICE_XSOVERLAY, value) @@ -44,6 +47,18 @@ def createSettingBox_Others(setting_box_wrapper, config_window, settings, view_v row+=1 + config_window.sb__auto_export_message_logs = createSettingBoxCheckbox( + parent_widget=setting_box_wrapper, + for_var_label_text=view_variable.VAR_LABEL_ENABLE_AUTO_EXPORT_MESSAGE_LOGS, + for_var_desc_text=view_variable.VAR_DESC_ENABLE_AUTO_EXPORT_MESSAGE_LOGS, + checkbox_attr_name="sb__checkbox_auto_export_message_logs", + command=lambda: checkbox_auto_export_message_logs_callback(config_window.sb__checkbox_auto_export_message_logs), + variable=view_variable.VAR_ENABLE_AUTO_EXPORT_MESSAGE_LOGS, + ) + config_window.sb__auto_export_message_logs.grid(row=row) + row+=1 + + config_window.sb__message_format = createSettingBoxEntry( parent_widget=setting_box_wrapper, for_var_label_text=view_variable.VAR_LABEL_MESSAGE_FORMAT,