dave: fix sidebar click
Fixes: #837 Signed-off-by: William Casarin <jb55@jb55.com>
This commit is contained in:
@@ -279,7 +279,8 @@ impl Chrome {
|
||||
}
|
||||
|
||||
if ui.add(expand_side_panel_button()).clicked() {
|
||||
self.active = (self.active + 1) % (self.apps.len() as i32);
|
||||
//self.active = (self.active + 1) % (self.apps.len() as i32);
|
||||
// TODO: collapse sidebar ?
|
||||
}
|
||||
|
||||
ui.add_space(4.0);
|
||||
|
||||
@@ -316,7 +316,7 @@ impl DaveAvatar {
|
||||
}
|
||||
|
||||
pub fn render(&mut self, rect: Rect, ui: &mut egui::Ui) -> Response {
|
||||
let response = ui.allocate_rect(rect, egui::Sense::drag());
|
||||
let response = ui.allocate_rect(rect, egui::Sense::CLICK | egui::Sense::DRAG);
|
||||
|
||||
// Update rotation based on drag or animation
|
||||
if response.dragged() {
|
||||
@@ -330,6 +330,8 @@ impl DaveAvatar {
|
||||
|
||||
// Apply rotations (order matters)
|
||||
self.rotation = y_rotation.multiply(&x_rotation).multiply(&self.rotation);
|
||||
} else if response.clicked() {
|
||||
self.random_nudge();
|
||||
} else {
|
||||
// Continuous rotation - reduced speed and simplified axis
|
||||
let friction = 0.95;
|
||||
|
||||
Reference in New Issue
Block a user