mirror of
https://github.com/a-b-street/abstreet.git
synced 2024-09-19 22:57:52 +03:00
Until there's a faster implementation, just flag-guard selecting unzoomed agents
This commit is contained in:
parent
38394c4a08
commit
4a197fa13d
@ -51,6 +51,9 @@ pub fn main() {
|
||||
if args.enabled("--lowzoom") {
|
||||
opts.min_zoom_for_detail = 1.0;
|
||||
}
|
||||
if args.enabled("--select_unzoomed_agents") {
|
||||
opts.select_unzoomed_agents = true;
|
||||
}
|
||||
|
||||
if let Some(x) = args.optional("--color_scheme") {
|
||||
let mut ok = false;
|
||||
|
@ -29,6 +29,9 @@ pub struct Options {
|
||||
pub min_zoom_for_detail: f64,
|
||||
/// Draw buildings in different perspectives
|
||||
pub camera_angle: CameraAngle,
|
||||
/// Allow selecting agents when unzoomed. Flagged off by default because the implementation is
|
||||
/// too slow.
|
||||
pub select_unzoomed_agents: bool,
|
||||
|
||||
/// How much to advance the sim with one of the speed controls
|
||||
pub time_increment: Duration,
|
||||
@ -54,6 +57,7 @@ impl Options {
|
||||
color_scheme: ColorSchemeChoice::Standard,
|
||||
min_zoom_for_detail: 4.0,
|
||||
camera_angle: CameraAngle::TopDown,
|
||||
select_unzoomed_agents: false,
|
||||
|
||||
time_increment: Duration::minutes(10),
|
||||
dont_draw_time_warp: false,
|
||||
|
@ -730,6 +730,10 @@ fn mouseover_unzoomed_agent_circle(ctx: &mut EventCtx, app: &mut App) {
|
||||
// - We could build and cache a quadtree if we're paused
|
||||
// - We could always build the quadtree as we loop over unzoomed agents
|
||||
// - At least do this while we draw? Don't call twice.
|
||||
if !app.opts.select_unzoomed_agents {
|
||||
return;
|
||||
}
|
||||
|
||||
let cursor = if let Some(pt) = ctx.canvas.get_cursor_in_map_space() {
|
||||
pt
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user