mouseover areas by flag

This commit is contained in:
Dustin Carlino 2019-02-14 18:42:24 -08:00
parent 134756fb22
commit b366a2dccd
2 changed files with 6 additions and 1 deletions

View File

@ -32,6 +32,10 @@ pub struct Flags {
#[structopt(long = "dont_draw_lane_markings")]
pub dont_draw_lane_markings: bool,
/// Allow areas to be moused over?
#[structopt(long = "debug_areas")]
pub debug_areas: bool,
/// Enable cpuprofiler?
#[structopt(long = "enable_profiler")]
pub enable_profiler: bool,

View File

@ -412,13 +412,14 @@ impl<S: UIState> UI<S> {
);
objects.reverse();
let debug_areas = self.state.get_state().primary.current_flags.debug_areas;
for obj in objects {
// Don't mouseover parcels or areas.
// TODO Might get fancier rules in the future, so we can't mouseover irrelevant things
// in intersection editor mode, for example.
match obj.get_id() {
ID::Parcel(_) => {}
ID::Area(_) => {}
ID::Area(_) if !debug_areas => {}
// Thick roads are only shown when unzoomed, when we don't mouseover at all.
ID::Road(_) => {}
_ => {