mirror of
https://github.com/a-b-street/abstreet.git
synced 2024-11-29 04:35:51 +03:00
cleaning up intersection colors
This commit is contained in:
parent
92f8aeff1e
commit
c58b91ee4d
@ -115,8 +115,6 @@ wait slow down even more -- before any of this change, lanes on adjacent roads s
|
||||
- waiting on https://github.com/paholg/dimensioned/issues/31 to release
|
||||
|
||||
|
||||
- remove different colors for changed intersections
|
||||
- tune traffic light colors
|
||||
- draw stop signs as rounded ellipse (hard without using rotations in GfxCtx)
|
||||
|
||||
|
||||
|
@ -72,28 +72,16 @@
|
||||
0.0,
|
||||
1.0
|
||||
],
|
||||
"ChangedStopSignIntersection": [
|
||||
0.0,
|
||||
1.0,
|
||||
0.0,
|
||||
"UnchangedIntersection": [
|
||||
0.6,
|
||||
0.6,
|
||||
0.6,
|
||||
1.0
|
||||
],
|
||||
"ChangedTrafficSignalIntersection": [
|
||||
1.0,
|
||||
0.65,
|
||||
0.0,
|
||||
1.0
|
||||
],
|
||||
"TrafficSignalIntersection": [
|
||||
1.0,
|
||||
1.0,
|
||||
0.0,
|
||||
1.0
|
||||
],
|
||||
"NormalIntersection": [
|
||||
0.3,
|
||||
0.3,
|
||||
0.3,
|
||||
"ChangedIntersection": [
|
||||
0.8,
|
||||
0.6,
|
||||
0.6,
|
||||
1.0
|
||||
],
|
||||
"Selected": [
|
||||
@ -247,9 +235,9 @@
|
||||
1.0
|
||||
],
|
||||
"TrafficSignalBox": [
|
||||
0.8439573,
|
||||
0.49223435,
|
||||
0.26289922,
|
||||
0.0,
|
||||
0.0,
|
||||
0.0,
|
||||
1.0
|
||||
],
|
||||
"TrafficSignalGreen": [
|
||||
|
@ -22,10 +22,10 @@ pub enum Colors {
|
||||
SidewalkMarking,
|
||||
Crosswalk,
|
||||
StopSignMarking,
|
||||
ChangedStopSignIntersection,
|
||||
ChangedTrafficSignalIntersection,
|
||||
TrafficSignalIntersection,
|
||||
NormalIntersection,
|
||||
|
||||
UnchangedIntersection,
|
||||
ChangedIntersection,
|
||||
|
||||
Selected,
|
||||
Turn,
|
||||
ConflictingTurn,
|
||||
|
@ -253,21 +253,17 @@ impl UI {
|
||||
|
||||
fn color_intersection(&self, id: map_model::IntersectionID) -> Color {
|
||||
let i = self.map.get_i(id);
|
||||
// TODO weird to squeeze in some quick logic here?
|
||||
let default_color = if let Some(s) = self.control_map.traffic_signals.get(&i.id) {
|
||||
if s.changed() {
|
||||
self.cs.get(Colors::ChangedTrafficSignalIntersection)
|
||||
} else {
|
||||
self.cs.get(Colors::TrafficSignalIntersection)
|
||||
}
|
||||
let changed = if let Some(s) = self.control_map.traffic_signals.get(&i.id) {
|
||||
s.changed()
|
||||
} else if let Some(s) = self.control_map.stop_signs.get(&i.id) {
|
||||
if s.changed() {
|
||||
self.cs.get(Colors::ChangedStopSignIntersection)
|
||||
} else {
|
||||
self.cs.get(Colors::NormalIntersection)
|
||||
}
|
||||
s.changed()
|
||||
} else {
|
||||
self.cs.get(Colors::NormalIntersection)
|
||||
false
|
||||
};
|
||||
let default_color = if changed {
|
||||
self.cs.get(Colors::ChangedIntersection)
|
||||
} else {
|
||||
self.cs.get(Colors::UnchangedIntersection)
|
||||
};
|
||||
|
||||
self.current_selection_state
|
||||
|
Loading…
Reference in New Issue
Block a user