[Update] No Device時の処理。スピーカー/マイクを使う処理時に表示するエラーメッセージの実装。表示方法は改善予定。

This commit is contained in:
Sakamoto Shiina
2023-10-17 05:36:29 +09:00
parent 9eafb5f340
commit 314e0c86b6
4 changed files with 23 additions and 5 deletions

12
view.py
View File

@@ -609,6 +609,14 @@ class View():
def printToTextbox_AuthenticationError(self):
self._printToTextbox_Info(i18n.t("main_window.textbox_system_message.auth_key_error"))
def printToTextbox_TranscriptionSendNoDeviceError(self):
self._printToTextbox_Info(i18n.t("main_window.textbox_system_message.no_mic_device_detected_error"))
def printToTextbox_TranscriptionReceiveNoDeviceError(self):
self._printToTextbox_Info(i18n.t("main_window.textbox_system_message.no_speaker_device_detected_error"))
# def printToTextbox_OSCError(self): [Deprecated]
# self._printToTextbox_Info("OSC is not enabled, please enable OSC and rejoin. or turn off the \"Send Message To VRChat\" setting")
@@ -959,6 +967,10 @@ class View():
def showErrorMessage_SpeakerMaxPhrases(self):
self._showErrorMessage(vrct_gui.config_window.sb__entry_speaker_max_phrases, "Speaker Max Phrases Error Message")
def showErrorMessage_CheckSpeakerThreshold_NoDevice(self):
self._showErrorMessage(vrct_gui.config_window.sb__progressbar_x_slider__active_button_speaker_energy_threshold, "No speaker device detected")
def _showErrorMessage(self, target_widget, message):
self.view_variable.VAR_ERROR_MESSAGE.set(message)
vrct_gui._showErrorMessage(target_widget=target_widget)