Skip to content
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

Add tooltip to timeline selector #5842

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
21 changes: 20 additions & 1 deletion crates/re_time_panel/src/time_control_ui.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,26 @@ impl TimeControlUi {
time_control.set_timeline(*timeline);
}
}
});
})
.response
.on_hover_ui(|ui| {
re_ui::markdown_ui(
ui,
egui::Id::new("timeline_selector_tooltip"),
r"
Select timeline.

Each piece of logged data is associated with one or more timelines.

The logging SDK always creates two timelines for you:
* `log_tick` - a sequence timeline with the sequence number of the log call
* `log_time` - a temporal timeline with the time of the log call

You can also define your own timelines, e.g. for sensor time or camera frame number.
"
.trim(),
);
})
});
}

Expand Down
2 changes: 2 additions & 0 deletions crates/re_ui/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1207,6 +1207,8 @@ pub fn help_hover_button(ui: &mut egui::Ui) -> egui::Response {
}

/// Show some markdown
///
/// The `id` should be globally unique and persistent.
pub fn markdown_ui(ui: &mut egui::Ui, id: egui::Id, markdown: &str) {
use parking_lot::Mutex;
use std::sync::Arc;
Expand Down