+
+
{
onchangeFunction={handleOpacityChange}
/>
-
-
+
+
+
+ );
+};
+const OtherControls = ({settings, onchangeFunction}) => {
+ const { t } = useTranslation();
+
+ return(
+
onchangeFunction("display_duration", value)}
/>
onchangeFunction("fadeout_duration", value)}
/>
diff --git a/src-ui/app/config_page/setting_section/setting_box/vr/Vr.module.scss b/src-ui/app/config_page/setting_section/setting_box/vr/Vr.module.scss
index 299b3c2d..7a00c692 100644
--- a/src-ui/app/config_page/setting_section/setting_box/vr/Vr.module.scss
+++ b/src-ui/app/config_page/setting_section/setting_box/vr/Vr.module.scss
@@ -8,6 +8,7 @@
}
.controller_type_switch {
+ margin-top: 6rem;
display: flex;
border: 0.1rem solid var(--dark_600_color);
border-radius: 0.4rem;
@@ -35,11 +36,11 @@
}
.position_rotation_controls_box {
- margin-top: 14rem;
+ margin-top: 8rem;
position: relative;
aspect-ratio: 1 / 1;
width: 36%;
- max-width: 40rem;
+ max-width: 36rem;
transform: translate(-10%);
}
@@ -153,8 +154,40 @@
+.common_controls {
+ padding-top: 4rem;
+ padding-bottom: 2rem;
+ display: flex;
+ flex-direction: column;
+ align-items: center;
+ gap: 2rem;
+ width: 100%;
+ max-width: 56rem;
+ border-bottom: 0.1rem solid var(--dark_700_color);
+}
+
+.common_controls_wrapper {
+ display: flex;
+ flex-direction: row;
+ align-items: center;
+ justify-content: center;
+ width: 100%;
+ position: relative;
+}
+.common_controls_slider {
+ margin-left: 18rem;
+}
+
+.common_controls_slider_label {
+ position: absolute;
+ font-size: 1.6rem;
+ width: 100%;
+}
+
+
+
.other_controls {
- margin-top: 10rem;
+ margin-top: 6rem;
display: flex;
flex-direction: column;
align-items: center;
diff --git a/src-ui/logics/configs/index.js b/src-ui/logics/configs/index.js
index 9badb2fd..d5cdffab 100644
--- a/src-ui/logics/configs/index.js
+++ b/src-ui/logics/configs/index.js
@@ -31,6 +31,9 @@ export { useSpeakerRecordTimeout } from "./transcription/useSpeakerRecordTimeout
export { useSpeakerPhraseTimeout } from "./transcription/useSpeakerPhraseTimeout";
export { useSpeakerMaxWords } from "./transcription/useSpeakerMaxWords";
+export { useOverlaySettings } from "./vr/useOverlaySettings";
+export { useOverlaySmallLogSettings } from "./vr/useOverlaySmallLogSettings";
+
export { useOscIpAddress } from "./advanced_settings/useOscIpAddress";
export { useOscPort } from "./advanced_settings/useOscPort";
diff --git a/src-ui/logics/configs/vr/useOverlaySettings.js b/src-ui/logics/configs/vr/useOverlaySettings.js
new file mode 100644
index 00000000..3394c800
--- /dev/null
+++ b/src-ui/logics/configs/vr/useOverlaySettings.js
@@ -0,0 +1,24 @@
+import { useStore_OverlaySettings } from "@store";
+import { useStdoutToPython } from "@logics/useStdoutToPython";
+
+export const useOverlaySettings = () => {
+ const { asyncStdoutToPython } = useStdoutToPython();
+ const { currentOverlaySettings, updateOverlaySettings, pendingOverlaySettings } = useStore_OverlaySettings();
+
+ const getOverlaySettings = () => {
+ // pendingOverlaySettings();
+ asyncStdoutToPython("/get/data/overlay_settings");
+ };
+
+ const setOverlaySettings = (overlay_settings) => {
+ // pendingOverlaySettings();
+ asyncStdoutToPython("/set/data/overlay_settings", overlay_settings);
+ };
+
+ return {
+ currentOverlaySettings,
+ getOverlaySettings,
+ updateOverlaySettings,
+ setOverlaySettings,
+ };
+};
\ No newline at end of file
diff --git a/src-ui/logics/configs/vr/useOverlaySmallLogSettings.js b/src-ui/logics/configs/vr/useOverlaySmallLogSettings.js
new file mode 100644
index 00000000..03b61393
--- /dev/null
+++ b/src-ui/logics/configs/vr/useOverlaySmallLogSettings.js
@@ -0,0 +1,24 @@
+import { useStore_OverlaySmallLogSettings } from "@store";
+import { useStdoutToPython } from "@logics/useStdoutToPython";
+
+export const useOverlaySmallLogSettings = () => {
+ const { asyncStdoutToPython } = useStdoutToPython();
+ const { currentOverlaySmallLogSettings, updateOverlaySmallLogSettings, pendingOverlaySmallLogSettings } = useStore_OverlaySmallLogSettings();
+
+ const getOverlaySmallLogSettings = () => {
+ // pendingOverlaySmallLogSettings();
+ asyncStdoutToPython("/get/data/overlay_small_log_settings");
+ };
+
+ const setOverlaySmallLogSettings = (overlay_small_log_settings) => {
+ // pendingOverlaySmallLogSettings();
+ asyncStdoutToPython("/set/data/overlay_small_log_settings", overlay_small_log_settings);
+ };
+
+ return {
+ currentOverlaySmallLogSettings,
+ getOverlaySmallLogSettings,
+ updateOverlaySmallLogSettings,
+ setOverlaySmallLogSettings,
+ };
+};
\ No newline at end of file
diff --git a/src-ui/logics/useReceiveRoutes.js b/src-ui/logics/useReceiveRoutes.js
index fe75557d..639edfd1 100644
--- a/src-ui/logics/useReceiveRoutes.js
+++ b/src-ui/logics/useReceiveRoutes.js
@@ -45,6 +45,8 @@ import {
useSpeakerRecordTimeout,
useSpeakerPhraseTimeout,
useSpeakerMaxWords,
+ useOverlaySettings,
+ useOverlaySmallLogSettings,
useOscIpAddress,
useOscPort,
} from "@logics_configs";
@@ -113,6 +115,9 @@ export const useReceiveRoutes = () => {
const { updateSpeakerPhraseTimeout } = useSpeakerPhraseTimeout();
const { updateSpeakerMaxWords } = useSpeakerMaxWords();
+ const { updateOverlaySettings } = useOverlaySettings();
+ const { updateOverlaySmallLogSettings } = useOverlaySmallLogSettings();
+
const { updateOscIpAddress } = useOscIpAddress();
const { updateOscPort } = useOscPort();
@@ -311,6 +316,13 @@ export const useReceiveRoutes = () => {
"/get/data/speaker_max_phrases": updateSpeakerMaxWords,
"/set/data/speaker_max_phrases": updateSpeakerMaxWords,
+ // VR
+ "/get/data/overlay_settings": updateOverlaySettings,
+ "/set/data/overlay_settings": updateOverlaySettings,
+
+ "/get/data/overlay_small_log_settings": updateOverlaySmallLogSettings,
+ "/set/data/overlay_small_log_settings": updateOverlaySmallLogSettings,
+
// Others Tab
"/get/data/auto_clear_message_box": updateEnableAutoClearMessageInputBox,
"/set/enable/auto_clear_message_box": updateEnableAutoClearMessageInputBox,
diff --git a/src-ui/store.js b/src-ui/store.js
index 2bb95a9d..856a24cb 100644
--- a/src-ui/store.js
+++ b/src-ui/store.js
@@ -189,6 +189,22 @@ export const { atomInstance: Atom_SpeakerRecordTimeout, useHook: useStore_Speake
export const { atomInstance: Atom_SpeakerPhraseTimeout, useHook: useStore_SpeakerPhraseTimeout } = createAtomWithHook(0, "SpeakerPhraseTimeout");
export const { atomInstance: Atom_SpeakerMaxWords, useHook: useStore_SpeakerMaxWords } = createAtomWithHook(0, "SpeakerMaxWords");
+// VR
+export const { atomInstance: Atom_OverlaySettings, useHook: useStore_OverlaySettings } = createAtomWithHook({
+ opacity: 1.0,
+ ui_scaling: 1.0,
+}, "OverlaySettings");
+export const { atomInstance: Atom_OverlaySmallLogSettings, useHook: useStore_OverlaySmallLogSettings } = createAtomWithHook({
+ x_pos: 0.0,
+ y_pos: 0.0,
+ z_pos: 0.0,
+ x_rotation: 0.0,
+ y_rotation: 0.0,
+ z_rotation: 0.0,
+ display_duration: 5,
+ fadeout_duration: 2,
+}, "OverlaySmallLogSettings");
+
// Others
export const { atomInstance: Atom_EnableAutoClearMessageInputBox, useHook: useStore_EnableAutoClearMessageInputBox } = createAtomWithHook(true, "EnableAutoClearMessageInputBox");
export const { atomInstance: Atom_EnableSendOnlyTranslatedMessages, useHook: useStore_EnableSendOnlyTranslatedMessages } = createAtomWithHook(false, "EnableSendOnlyTranslatedMessages");