commit 196535ce84608449c9b95553f13cbeab456d55ee
parent f1835d01199b6e19d713c8ffa002401de9c3201e
Author: William Casarin <jb55@jb55.com>
Date: Tue, 16 Jul 2024 12:44:15 -0700
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>
Diffstat:
1 file changed, 8 insertions(+), 0 deletions(-)
diff --git a/src/ui/anim.rs b/src/ui/anim.rs
@@ -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)
+}