-
Notifications
You must be signed in to change notification settings - Fork 329
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Nicer (& fixed up) help texts for space views #2070
Conversation
on the 3D it says |
7050b40
to
c6c62cd
Compare
pub fn help_text(re_ui: &re_ui::ReUi) -> egui::WidgetText { | ||
let pan_mouse = egui::PointerButton::Secondary; | ||
let roll_mouse = egui::PointerButton::Middle; | ||
let roll_mouse_alt = egui::PointerButton::Primary; | ||
let roll_modifier = egui::Modifiers::ALT; | ||
let speed_up = egui::Modifiers::SHIFT; | ||
let slow_down = egui::Modifiers::CTRL; | ||
let restore_key = egui::Key::Escape; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would be nice if these semantic constants were shared with the values used here:
rerun/crates/re_viewer/src/ui/view_spatial/eye.rs
Lines 298 to 317 in 78c9936
pub fn update(&mut self, response: &egui::Response, drag_threshold: f32) -> bool { | |
let mut did_interact = false; | |
if response.drag_delta().length() > drag_threshold { | |
if response.dragged_by(egui::PointerButton::Middle) | |
|| (response.dragged_by(egui::PointerButton::Primary) | |
&& response.ctx.input(|i| i.modifiers.alt)) | |
{ | |
if let Some(pointer_pos) = response.ctx.pointer_latest_pos() { | |
self.roll(&response.rect, pointer_pos, response.drag_delta()); | |
did_interact = true; | |
} | |
} else if response.dragged_by(egui::PointerButton::Primary) { | |
self.rotate(response.drag_delta()); | |
did_interact = true; | |
} else if response.dragged_by(egui::PointerButton::Secondary) { | |
self.translate(response.drag_delta()); | |
did_interact = true; | |
} | |
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
was too lazy to go that extra mile, but yeah at least some of those are pretty easy. Let's put them somewhere central!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
that would be nice
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done that now. Sadly lots of controls are hidden inside other egui constructs like scrollview or plot
"primary" would be more correct, but that's a mouth full
Introduced a little utility for this purpose. Not very well-rounded, but a good starting point I like to think :)
Help texts for different space views:
3D:
2D:
Bar chart:
Time series:
Checklist