mirror of https://github.com/wayvr-org/wayvr.git
fix labels not ticking on custom panels
This commit is contained in:
parent
bc037cae79
commit
ff3ed1028b
|
|
@ -1,10 +1,13 @@
|
||||||
use std::sync::Arc;
|
use std::{sync::Arc, time::Duration};
|
||||||
|
|
||||||
use glam::{Affine3A, Quat, Vec3, vec3};
|
use glam::{Affine3A, Quat, Vec3, vec3};
|
||||||
use wlx_common::windowing::OverlayWindowState;
|
use wlx_common::windowing::OverlayWindowState;
|
||||||
|
|
||||||
use crate::{
|
use crate::{
|
||||||
gui::panel::{GuiPanel, NewGuiPanelParams},
|
gui::{
|
||||||
|
panel::{GuiPanel, NewGuiPanelParams},
|
||||||
|
timer::GuiTimer,
|
||||||
|
},
|
||||||
state::AppState,
|
state::AppState,
|
||||||
windowing::window::{OverlayCategory, OverlayWindowConfig},
|
windowing::window::{OverlayCategory, OverlayWindowConfig},
|
||||||
};
|
};
|
||||||
|
|
@ -24,6 +27,10 @@ pub fn create_custom(app: &mut AppState, name: Arc<str>) -> Option<OverlayWindow
|
||||||
.inspect_err(|e| log::warn!("Error layouting '{name}': {e:?}"))
|
.inspect_err(|e| log::warn!("Error layouting '{name}': {e:?}"))
|
||||||
.ok()?;
|
.ok()?;
|
||||||
|
|
||||||
|
panel
|
||||||
|
.timers
|
||||||
|
.push(GuiTimer::new(Duration::from_millis(100), 0));
|
||||||
|
|
||||||
let scale = panel.layout.content_size.x / 40.0 * 0.05;
|
let scale = panel.layout.content_size.x / 40.0 * 0.05;
|
||||||
|
|
||||||
Some(OverlayWindowConfig {
|
Some(OverlayWindowConfig {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue