diff --git a/locales/en.yml b/locales/en.yml index bb7f2dcf..2951af23 100644 --- a/locales/en.yml +++ b/locales/en.yml @@ -221,6 +221,7 @@ config_window: enable_overlay_small_log: label: Enable Overlay # desc: + open_overlay_settings: Open Overlay Customized Settings auto_clear_the_message_box: label: Auto Clear The Message Box @@ -235,7 +236,7 @@ config_window: show_and_disable_enter_key: Show and disable to send when pressed enter key notice_xsoverlay: - label: Notification XSOverlay (VR Only) + label: Notification XSOverlay desc: Notify received messages by using XSOverlay's notification feature. auto_export_message_logs: diff --git a/locales/ja.yml b/locales/ja.yml index b819b174..bd550712 100644 --- a/locales/ja.yml +++ b/locales/ja.yml @@ -217,6 +217,9 @@ config_window: enable_overlay_small_log: label: Overlay機能を有効 + # desc: + open_overlay_settings: Overlay詳細設定を開く + auto_clear_the_message_box: @@ -232,7 +235,7 @@ config_window: show_and_disable_enter_key: 表示し、エンターキーでの送信を無効 notice_xsoverlay: - label: XSOverlayでの通知受け取り機能を有効 (VR限定) + label: XSOverlayでの通知受け取り機能を有効 desc: 文字起こし (受信) されたメッセージをXSOverlayの機能を使って通知として受け取れます。 auto_export_message_logs: diff --git a/locales/ko.yml b/locales/ko.yml index 06cfcb65..ed8f8ddf 100644 --- a/locales/ko.yml +++ b/locales/ko.yml @@ -217,7 +217,7 @@ config_window: show_and_disable_enter_key: 표시 (Enter 키 전송 비활성화) notice_xsoverlay: - label: XSOverlay에서 알림 수신 기능 활성화 (VR 전용) + label: XSOverlay에서 알림 수신 기능 활성화 desc: 수신된 메시지를 XSOverlay의 기능을 통해 알림으로 받아볼 수 있습니다. auto_export_message_logs: diff --git a/view.py b/view.py index 6582c5fb..db7f58f8 100644 --- a/view.py +++ b/view.py @@ -484,6 +484,7 @@ class View(): # VAR_DESC_ENABLE_OVERLAY_SMALL_LOG=StringVar(value=i18n.t("config_window.enable_overlay_small_log.desc")), CALLBACK_SET_ENABLE_OVERLAY_SMALL_LOG=None, VAR_ENABLE_OVERLAY_SMALL_LOG=BooleanVar(value=config.ENABLE_OVERLAY_SMALL_LOG), + VAR_OPEN_OVERLAY_SETTINGS_BUTTON=StringVar(value=i18n.t("config_window.enable_overlay_small_log.open_overlay_settings")), # Others Tab diff --git a/vrct_gui/config_window/widgets/createSideMenuAndSettingsBoxContainers/setting_box_containers/_SettingBoxGenerator.py b/vrct_gui/config_window/widgets/createSideMenuAndSettingsBoxContainers/setting_box_containers/_SettingBoxGenerator.py index 60386162..751211fc 100644 --- a/vrct_gui/config_window/widgets/createSideMenuAndSettingsBoxContainers/setting_box_containers/_SettingBoxGenerator.py +++ b/vrct_gui/config_window/widgets/createSideMenuAndSettingsBoxContainers/setting_box_containers/_SettingBoxGenerator.py @@ -998,6 +998,72 @@ class _SettingBoxGenerator(): + def createSettingBox_Overlay(self, + for_var_label_text, for_var_desc_text, + switch_attr_name, + variable, + command, + for_var_button_label, + label_button_clicked_command, + ): + + (setting_box_frame, setting_box_item_frame) = self._createSettingBoxFrame(switch_attr_name, for_var_label_text, for_var_desc_text) + + + all_wrapper = CTkFrame(setting_box_item_frame, corner_radius=0, fg_color=self.settings.ctm.SB__BG_COLOR, width=0, height=0) + all_wrapper.grid(row=1, column=0, sticky="ew") + + all_wrapper.grid_columnconfigure(1, weight=1) + + + + + switch_widget = CTkSwitch( + all_wrapper, + text=None, + height=0, + width=0, + corner_radius=int(self.settings.uism.SB__SWITCH_BOX_HEIGHT/2), + border_width=0, + switch_height=self.settings.uism.SB__SWITCH_BOX_HEIGHT, + switch_width=self.settings.uism.SB__SWITCH_BOX_WIDTH, + onvalue=True, + offvalue=False, + variable=variable, + command=command, + fg_color=self.settings.ctm.SB__SWITCH_BOX_BG_COLOR, + progress_color=self.settings.ctm.SB__SWITCH_BOX_ACTIVE_BG_COLOR, + button_color=self.settings.ctm.SB__SWITCH_BOX_BUTTON_COLOR, + button_hover_color=self.settings.ctm.SB__SWITCH_BOX_BUTTON_HOVERED_COLOR, + ) + setattr(self.config_window, switch_attr_name, switch_widget) + + self.config_window.sb__widgets[switch_attr_name].switch_box = switch_widget + + switch_widget.grid(row=0, pady=20, column=SETTING_BOX_COLUMN) + + + (open_page_button, label_button_label_widget) = createLabelButton( + parent_widget=all_wrapper, + label_button_bg_color=self.settings.ctm.SB__BUTTON_COLOR, + label_button_hovered_bg_color=self.settings.ctm.SB__BUTTON_HOVERED_COLOR, + label_button_clicked_bg_color=self.settings.ctm.SB__BUTTON_CLICKED_COLOR, + label_button_ipadx=self.settings.uism.SB__AUTHKEY_WEBPAGE_BUTTON_IPADX, + label_button_ipady=self.settings.uism.SB__AUTHKEY_WEBPAGE_BUTTON_IPADY, + variable=for_var_button_label, + font_family=self.settings.FONT_FAMILY, + font_size=self.settings.uism.SB__AUTHKEY_WEBPAGE_BUTTON_LABEL_FONT_SIZE, + text_color=self.settings.ctm.LABELS_TEXT_COLOR, + label_button_clicked_command=label_button_clicked_command, + + label_button_position="center", + ) + open_page_button.grid(row=1, column=SETTING_BOX_COLUMN, pady=(self.settings.uism.SB__OPEN_OVERLAY_SETTINGS_WINDOW,0)) + + + return setting_box_frame + + def createSettingBoxButtonWithImage( self, for_var_label_text, for_var_desc_text, 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 b32116fe..8f3f9bf3 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 @@ -18,9 +18,6 @@ def createSettingBox_Others(setting_box_wrapper, config_window, settings, view_v def checkboxSendMessageButtonTypeCallback(): callFunctionIfCallable(view_variable.CALLBACK_SET_SEND_MESSAGE_BUTTON_TYPE, view_variable.VAR_SEND_MESSAGE_BUTTON_TYPE.get()) - def checkboxNoticeXsoverlayCallback(checkbox_box_widget): - callFunctionIfCallable(view_variable.CALLBACK_SET_ENABLE_NOTICE_XSOVERLAY, checkbox_box_widget.get()) - def checkboxAutoExportMessageLogsCallback(checkbox_box_widget): callFunctionIfCallable(view_variable.CALLBACK_SET_ENABLE_AUTO_EXPORT_MESSAGE_LOGS, checkbox_box_widget.get()) @@ -63,16 +60,6 @@ def createSettingBox_Others(setting_box_wrapper, config_window, settings, view_v config_window.sb__send_message_button_type.grid(row=row) row+=1 - config_window.sb__notice_xsoverlay = createSettingBoxCheckbox( - for_var_label_text=view_variable.VAR_LABEL_ENABLE_NOTICE_XSOVERLAY, - for_var_desc_text=view_variable.VAR_DESC_ENABLE_NOTICE_XSOVERLAY, - checkbox_attr_name="sb__checkbox_notice_xsoverlay", - command=lambda: checkboxNoticeXsoverlayCallback(config_window.sb__checkbox_notice_xsoverlay), - variable=view_variable.VAR_ENABLE_NOTICE_XSOVERLAY, - ) - config_window.sb__notice_xsoverlay.grid(row=row) - row+=1 - config_window.sb__auto_export_message_logs = createSettingBoxAutoExportMessageLogs( for_var_label_text=view_variable.VAR_LABEL_ENABLE_AUTO_EXPORT_MESSAGE_LOGS, diff --git a/vrct_gui/config_window/widgets/createSideMenuAndSettingsBoxContainers/setting_box_containers/setting_box_vr/createSettingBox_Vr.py b/vrct_gui/config_window/widgets/createSideMenuAndSettingsBoxContainers/setting_box_containers/setting_box_vr/createSettingBox_Vr.py index 9ecf6f93..0f73595d 100644 --- a/vrct_gui/config_window/widgets/createSideMenuAndSettingsBoxContainers/setting_box_containers/setting_box_vr/createSettingBox_Vr.py +++ b/vrct_gui/config_window/widgets/createSideMenuAndSettingsBoxContainers/setting_box_containers/setting_box_vr/createSettingBox_Vr.py @@ -4,18 +4,43 @@ from .._SettingBoxGenerator import _SettingBoxGenerator def createSettingBox_Vr(setting_box_wrapper, config_window, settings, view_variable): sbg = _SettingBoxGenerator(setting_box_wrapper, config_window, settings, view_variable) - createSettingBoxSwitch = sbg.createSettingBoxSwitch + createSettingBox_Overlay = sbg.createSettingBox_Overlay + createSettingBoxCheckbox = sbg.createSettingBoxCheckbox def switchEnableOverlayUiCallback(switch_widget): callFunctionIfCallable(view_variable.CALLBACK_SET_ENABLE_OVERLAY_SMALL_LOG, switch_widget.get()) + def buttonOpenOverlaySettingsWindow(_e): + print(_e) + callFunctionIfCallable(view_variable.CALLBACK_SET_OPEN_OVERLAY_SETTINGS_WINDOW) + + + def checkboxNoticeXsoverlayCallback(checkbox_box_widget): + callFunctionIfCallable(view_variable.CALLBACK_SET_ENABLE_NOTICE_XSOVERLAY, checkbox_box_widget.get()) + + row=0 - config_window.sb__enable_overlay_small_log = createSettingBoxSwitch( + config_window.sb__enable_overlay_small_log = createSettingBox_Overlay( for_var_label_text=view_variable.VAR_LABEL_ENABLE_OVERLAY_SMALL_LOG, for_var_desc_text=view_variable.VAR_DESC_ENABLE_OVERLAY_SMALL_LOG, switch_attr_name="sb__switch_enable_overlay_small_log", command=lambda: switchEnableOverlayUiCallback(config_window.sb__switch_enable_overlay_small_log), - variable=view_variable.VAR_ENABLE_OVERLAY_SMALL_LOG + variable=view_variable.VAR_ENABLE_OVERLAY_SMALL_LOG, + for_var_button_label=view_variable.VAR_OPEN_OVERLAY_SETTINGS_BUTTON, + label_button_clicked_command=buttonOpenOverlaySettingsWindow, ) config_window.sb__enable_overlay_small_log.grid(row=row) + row+=1 + + + + + config_window.sb__notice_xsoverlay = createSettingBoxCheckbox( + for_var_label_text=view_variable.VAR_LABEL_ENABLE_NOTICE_XSOVERLAY, + for_var_desc_text=view_variable.VAR_DESC_ENABLE_NOTICE_XSOVERLAY, + checkbox_attr_name="sb__checkbox_notice_xsoverlay", + command=lambda: checkboxNoticeXsoverlayCallback(config_window.sb__checkbox_notice_xsoverlay), + variable=view_variable.VAR_ENABLE_NOTICE_XSOVERLAY, + ) + config_window.sb__notice_xsoverlay.grid(row=row, pady=0) row+=1 \ No newline at end of file diff --git a/vrct_gui/quick_settings_window/QuickSettingsWindow.py b/vrct_gui/quick_settings_window/QuickSettingsWindow.py index 8ea84cbb..0d294b8e 100644 --- a/vrct_gui/quick_settings_window/QuickSettingsWindow.py +++ b/vrct_gui/quick_settings_window/QuickSettingsWindow.py @@ -233,10 +233,6 @@ class QuickSettingsWindow(CTkToplevel): label_button_clicked_command=toDefaultOverlaySettingsCallback, label_button_position="center", - - # image_file=image_file, - image_size=self.settings.uism.SB__AUTHKEY_WEBPAGE_BUTTON_IMG_SIZE, - label_button_padx_between_img=self.settings.uism.SB__AUTHKEY_WEBPAGE_PADX_BETWEEN_LABEL_AND_ICON, ) restore_default_settings_button.grid(row=0, column=0, pady=self.settings.uism.QSB__RESTORE_DEFAULT_SETTINGS_BUTTON_PADY) diff --git a/vrct_gui/ui_managers/UiScalingManager.py b/vrct_gui/ui_managers/UiScalingManager.py index 9b72d76e..b7e5f5e3 100644 --- a/vrct_gui/ui_managers/UiScalingManager.py +++ b/vrct_gui/ui_managers/UiScalingManager.py @@ -371,6 +371,8 @@ class UiScalingManager(): self.config_window.SB__AUTHKEY_WEBPAGE_PADX_BETWEEN_LABEL_AND_ICON = self._calculateUiSize(10) self.config_window.SB__AUTHKEY_WEBPAGE_BUTTON_TOP_PADY = self._calculateUiSize(10) + self.config_window.SB__OPEN_OVERLAY_SETTINGS_WINDOW = self._calculateUiSize(28) + self.config_window.SB__BUTTON_IPADXY = self._calculateUiSize(16) self.config_window.SB__BUTTON_ICON_SIZE = self._calculateUiSize(24)