[Update] Config Page: VR Tab. Add button that send sample texts to Overlay. per 1 sec for now.

This commit is contained in:
Sakamoto Shiina
2024-12-18 16:31:10 +09:00
parent 8629d9aa4a
commit 8cc66ca0cc
8 changed files with 150 additions and 17 deletions

View File

@@ -49,6 +49,7 @@ export { useOverlaySmallLogSettings } from "./vr/useOverlaySmallLogSettings";
export { useIsEnabledOverlayLargeLog } from "./vr/useIsEnabledOverlayLargeLog";
export { useOverlayShowOnlyTranslatedMessages } from "./vr/useOverlayShowOnlyTranslatedMessages";
export { useOverlayLargeLogSettings } from "./vr/useOverlayLargeLogSettings";
export { useSendTextToOverlay } from "./vr/useSendTextToOverlay";
export { useOscIpAddress } from "./advanced_settings/useOscIpAddress";
export { useOscPort } from "./advanced_settings/useOscPort";

View File

@@ -0,0 +1,13 @@
import { useStdoutToPython } from "@logics/useStdoutToPython";
export const useSendTextToOverlay = () => {
const { asyncStdoutToPython } = useStdoutToPython();
const sendTextToOverlay = (text) => {
asyncStdoutToPython("/run/send_text_overlay_small_log", text);
};
return {
sendTextToOverlay,
};
};

View File

@@ -427,6 +427,8 @@ export const useReceiveRoutes = () => {
"/set/enable/overlay_show_only_translated_messages": updateOverlayShowOnlyTranslatedMessages,
"/set/disable/overlay_show_only_translated_messages": updateOverlayShowOnlyTranslatedMessages,
"/run/send_text_overlay_small_log": () => {},
// Others Tab
"/get/data/auto_clear_message_box": updateEnableAutoClearMessageInputBox,
"/set/enable/auto_clear_message_box": updateEnableAutoClearMessageInputBox,