[Update] Speaker2Chatbox: config.pyのself._ENABLE_SPEAKER2CHATBOX True/Falseによって、Speaker2Chatbox機能の有効無効切り替え。
通常はFalse: 設定画面での項目もdisabled状態になります。 Trueの場合に設定項目が開放され、On/Offの設定を可能に。 ※通常公開しない理由: 相手の発言をチャットボックスに表示できる(オウム返しのようになる)ため、迷惑目的での使用が想定でき、それをできるだけ防ぐためです。オープンソースとはいえ、ある程度抑制できると考えています。 使用者は開発者に直接相談し、config.pyのself._ENABLE_SPEAKER2CHATBOXがTrueなコードをビルドしたものを配布する予定です。
This commit is contained in:
@@ -5,10 +5,13 @@ def _changeConfigWindowWidgetsStatus(config_window, settings, view_variable, sta
|
||||
# target_names = []
|
||||
|
||||
|
||||
def disableOptionmenuWidget(target_widget):
|
||||
def disableLabelsWidgets(target_widget):
|
||||
target_widget.label_widget.configure(text_color=settings.ctm.LABELS_TEXT_DISABLED_COLOR)
|
||||
if target_widget.desc_widget is not None:
|
||||
target_widget.desc_widget.configure(text_color=settings.ctm.LABELS_TEXT_DISABLED_COLOR)
|
||||
|
||||
def disableOptionmenuWidget(target_widget):
|
||||
disableLabelsWidgets(target_widget)
|
||||
target_widget.optionmenu_label_widget.configure(text_color=settings.ctm.LABELS_TEXT_DISABLED_COLOR)
|
||||
target_widget.optionmenu_img_widget.configure(image=CTkImage(settings.image_file.ARROW_LEFT_DISABLED.rotate(90), size=settings.uism.SB__OPTIONMENU_IMG_SIZE))
|
||||
target_widget.optionmenu_box.unbindFunction()
|
||||
@@ -32,6 +35,16 @@ def _changeConfigWindowWidgetsStatus(config_window, settings, view_variable, sta
|
||||
target_widget = config_window.sb__widgets["sb__optionmenu_appearance_theme"]
|
||||
disableOptionmenuWidget(target_widget)
|
||||
|
||||
|
||||
case "sb__checkbox_enable_send_received_message_to_vrc":
|
||||
if status == "disabled":
|
||||
target_widget = config_window.sb__widgets["sb__checkbox_enable_send_received_message_to_vrc"]
|
||||
disableLabelsWidgets(target_widget)
|
||||
config_window.sb__checkbox_enable_send_received_message_to_vrc.configure(
|
||||
state="disabled",
|
||||
border_color=settings.ctm.SB__CHECKBOX_BORDER_DISABLED_COLOR
|
||||
)
|
||||
|
||||
case _:
|
||||
raise ValueError(f"No matching case for target_name: {target_name}")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user