always visible checkbox
This commit is contained in:
@@ -72,6 +72,9 @@
|
|||||||
<div id="pos_align_to_hmd" >
|
<div id="pos_align_to_hmd" >
|
||||||
<CheckBox id="align_box" translation="EDIT_MODE.ALIGN_TO_HMD" tooltip_side="bottom" />
|
<CheckBox id="align_box" translation="EDIT_MODE.ALIGN_TO_HMD" tooltip_side="bottom" />
|
||||||
</div>
|
</div>
|
||||||
|
<div id="pos_global">
|
||||||
|
<CheckBox id="global_box" translation="EDIT_MODE.GLOBAL" tooltip_side="bottom" />
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div id="tab_stereo" display="none" height="100" flex_direction="column">
|
<div id="tab_stereo" display="none" height="100" flex_direction="column">
|
||||||
|
|||||||
@@ -44,6 +44,7 @@
|
|||||||
"POS_HMD": "Follow the HMD.",
|
"POS_HMD": "Follow the HMD.",
|
||||||
"POS_STATIC": "Static: Not part of any set, no recenter.",
|
"POS_STATIC": "Static: Not part of any set, no recenter.",
|
||||||
"POSITIONING": "Positioning",
|
"POSITIONING": "Positioning",
|
||||||
|
"GLOBAL": "Always visible",
|
||||||
"RESIZE_PRESS_AND_DRAG": "Resize (press & drag)",
|
"RESIZE_PRESS_AND_DRAG": "Resize (press & drag)",
|
||||||
"STEREO_3D_MODE": {
|
"STEREO_3D_MODE": {
|
||||||
"SPLIT_BOTTOM_TOP": "BOTTOM→TOP",
|
"SPLIT_BOTTOM_TOP": "BOTTOM→TOP",
|
||||||
|
|||||||
@@ -431,6 +431,7 @@ fn make_edit_panel(app: &mut AppState) -> anyhow::Result<EditModeWrapPanel> {
|
|||||||
|
|
||||||
set_up_checkbox(&mut panel, "additive_box", cb_assign_additive)?;
|
set_up_checkbox(&mut panel, "additive_box", cb_assign_additive)?;
|
||||||
set_up_checkbox(&mut panel, "align_box", cb_assign_align)?;
|
set_up_checkbox(&mut panel, "align_box", cb_assign_align)?;
|
||||||
|
set_up_checkbox(&mut panel, "global_box", cb_assign_global)?;
|
||||||
set_up_checkbox(
|
set_up_checkbox(
|
||||||
&mut panel,
|
&mut panel,
|
||||||
"stereo_full_frame_box",
|
"stereo_full_frame_box",
|
||||||
@@ -487,6 +488,11 @@ fn reset_panel(
|
|||||||
.fetch_component_as::<ComponentCheckbox>("align_box")?;
|
.fetch_component_as::<ComponentCheckbox>("align_box")?;
|
||||||
c.set_checked(&mut common, state.positioning.get_align().unwrap_or(false));
|
c.set_checked(&mut common, state.positioning.get_align().unwrap_or(false));
|
||||||
|
|
||||||
|
let c = panel
|
||||||
|
.parser_state
|
||||||
|
.fetch_component_as::<ComponentCheckbox>("global_box")?;
|
||||||
|
c.set_checked(&mut common, owc.global);
|
||||||
|
|
||||||
panel
|
panel
|
||||||
.state
|
.state
|
||||||
.pos
|
.pos
|
||||||
@@ -576,6 +582,10 @@ const fn cb_assign_align(_app: &mut AppState, owc: &mut OverlayWindowConfig, ali
|
|||||||
active_state.positioning = active_state.positioning.with_align(align);
|
active_state.positioning = active_state.positioning.with_align(align);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const fn cb_assign_global(_app: &mut AppState, owc: &mut OverlayWindowConfig, global: bool) {
|
||||||
|
owc.global = global;
|
||||||
|
}
|
||||||
|
|
||||||
fn cb_assign_stereo_full_frame(
|
fn cb_assign_stereo_full_frame(
|
||||||
_app: &mut AppState,
|
_app: &mut AppState,
|
||||||
owc: &mut OverlayWindowConfig,
|
owc: &mut OverlayWindowConfig,
|
||||||
|
|||||||
@@ -41,7 +41,6 @@ pub fn new_pos_tab_handler(
|
|||||||
Box::new(|_common, state| {
|
Box::new(|_common, state| {
|
||||||
let positioning = state.pos;
|
let positioning = state.pos;
|
||||||
Box::new(move |app, owc| {
|
Box::new(move |app, owc| {
|
||||||
owc.global = matches!(positioning, Positioning::Static);
|
|
||||||
let state = owc.active_state.as_mut().unwrap(); //want panic
|
let state = owc.active_state.as_mut().unwrap(); //want panic
|
||||||
state.positioning = positioning;
|
state.positioning = positioning;
|
||||||
window::save_transform(state, app);
|
window::save_transform(state, app);
|
||||||
|
|||||||
Reference in New Issue
Block a user