only 3 colors for turn icons... match current state, not possible changes

This commit is contained in:
Dustin Carlino 2018-12-04 13:37:52 -08:00
parent 33f36954c8
commit accfeaf457

View File

@ -285,31 +285,17 @@ impl Plugin for TrafficSignalEditor {
}
let cycle = &ctx.map.get_traffic_signal(*i).cycles[*current_cycle];
let could_be_priority = cycle.could_be_priority_turn(t, ctx.map);
match cycle.get_priority(t) {
Some(match cycle.get_priority(t) {
TurnPriority::Priority => {
Some(ctx.cs.get("priority turn in current cycle", Color::GREEN))
ctx.cs.get("priority turn in current cycle", Color::GREEN)
}
TurnPriority::Yield => if could_be_priority {
Some(
ctx.cs
.get("yield turn that could be priority turn", Color::YELLOW),
)
} else {
Some(
ctx.cs
.get("yield turn in current cycle", Color::rgb(255, 105, 180)),
)
},
TurnPriority::Stop => if could_be_priority {
Some(ctx.cs.get("stop turn that could be priority", Color::RED))
} else {
Some(
ctx.cs
.get("turn conflicts with current cycle", Color::BLACK),
)
},
}
TurnPriority::Yield => ctx
.cs
.get("yield turn in current cycle", Color::rgb(255, 105, 180)),
TurnPriority::Stop => ctx
.cs
.get("turn conflicts with current cycle", Color::BLACK),
})
}
_ => None,
}