fix build without wayvr feature

This commit is contained in:
galister
2025-12-10 15:39:50 +09:00
parent 5a3ae02910
commit c6aa84f6cb
2 changed files with 13 additions and 8 deletions

View File

@@ -12,10 +12,14 @@ use wgui::{
widget::EventResult, widget::EventResult,
}; };
use crate::{backend::task::ManagerTask, state::AppState, windowing::OverlaySelector}; use crate::{
backend::task::{ManagerTask, TaskType},
state::AppState,
windowing::OverlaySelector,
};
#[cfg(feature = "wayvr")] #[cfg(feature = "wayvr")]
use crate::backend::{task::TaskType, wayvr::WayVRAction}; use crate::backend::wayvr::WayVRAction;
use super::helper::read_label_from_pipe; use super::helper::read_label_from_pipe;
@@ -40,8 +44,8 @@ pub(super) fn setup_custom_button<S: 'static>(
}; };
let callback: EventCallback<AppState, S> = match command { let callback: EventCallback<AppState, S> = match command {
"::DashToggle" => Box::new(move |_common, _data, app, _| {
#[cfg(feature = "wayvr")] #[cfg(feature = "wayvr")]
"::DashToggle" => Box::new(move |_common, _data, app, _| {
app.tasks app.tasks
.enqueue(TaskType::WayVR(WayVRAction::ToggleDashboard)); .enqueue(TaskType::WayVR(WayVRAction::ToggleDashboard));
Ok(EventResult::Consumed) Ok(EventResult::Consumed)

View File

@@ -15,20 +15,21 @@ use wgui::{
widget::EventResult, widget::EventResult,
}; };
#[cfg(feature = "wayvr")]
use crate::{backend::task::TaskType, windowing::OverlaySelector};
use crate::{ use crate::{
backend::{input::HoverResult, task::TaskContainer}, backend::{
gui::panel::{GuiPanel, NewGuiPanelParams, OnCustomAttribFunc, button::BUTTON_EVENTS}, input::HoverResult,
task::{TaskContainer, TaskType},
},
gui::panel::{button::BUTTON_EVENTS, GuiPanel, NewGuiPanelParams, OnCustomAttribFunc},
overlays::edit::{ overlays::edit::{
lock::InteractLockHandler, pos::PositioningHandler, tab::ButtonPaneTabSwitcher, lock::InteractLockHandler, pos::PositioningHandler, tab::ButtonPaneTabSwitcher,
}, },
state::AppState, state::AppState,
subsystem::hid::WheelDelta, subsystem::hid::WheelDelta,
windowing::{ windowing::{
OverlayID,
backend::{DummyBackend, OverlayBackend, OverlayEventData, RenderResources, ShouldRender}, backend::{DummyBackend, OverlayBackend, OverlayEventData, RenderResources, ShouldRender},
window::OverlayWindowConfig, window::OverlayWindowConfig,
OverlayID, OverlaySelector,
}, },
}; };