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,
};
use crate::{backend::task::ManagerTask, state::AppState, windowing::OverlaySelector};
use crate::{
backend::task::{ManagerTask, TaskType},
state::AppState,
windowing::OverlaySelector,
};
#[cfg(feature = "wayvr")]
use crate::backend::{task::TaskType, wayvr::WayVRAction};
use crate::backend::wayvr::WayVRAction;
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 {
#[cfg(feature = "wayvr")]
"::DashToggle" => Box::new(move |_common, _data, app, _| {
#[cfg(feature = "wayvr")]
app.tasks
.enqueue(TaskType::WayVR(WayVRAction::ToggleDashboard));
Ok(EventResult::Consumed)

View File

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