[Update] Config Page: VR Tab: Add restore default settings button.
This commit is contained in:
@@ -34,6 +34,12 @@ export const Vr = () => {
|
||||
|
||||
const { currentOverlayLargeLogSettings, setOverlayLargeLogSettings } = useOverlayLargeLogSettings();
|
||||
const { currentIsEnabledOverlayLargeLog, toggleIsEnabledOverlayLargeLog } = useIsEnabledOverlayLargeLog();
|
||||
|
||||
const restoreDefaultSettings = () => {
|
||||
setOverlaySmallLogSettings(ui_configs.overlay_small_log_default_settings);
|
||||
setOverlayLargeLogSettings(ui_configs.overlay_large_log_default_settings);
|
||||
};
|
||||
|
||||
return (
|
||||
<div className={styles.container}>
|
||||
<div className={styles.wrapper}>
|
||||
@@ -64,6 +70,12 @@ export const Vr = () => {
|
||||
)}
|
||||
</div>
|
||||
<CommonSettingsContainer />
|
||||
<button
|
||||
className={styles.restore_default_settings_button}
|
||||
onClick={restoreDefaultSettings}
|
||||
>
|
||||
{t("config_page.vr.restore_default_settings")}
|
||||
</button>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
@@ -196,4 +196,18 @@
|
||||
|
||||
.common_label {
|
||||
font-size: 1.4rem;
|
||||
}
|
||||
|
||||
.restore_default_settings_button {
|
||||
color: var(--dark_basic_text_color);
|
||||
font-size: 1.2rem;
|
||||
margin-top: 6rem;
|
||||
padding: 0.8rem;
|
||||
border-radius: 0.4rem;
|
||||
&:hover {
|
||||
background-color: var(--dark_775_color);
|
||||
}
|
||||
&:active {
|
||||
background-color: var(--dark_900_color);
|
||||
}
|
||||
}
|
||||
@@ -15,6 +15,34 @@ export const ui_configs = {
|
||||
z_pos: { step: 0.05, min: -0.5, max: 1.5 },
|
||||
ui_scaling: { step: 10, min: 40, max: 200 },
|
||||
},
|
||||
|
||||
overlay_small_log_default_settings: {
|
||||
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,
|
||||
opacity: 1.0,
|
||||
ui_scaling: 1.0,
|
||||
tracker: "HMD",
|
||||
},
|
||||
overlay_large_log_default_settings: {
|
||||
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,
|
||||
opacity: 1.0,
|
||||
ui_scaling: 1.0,
|
||||
tracker: "LeftHand",
|
||||
},
|
||||
|
||||
selectable_ui_languages: [
|
||||
{id: "en", label: "English"},
|
||||
{id: "ja", label: "日本語"},
|
||||
|
||||
Reference in New Issue
Block a user