feat: configurable openxr bindings

This commit is contained in:
galister
2024-06-04 14:57:04 +09:00
parent 773ff6885d
commit b8a0e3630d
9 changed files with 642 additions and 525 deletions

View File

@@ -540,7 +540,7 @@ fn run_watch(data: &WatchAction, app: &mut AppState) {
OverlaySelector::Name(WATCH_NAME.into()),
Box::new(move |app, o| {
o.spawn_rotation *= rot;
app.session.config.watch_rot = o.spawn_rotation.into();
app.session.config.watch_rot = o.spawn_rotation;
o.dirty = true;
}),
));
@@ -556,7 +556,7 @@ fn run_watch(data: &WatchAction, app: &mut AppState) {
OverlaySelector::Name(WATCH_NAME.into()),
Box::new(move |app, o| {
o.spawn_point[axis] += delta;
app.session.config.watch_pos = o.spawn_point.into();
app.session.config.watch_pos = o.spawn_point;
o.dirty = true;
}),
));

View File

@@ -158,7 +158,7 @@ pub fn modular_canvas(
} => {
canvas.font_size = *font_size;
canvas.fg_color = color_parse(fg_color).unwrap_or(*FALLBACK_COLOR);
let label = canvas.label(*x, *y, *w, *h, empty_str.clone());
let label = canvas.label_centered(*x, *y, *w, *h, empty_str.clone());
modular_label_init(label, data);
}
ModularElement::Button {