refactor tasks
This commit is contained in:
@@ -6,7 +6,9 @@ use ovr_overlay::{
|
||||
};
|
||||
|
||||
use crate::{
|
||||
backend::input::InputState, state::AppState, windowing::manager::OverlayWindowManager,
|
||||
backend::{input::InputState, task::PlayspaceTask},
|
||||
state::AppState,
|
||||
windowing::manager::OverlayWindowManager,
|
||||
};
|
||||
|
||||
use super::{helpers::Affine3AConvert, overlay::OpenVrOverlayData};
|
||||
@@ -32,6 +34,22 @@ impl PlayspaceMover {
|
||||
}
|
||||
}
|
||||
|
||||
pub fn handle_task(
|
||||
&mut self,
|
||||
app: &AppState,
|
||||
chaperone_mgr: &mut ChaperoneSetupManager,
|
||||
task: PlayspaceTask,
|
||||
) {
|
||||
match task {
|
||||
PlayspaceTask::FixFloor => {
|
||||
self.fix_floor(chaperone_mgr, &app.input_state);
|
||||
}
|
||||
PlayspaceTask::ResetPlayspace => {
|
||||
self.reset_offset(chaperone_mgr, &app.input_state);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[allow(clippy::too_many_lines, clippy::cognitive_complexity)]
|
||||
pub fn update(
|
||||
&mut self,
|
||||
|
||||
Reference in New Issue
Block a user