Commit Graph

415 Commits

Author SHA1 Message Date
Dustin Carlino
1126972fdd For roads we predict to get more/less traffic from LTN interventions,
click them and explore specific routes.

UI needs plenty of work.

And the results show plenty of spurious changes not explained by new
filters.
2022-03-25 12:07:23 +00:00
Dustin Carlino
c88f7bbc53 Display info about the 4 routes more consistently [rebuild] [release] 2022-03-23 10:47:01 +00:00
Dustin Carlino
477783e430 Simplify the combinatorial explosion of Panel sizing APIs 2022-03-08 09:33:49 +00:00
Dustin Carlino
04f00b4c8a Move the LTN app header to a separate top panel. 2022-03-08 09:33:49 +00:00
Dustin Carlino
cec9b785dd Quickly sketch desired LTN cells freehand! 2022-02-24 10:36:47 +00:00
Dustin Carlino
b07177c21a Fix crash in the LTN and Ungap pathfinding tool, introduced in
2bf7ce232a
2022-02-24 09:47:10 +00:00
Dustin Carlino
bf6c5a75e9 Make the lasso tool show the polygon as it's being drawn, so it's way more clear what's going to happen 2022-02-24 09:33:12 +00:00
Dustin Carlino
78e4fc3f80 Make the lasso tool (buried in an old experiment in story mapping) a bit more usable, and lift it to widgetry 2022-02-24 09:33:12 +00:00
Dustin Carlino
7bb6132726 Open OSM from map_editor
(Move open_browser to widgetry)
2022-02-23 14:43:58 +00:00
Dustin Carlino
6ddc35f5a8 Upgrade usvg and friends 2022-02-22 17:24:03 +00:00
Dustin Carlino
bf6ed53ec3 Upgrade winit and co. This appears to remove a bunch of duplicate old
versions of various transitive dependencies, so it should help compile
times a bit!

No behavioral diff that I can see, but the winit CHANGELOG is
formidable. I suspect there are platform-specific differences with
scroll speed/direction, initial window size behavior, etc that people
will slowly start reporting after the next weekly release.
2022-02-22 16:50:53 +00:00
Dustin Carlino
d141a2a810 Upgrade all geo dependencies! No behavioral difference 2022-02-22 16:45:49 +00:00
Dustin Carlino
2bf7ce232a Port map_editor to the shared map-space World abstraction. #763
There may be small UX bugs, but the code is vastly simpler now, and all
main functionality works fine.
2022-02-20 11:01:57 +00:00
Dustin Carlino
f14554f6b7 Lift URLManager from map_gui to widgetry 2022-02-19 15:14:53 +00:00
Dustin Carlino
aa48def2ba Lift FileLoader and friends from map_gui to widgetry
(Very tricky dependency shuffling...)
2022-02-19 15:07:07 +00:00
Dustin Carlino
3b21bf6e87 Lift PopupMsg to widgetry 2022-02-19 14:38:26 +00:00
Dustin Carlino
c1a58e683b Use a 'back button' style a few places in the LTN tool, from UX session with Robin 2022-02-08 09:17:28 +00:00
Dustin Carlino
e542011614 More fluid UI for comparing traffic counts -- hotkeys
Had to change the API of on_click...
2022-01-27 15:13:24 +00:00
Dustin Carlino
5dfb8f26f0 Refactor ColorNetwork to use ToggleZoomed 2022-01-26 11:31:33 +00:00
Dustin Carlino
ec0fd1b94d Stop running out of video memory in the LTN impact prediction tool.
- One batch for all neighborhoods
- One batch for all roads/intersections
- No pre-built tooltips

This all comes at more repetitive code. Need to make World generate some
stuff dynamically (#763)
2022-01-26 11:26:03 +00:00
Dustin Carlino
a14d6b3810 Better errors when core Line stuff breaks.
... and plumbing it everywhere
2022-01-18 10:26:33 +00:00
Dustin Carlino
bd340a1970 Switch from std::fs to fs_err. When files aren't found, the error message actually includes the path! 2022-01-17 17:30:51 +00:00
Dustin Carlino
7d6f133f1c Make the LTN tool handle roads that already ban cars.
- Don't allow filtering them
- Don't cross them when calculating cell connectivity
- Create special green cells for them, and don't count towards the
  disconnected warning
2021-12-31 16:28:51 +00:00
Dustin Carlino
bffa469396 Print LTN pathfinding info in the panel, not a tooltip. The tooltips
clash with clicking on roads to filter them, and probably weren't
terribly discoverable anyway.
2021-12-29 18:23:33 +00:00
Dustin Carlino
f7f23465c1 Edit modal filters from within the pathfinding view too.
Slow implementation, but at least it works
2021-12-29 13:14:44 +00:00
Dustin Carlino
fbc847f48c Share modal filter management between connectivity and rat run states 2021-12-29 12:38:11 +00:00
Dustin Carlino
1e414d0f31 Share the panel style too for pathfinding. (It was a bigger change, easier to separate) 2021-12-29 11:54:12 +00:00
Dustin Carlino
83bf6953d1 Rank each street inside a neighborhood as quiet/busy, based on the number of rat-runs through it.
Show this through a heatmap and tooltips
2021-12-19 12:06:42 +00:00
Dustin Carlino
eb4060b071 Improve LTN tool rendering when zoomed in. Outlines around selected
objects are less thick and opaque, to cover up less of the road.
2021-12-17 11:37:54 +00:00
Dustin Carlino
e77ce12537 Draw custom LTN boundaries, by painting blocks. #794
Still need to think through the UX of how to manage custom boundaries
and incorporate them in the "browse neighborhoods" screen.
2021-12-14 10:33:42 -08:00
Dustin Carlino
331a3674b1 Restore spinner values in replacement panels.
First use case is in the LTN route tool. I audited other UIs using
spinners and panel restore -- there are none.
2021-11-21 11:58:37 -08:00
Dustin Carlino
2f18e4badc Remove broken code for Leaflet-named screenshots. #440
Gave up on Leaflet in favor of Mapbox GL, and the math was always wrong
here anyway.
2021-11-11 09:02:29 -08:00
Dustin Carlino
f751b7d54b Removing the pregame color scheme 2021-11-06 10:33:11 -07:00
Dustin Carlino
401d5fe297 Make it even easier to debug block order 2021-11-02 16:31:29 -07:00
Dustin Carlino
00df96f173
Render A/B Street's lanes and traffic simulation on top of Mapbox GL (#788)
[rebuild] [release]
2021-10-31 13:52:58 -07:00
Dustin Carlino
5e5e411de8
Detect neighborhoods with the new block abstraction (#793) 2021-10-28 10:11:57 -07:00
Dustin Carlino
9f86365cf6 Upgrade to rust 1.56 and cutover to rust edition 2021 2021-10-21 09:38:06 -07:00
Dustin Carlino
48ed3683e5 Fix the thickness math 2021-10-18 17:54:58 -07:00
Dustin Carlino
002b41816d Actually, generalize UnzoomedLines to handle circles too. Make the route sketcher nicer to use at all zoom levels! 2021-10-18 17:54:58 -07:00
Dustin Carlino
749a7384c1 Make the route sketcher tool use UnzoomedLines, making it much easier to see the route on large maps.
Note the draggable waypoint circles are still a fixed size; you can't
easily manipulate the route when unzoomed far.
2021-10-18 17:54:58 -07:00
Dustin Carlino
b5cca3f18c Refactor a helper to draw unzoomed thick lines at a constant width.
To start, just make the bike network use this.
2021-10-18 17:54:58 -07:00
Dustin Carlino
a643c35014 Long overdue round of clippy 2021-10-18 13:52:10 -07:00
Dustin Carlino
7d57deb8ae Move the focus state from Panel up to widgetry in general, so two different panels don't clash 2021-10-14 17:57:03 -07:00
Dustin Carlino
698e26a831 Use Outcome::Focused to match existing semantics better 2021-10-14 17:57:03 -07:00
Dustin Carlino
b024fa958a It's hard to focus...
While dragging a card or using a dropdown or persistent split menu,
prevent other widgets in the same panel from handling events.
2021-10-14 17:57:03 -07:00
Michael Kirk
56323116e1 Don't show details widget until 2+ waypoints
Otherwise there's no route, also this helps focus on the "add waypoint"
instructions.
2021-10-11 19:42:03 -07:00
Michael Kirk
738c4ab865 clean up set_hovering tooltip style 2021-10-11 16:03:05 -07:00
Michael Kirk
476f19142f
Consistent panel width (#772)
* reorder tabs: plan trip before adding lanes

This order of tasks should be more logical for most people.

* Copy tweaks

"trip" is better than "route" since you don't pick the route, only the
start/end points. The route is inferred based on the available roads.

* Smaller elevation plot

it was much wider than any other UI element, meaning the column
dramatically jumps sizes when switching to this tab.

* better align line-plot x-axis

* Avoid jittering UI while switching through tabs.

* fixup! Avoid jittering UI while switching through tabs.

* fixup! Copy tweaks

* fixup! reorder tabs: plan trip before adding lanes

* fixup! Copy tweaks
2021-10-11 15:02:41 -07:00
Dustin Carlino
a8e9a1fd08 Variable rename for more clear code; feedback from #764 2021-10-07 14:51:28 -07:00
Dustin Carlino
ddbadd2da3 Make waypoints and routes coexist in the same World. #763 [rebuild] [release]
The pattern is somewhat similar to how different components share a
Panel. The "outer-most" piece owns the World, calls into InputWaypoints
to fill out the World, and plumbs un-handled events to it.

Also handle a tricky low-level bug with ctx.normal_left_click() and
detecting drags vs clicks.

Now finally there's no buggy conflicts between dragging waypoints and
hovering on the alternate routes!
2021-10-03 14:28:44 -07:00