mirror of
https://github.com/a-b-street/abstreet.git
synced 2024-11-28 12:12:00 +03:00
mouseover areas by flag
This commit is contained in:
parent
134756fb22
commit
b366a2dccd
@ -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,
|
||||
|
@ -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(_) => {}
|
||||
_ => {
|
||||
|
Loading…
Reference in New Issue
Block a user