From 03fade1aa77775f11140313de5882efc50a776e5 Mon Sep 17 00:00:00 2001 From: Dustin Carlino Date: Thu, 29 Apr 2021 13:11:49 -0700 Subject: [PATCH] Change the tooltip wording --- game/src/edit/traffic_signals/mod.rs | 32 +++++++++++++++------------- 1 file changed, 17 insertions(+), 15 deletions(-) diff --git a/game/src/edit/traffic_signals/mod.rs b/game/src/edit/traffic_signals/mod.rs index 1e83151dd7..1ee250fc9b 100644 --- a/game/src/edit/traffic_signals/mod.rs +++ b/game/src/edit/traffic_signals/mod.rs @@ -427,26 +427,28 @@ impl State for TrafficSignalEditor { if let Some((id, next_priority)) = self.movement_selected { if let Some(pri) = next_priority { let signal = app.primary.map.get_traffic_signal(id.parent); - self.tooltip = Some(Text::from_all(vec![ - Line(format!( - "This {} is {} for this stage. ", - if id.crosswalk { "crosswalk" } else { "turn" }, - match signal.stages[self.current_stage].get_priority_of_movement(id) { - TurnPriority::Protected => "protected", - TurnPriority::Yield => "permitted", - TurnPriority::Banned => "not allowed", - } - )), + let mut txt = Text::new(); + txt.add_line(Line(format!( + "{} {}", + match signal.stages[self.current_stage].get_priority_of_movement(id) { + TurnPriority::Protected => "Protected", + TurnPriority::Yield => "Yielding", + TurnPriority::Banned => "Forbidden", + }, + if id.crosswalk { "crosswalk" } else { "turn" }, + ))); + txt.add_appended(vec![ Line("Click").fg(ctx.style().text_hotkey_color), Line(format!( - " to {}.", + " to {}", match pri { - TurnPriority::Protected => "make it protected", - TurnPriority::Yield => "make it permitted", - TurnPriority::Banned => "remove it", + TurnPriority::Protected => "add it as protected", + TurnPriority::Yield => "allow it after yielding", + TurnPriority::Banned => "forbid it", } )), - ])); + ]); + self.tooltip = Some(txt); if app.per_obj.left_click( ctx, format!(