Skip to content

Commit

Permalink
tooltip for track selection option
Browse files Browse the repository at this point in the history
  • Loading branch information
mrDIMAS committed Jan 18, 2025
1 parent 2fba92a commit 292a34d
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions editor/src/world/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ use crate::{
TreeBuilder, TreeExpansionStrategy, TreeMessage, TreeRoot, TreeRootBuilder,
TreeRootMessage,
},
utils::make_image_button_with_tooltip,
utils::{make_image_button_with_tooltip, make_simple_tooltip},
widget::{WidgetBuilder, WidgetMessage},
window::{WindowBuilder, WindowTitle},
wrap_panel::WrapPanelBuilder,
Expand Down Expand Up @@ -231,13 +231,22 @@ impl WorldViewer {

let size = 15.0;

let track_selection_tooltip = make_simple_tooltip(
ctx,
"Track selection. If enabled, \
then the world viewer will automatically scroll to the \
selected object. If multiple objects are selected then \
first one will be brought into view.",
);

let track_selection = ToggleButtonBuilder::new(
WidgetBuilder::new()
.with_tab_index(Some(3))
.with_vertical_alignment(VerticalAlignment::Center)
.with_margin(Thickness::uniform(1.0))
.with_width(22.0)
.with_height(22.0),
.with_height(22.0)
.with_tooltip(track_selection_tooltip),
)
.with_content(
ImageBuilder::new(
Expand Down

0 comments on commit 292a34d

Please sign in to comment.