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
|
- 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)
|
- draw stop signs as rounded ellipse (hard without using rotations in GfxCtx)
|
||||||
|
|
||||||
|
|
||||||
|
@ -72,28 +72,16 @@
|
|||||||
0.0,
|
0.0,
|
||||||
1.0
|
1.0
|
||||||
],
|
],
|
||||||
"ChangedStopSignIntersection": [
|
"UnchangedIntersection": [
|
||||||
0.0,
|
0.6,
|
||||||
1.0,
|
0.6,
|
||||||
0.0,
|
0.6,
|
||||||
1.0
|
1.0
|
||||||
],
|
],
|
||||||
"ChangedTrafficSignalIntersection": [
|
"ChangedIntersection": [
|
||||||
1.0,
|
0.8,
|
||||||
0.65,
|
0.6,
|
||||||
0.0,
|
0.6,
|
||||||
1.0
|
|
||||||
],
|
|
||||||
"TrafficSignalIntersection": [
|
|
||||||
1.0,
|
|
||||||
1.0,
|
|
||||||
0.0,
|
|
||||||
1.0
|
|
||||||
],
|
|
||||||
"NormalIntersection": [
|
|
||||||
0.3,
|
|
||||||
0.3,
|
|
||||||
0.3,
|
|
||||||
1.0
|
1.0
|
||||||
],
|
],
|
||||||
"Selected": [
|
"Selected": [
|
||||||
@ -247,9 +235,9 @@
|
|||||||
1.0
|
1.0
|
||||||
],
|
],
|
||||||
"TrafficSignalBox": [
|
"TrafficSignalBox": [
|
||||||
0.8439573,
|
0.0,
|
||||||
0.49223435,
|
0.0,
|
||||||
0.26289922,
|
0.0,
|
||||||
1.0
|
1.0
|
||||||
],
|
],
|
||||||
"TrafficSignalGreen": [
|
"TrafficSignalGreen": [
|
||||||
|
@ -22,10 +22,10 @@ pub enum Colors {
|
|||||||
SidewalkMarking,
|
SidewalkMarking,
|
||||||
Crosswalk,
|
Crosswalk,
|
||||||
StopSignMarking,
|
StopSignMarking,
|
||||||
ChangedStopSignIntersection,
|
|
||||||
ChangedTrafficSignalIntersection,
|
UnchangedIntersection,
|
||||||
TrafficSignalIntersection,
|
ChangedIntersection,
|
||||||
NormalIntersection,
|
|
||||||
Selected,
|
Selected,
|
||||||
Turn,
|
Turn,
|
||||||
ConflictingTurn,
|
ConflictingTurn,
|
||||||
|
@ -253,21 +253,17 @@ impl UI {
|
|||||||
|
|
||||||
fn color_intersection(&self, id: map_model::IntersectionID) -> Color {
|
fn color_intersection(&self, id: map_model::IntersectionID) -> Color {
|
||||||
let i = self.map.get_i(id);
|
let i = self.map.get_i(id);
|
||||||
// TODO weird to squeeze in some quick logic here?
|
let changed = if let Some(s) = self.control_map.traffic_signals.get(&i.id) {
|
||||||
let default_color = if let Some(s) = self.control_map.traffic_signals.get(&i.id) {
|
s.changed()
|
||||||
if s.changed() {
|
|
||||||
self.cs.get(Colors::ChangedTrafficSignalIntersection)
|
|
||||||
} else {
|
|
||||||
self.cs.get(Colors::TrafficSignalIntersection)
|
|
||||||
}
|
|
||||||
} else if let Some(s) = self.control_map.stop_signs.get(&i.id) {
|
} else if let Some(s) = self.control_map.stop_signs.get(&i.id) {
|
||||||
if s.changed() {
|
s.changed()
|
||||||
self.cs.get(Colors::ChangedStopSignIntersection)
|
|
||||||
} else {
|
|
||||||
self.cs.get(Colors::NormalIntersection)
|
|
||||||
}
|
|
||||||
} else {
|
} 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
|
self.current_selection_state
|
||||||
|
Loading…
Reference in New Issue
Block a user