anim: add hover_expand_small

I though I would need this, but I didn't end up using it. Keep it here
anyways for now

Signed-off-by: William Casarin <jb55@jb55.com>
This commit is contained in:
William Casarin
2024-07-16 12:44:15 -07:00
parent f1835d0119
commit 196535ce84

View File

@@ -17,3 +17,11 @@ pub fn hover_expand(
let size = size + val * expand_size;
(rect, size, response)
}
pub fn hover_expand_small(ui: &mut egui::Ui, id: egui::Id) -> (egui::Rect, f32, egui::Response) {
let size = 10.0;
let expand_size = 5.0;
let anim_speed = 0.05;
hover_expand(ui, id, size, expand_size, anim_speed)
}