widgetry, geom, and abstutil may wind up on crates.io in some form to
let other projects use widgetry. abstio has A/B Street-specific tricks
for reading data on native/web. Note widgetry still depends on abstio,
will figure out how to clean that up next.
data/ directory, because they're statically bundled; they're not
actually read from the filesystem. #253
Two SVGs get duplicated between widgetry and abst assets -- dont_walk
and arrow_drop_down.
remote trip goes between two locations off-map, specified just by a GPS
coordinate. The trips aren't simulated at all. They were originally
added to support Orestis's pandemic model, to handle transmission
off-map in shared buildings. This work has died off, there are no other
anticipated use cases for remote trips, and they complicate bigger
refactorings. #258
This also has the nice side effect of substantially reducing scenario
size -- huge_seattle from 177MB to 147MB. That unused metadata was
expensive!
struct. Whatever choices we make next about naming cities hierarchially
or not can be managed in just one place. #326
This is a pretty huge change, but the compiler gives reasonable
confidence it's correct. More bugs are likely to crop up in the next
step, when filenames start being namespaced by the city too.
recreated while we drag.
But there's still something wrong, because in the OSM viewer with a huge
list of buttons, scrolling is incredibly laggy while dragging, but not
when using the scroll wheel.
Nothing about it is specific to A/B Street, and other apps built with
widgetry could organize themselves as a stack of states. This is also a
first step towards sharing more common code between A/B Street and a
future OSM viewer.
Mostly mechanical change. Some more cleanup / documentation coming up
next.
* Initial storing of intersection delays
* Initial highlighting of delays on route
* Added label of delay
* Info overlay works
* Added supoprt for pedestrian delays (only intersection delay currently)
Bike also works, but is treated as a car, so the avg speed is flagged as very slow (Needs fix)
* Capitalised describe trip phase
Now uses min of (speed limit and vehicle max speed) for the maximum speed check
Added trip blocked time query
Lots of work on tool tips
Icons are broke
* Nearly complete, just fmting and a crash to fix
Color assertion?
* Fixed text font colour crash
Added new custom TextSpan size function
* Cargo +nightly fmt
* Cargo +nightly fmt
* Clion auto import formatting
Doesn't quite match the existing "changes"
* Fixing merge issues
* Fixing icon placement issues
* Requested changes (Part 1)
* Requested changes (Part 2)
Co-authored-by: Sam <a>
Co-authored-by: Dustin Carlino <dabreegster@gmail.com>
When I added web support in February, it was easier to get started with
stdweb, since it has the nice cargo web tool. However, stdweb is
unmaintained, winit is deprecating support for it, and the next steps
for web (downloading maps dynamically) have better support for web-sys.
With Alvin's guidance, I got
https://github.com/dabreegster/minimal_websys_winit_glow_demo working
first. This PR cuts A/B Street over too.
I tested abst and the widgetry demo in both native and web. The only
major regression from stdweb is the canvas placement and size. I
attempted some fixes, but at this point, I'll leave it as a smaller
followup instead.
* match unfork to fork
TBH I don't know of problem currently being caused by this, but it
seemed wrong to unfork without a matching fork.
* variable rename (no behavior change)
"c" was holdover from when panels were called composites
* resize container dims when window resizes
* make panel.top_level private
* Show/Hide scrollbars as window is resized
* alignment demo
* Fix scrollbar positioning
* separate out scrollbar work so we can profile it easier
* mem::replace is more concise than mem::swap
* fixup size of MaxPercent
* restore scroll position after redrawing scroll bars
* Fixed ui being able to select traffic light times that are shorter than the time it takes to walk across the crosswalk
* Fixing operands and renaming
* Fixed spinner out of bounds issue
Traffic light generation now, ensures that there is enough time to cross the crosswalk
And enforces the minimum time duration
* Cargo +nightly fmt
* Request fixes: https://github.com/dabreegster/abstreet/pull/346
Still need some things to clarify:
Spinner checks on increment/decrement
Calling enforce_minimum_crosswalk_time inside get_possible_policies, requires the removal or modification of the validation function
* Moved enforce_minimum_crosswalk_time inside get_possible_policies
Now runs stage_time_validation at the end of get_possible_policies and removes invalid policies
Could do the same with the validation function as well?
* Fixing import order
* Fixed ui being able to select traffic light times that are shorter than the time it takes to walk across the crosswalk
* Fixing operands and renaming
* Fixed spinner out of bounds issue
Traffic light generation now, ensures that there is enough time to cross the crosswalk
And enforces the minimum time duration
* Cargo +nightly fmt
* Request fixes: https://github.com/dabreegster/abstreet/pull/346
Still need some things to clarify:
Spinner checks on increment/decrement
Calling enforce_minimum_crosswalk_time inside get_possible_policies, requires the removal or modification of the validation function
* Moved enforce_minimum_crosswalk_time inside get_possible_policies
Now runs stage_time_validation at the end of get_possible_policies and removes invalid policies
Could do the same with the validation function as well?
* Fixing import order
* Moving stage validation inside validation function
Co-authored-by: Sam <a>
We were drawing "pop-up" style buttons in several places, using
copy/pasted logic - which was simple enough when using a unicode glyph.
But we want to use a different glyph which isn't in our font. Further,
using an svg like this gives us finer grained control around the layout
around the button "handle" than we could get with just space characters.
Just a few changes to make usvg not depend on Rustybuzz (which is still
in the middle of becoming a pure Rust library). It probably only works
with English fonts, but for the moment, it moves us forward.
* maintain whitespace in text (except trailing)
Note, until https://github.com/RazrFalcon/resvg/issues/317 is addressed,
trailing space does not affect the size of the text bounding box.
* remove space-holders now that spacing is preserved