mirror of https://github.com/wayvr-org/wayvr.git
fix tutorial_graduated not saving
This commit is contained in:
parent
4140534548
commit
d40e0cdb00
|
|
@ -21,7 +21,7 @@ use wgui::{
|
|||
use wlx_common::{
|
||||
async_executor::AsyncExecutor,
|
||||
audio,
|
||||
dash_interface::{BoxDashInterface, RecenterMode},
|
||||
dash_interface::{BoxDashInterface, ConfigChangeKind, RecenterMode},
|
||||
locale::WayVRLangProvider,
|
||||
timestep::{self, Timestep},
|
||||
};
|
||||
|
|
@ -29,8 +29,8 @@ use wlx_common::{
|
|||
use crate::{
|
||||
assets,
|
||||
tab::{
|
||||
Tab, TabType, apps::TabApps, donate::TabDonate, games::TabGames, home::TabHome, monado::TabMonado,
|
||||
settings::TabSettings, welcome::TabWelcome,
|
||||
apps::TabApps, donate::TabDonate, games::TabGames, home::TabHome, monado::TabMonado, settings::TabSettings,
|
||||
welcome::TabWelcome, Tab, TabType,
|
||||
},
|
||||
util::{
|
||||
popup_manager::{MountPopupOnceParams, PopupManager, PopupManagerParams},
|
||||
|
|
@ -550,6 +550,7 @@ impl<T: 'static> Frontend<T> {
|
|||
fn action_tutorial_graduated(&mut self, data: &mut T) {
|
||||
let config = self.interface.general_config(data);
|
||||
config.tutorial_graduated = true;
|
||||
self.interface.config_changed(data, ConfigChangeKind::Other);
|
||||
}
|
||||
|
||||
fn action_open_url(&mut self, url: Rc<str>) {
|
||||
|
|
|
|||
|
|
@ -331,7 +331,7 @@ fn tutorial_spawn_effect(app: &mut AppState) -> anyhow::Result<()> {
|
|||
realign(&mut transform, hmd, 1.0);
|
||||
|
||||
owc.active_state = Some(OverlayWindowState {
|
||||
saved_transform: Some(Affine3A::from_translation(vec3(0., 0., -0.9))),
|
||||
saved_transform: Some(Affine3A::from_translation(vec3(0., -0.1, -0.9))),
|
||||
transform,
|
||||
grabbable: true,
|
||||
interactable: true,
|
||||
|
|
@ -542,6 +542,7 @@ impl DashInterface<AppState> for DashInterfaceLive {
|
|||
.enqueue(TaskType::OpenXR(OpenXrTask::EnvironmentChanged));
|
||||
}
|
||||
}
|
||||
_ => {}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -81,6 +81,8 @@ pub trait DashInterface<T> {
|
|||
pub enum ConfigChangeKind {
|
||||
OverlayConfig,
|
||||
EnvironmentBlend,
|
||||
/// Marks the config for saving but doesn't notify any components
|
||||
Other,
|
||||
}
|
||||
|
||||
pub type BoxDashInterface<T> = Box<dyn DashInterface<T>>;
|
||||
|
|
|
|||
Loading…
Reference in New Issue