wgui: components base, anyhow event listener callbacks, 📦📎-fixes, typo fixes

This commit is contained in:
Aleksander
2025-08-13 17:10:00 +02:00
parent 93a3fee349
commit a79ed0839b
23 changed files with 104 additions and 72 deletions

View File

@@ -9,6 +9,8 @@ pub const BAR_NAME: &str = "bar";
struct BarState {}
#[allow(clippy::significant_drop_tightening)]
#[allow(clippy::for_kv_map)] // TODO: remove later
#[allow(clippy::match_same_arms)] // TODO: remove later
pub fn create_bar<O>(app: &mut AppState) -> anyhow::Result<OverlayData<O>>
where
O: Default,

View File

@@ -10,6 +10,9 @@ use crate::{
const SETTINGS_NAME: &str = "settings";
#[allow(unreachable_code)]
#[allow(unused_variables)]
#[allow(dead_code)]
pub fn create_custom(
app: &mut AppState,
name: Arc<str>,

View File

@@ -194,6 +194,7 @@ where
move |common, data, _app, _state| {
common.alterables.trigger_haptics();
on_enter_anim(k.clone(), common, data);
Ok(())
}
}),
);
@@ -206,6 +207,7 @@ where
move |common, data, _app, _state| {
common.alterables.trigger_haptics();
on_leave_anim(k.clone(), common, data);
Ok(())
}
}),
);
@@ -222,6 +224,7 @@ where
handle_press(app, &k, state, button);
on_press_anim(k.clone(), common, data);
Ok(())
}
}),
);
@@ -235,6 +238,7 @@ where
if handle_release(app, &k, state) {
on_release_anim(k.clone(), common, data);
}
Ok(())
}
}),
);
@@ -252,6 +256,7 @@ where
} else {
on_release_anim(k.clone(), common, data);
}
Ok(())
}
}),
);

View File

@@ -93,6 +93,7 @@ where
EventListenerKind::InternalStateChange,
Box::new(move |common, data, _, _| {
clock_on_tick(&clock, common, data);
Ok(())
}),
);
}