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