mirror of
https://github.com/a-b-street/abstreet.git
synced 2024-11-24 17:37:22 +03:00
woops, turn cycler assumed everything's a traffic signal
This commit is contained in:
parent
37c9d01a6f
commit
f8c7ed5ea8
@ -68,22 +68,22 @@ impl Plugin for TurnCyclerState {
|
||||
}
|
||||
}
|
||||
TurnCyclerState::ShowIntersection(i) => {
|
||||
let (cycle, mut time_left) = ctx
|
||||
.map
|
||||
.get_traffic_signal(*i)
|
||||
.current_cycle_and_remaining_time(ctx.sim.time.as_time());
|
||||
if ctx.sim.is_in_overtime(*i) {
|
||||
// TODO Hacky way of indicating overtime. Should make a 3-case enum.
|
||||
time_left = -1.0 * si::S;
|
||||
if let Some(signal) = ctx.map.maybe_get_traffic_signal(*i) {
|
||||
let (cycle, mut time_left) =
|
||||
signal.current_cycle_and_remaining_time(ctx.sim.time.as_time());
|
||||
if ctx.sim.is_in_overtime(*i) {
|
||||
// TODO Hacky way of indicating overtime. Should make a 3-case enum.
|
||||
time_left = -1.0 * si::S;
|
||||
}
|
||||
draw_signal_diagram(
|
||||
*i,
|
||||
cycle.idx,
|
||||
Some(time_left),
|
||||
TOP_MENU_HEIGHT + 10.0,
|
||||
g,
|
||||
ctx,
|
||||
);
|
||||
}
|
||||
draw_signal_diagram(
|
||||
*i,
|
||||
cycle.idx,
|
||||
Some(time_left),
|
||||
TOP_MENU_HEIGHT + 10.0,
|
||||
g,
|
||||
ctx,
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -14,7 +14,7 @@ pub const BG_COLOR: Color = Color::grey(0.2);
|
||||
pub const PROMPT_COLOR: Color = Color::BLUE;
|
||||
pub const SELECTED_COLOR: Color = Color::RED;
|
||||
pub const HOTKEY_COLOR: Color = Color::GREEN;
|
||||
pub const INACTIVE_CHOICE_COLOR: Color = Color::grey(0.8);
|
||||
pub const INACTIVE_CHOICE_COLOR: Color = Color::grey(0.4);
|
||||
|
||||
const FONT_SIZE: u32 = 24;
|
||||
// TODO These are dependent on FONT_SIZE, but hand-tuned. Glyphs all have 0 as their height, and
|
||||
|
Loading…
Reference in New Issue
Block a user