Transportation planning and traffic simulation software for creating cities friendlier to walking, biking, and public transit
Go to file
Dustin Carlino 316dcd7d06
themed buttons (#524)
* cargo fmt

* rename ButtonStyle to ButtonTheme to avoid ambiguity

widgetry::styles::button:ButtonStyle -> ButtonTheme is a collection of
colors

vs. widgetry::widgets::button::ButtonStyle which is a per-state styling
(hover vs. disabled etc.)

* Collapse button styles to be theme specified (no visible changes).

Button colors are now determined by the color scheme, but for now all
schemes are hardcoded to use the same "night" button colors. Read on for
rationale...

Previously, which button colors to use (dark/light) was specified inline
while building the UI.

Eventually we want to live in a world where color scheme determines:
- panel colors
- button colors
- text colors

The theme could already choose panel colors easily enough, but because
the buttons and text were not determined by theme, choosing anything
other than a black or dark grey panel color makes the buttons and text
unreadable.

This PR tackled the themeable "button colors" portion, but all themes
continue to use the "night" colors for now, because using the actual
"day" colors would still make the text unreadable.

next up: themeable text!

The one intentional regression is within the pregame tutorial,
which has always been styled differently from the rest of the app. An
expeditious hack has caused the prev/next/continue buttons to lose their
visible hover state. I'll restore this upon completing the day theme
work.

* rethink rename... keep Style.ButtonStyle, rename button::ButtonStyle->ButtonStateStyle

* btn_solid_panel is the same as btn_solid
2021-02-23 11:49:28 -08:00
.github/workflows Upgrade to Rust 1.50. Use the new f64 clamp instead of our own. [rebuild] 2021-02-11 10:32:13 -08:00
abstio Fix a few stray warnings from rustc, and improve a panic error message when data/system gets unexpected directory names 2021-02-23 11:16:43 -08:00
abstutil Upgrade to Rust 1.50. Use the new f64 clamp instead of our own. [rebuild] 2021-02-11 10:32:13 -08:00
collisions Upgrade most dependencies 2021-02-03 18:13:06 -08:00
convert_osm Import most service roads, except driveways. #449 2021-02-21 18:27:34 -08:00
data Don't allow u-turns on really short deadends. This problem started happening when more service roads were imported, and caused gridlock in lakeslice. This gets montlake and lakeslice running again, but rainier_valley remains gridlocked with service roads. 2021-02-22 14:48:49 -08:00
fifteen_min Collapse button styles to be theme specified (no visible changes). 2021-02-23 09:52:33 -08:00
game btn_solid_panel is the same as btn_solid 2021-02-23 10:17:49 -08:00
geom Delete redundant implementations of min and max for geom types. They get it for free by implementing Ord. 2021-02-12 15:22:27 -08:00
headless The grand country split. #326 2021-02-13 15:45:59 -08:00
importer Import Mt Vernon 2021-02-22 09:41:10 -08:00
kml Refactor lots of places that construct paths to the data/input dir, which is always organized by city. This would've made the previous change way easier. #326 2021-02-13 18:30:01 -08:00
map_editor Collapse button styles to be theme specified (no visible changes). 2021-02-23 09:52:33 -08:00
map_gui Temporary fix for day-theme inner panels legibility 2021-02-23 11:39:58 -08:00
map_model Don't allow u-turns on really short deadends. This problem started happening when more service roads were imported, and caused gridlock in lakeslice. This gets montlake and lakeslice running again, but rainier_valley remains gridlocked with service roads. 2021-02-22 14:48:49 -08:00
osm_viewer Collapse button styles to be theme specified (no visible changes). 2021-02-23 09:52:33 -08:00
parking_mapper Collapse button styles to be theme specified (no visible changes). 2021-02-23 09:52:33 -08:00
popdat update geo related deps. (#508) 2021-02-08 16:34:56 -08:00
release Import Wynyard, now that the pathfinding bug is fixed. 2021-02-17 15:45:36 -08:00
santa Collapse button styles to be theme specified (no visible changes). 2021-02-23 09:52:33 -08:00
sim cargo fmt 2021-02-23 07:24:48 -08:00
sumo The grand country split. #326 2021-02-13 15:45:59 -08:00
tests The grand country split. #326 2021-02-13 15:45:59 -08:00
traffic_seitan Upgrade most dependencies 2021-02-03 18:13:06 -08:00
traffic_signal_data Import most service roads, except driveways. #449 2021-02-21 18:27:34 -08:00
updater The grand country split. #326 2021-02-13 15:45:59 -08:00
videos Delete mdbook. It's been split out to https://github.com/a-b-street/docs 2021-01-31 15:44:41 -08:00
widgetry themed buttons (#524) 2021-02-23 11:49:28 -08:00
widgetry_demo Collapse button styles to be theme specified (no visible changes). 2021-02-23 09:52:33 -08:00
.gitignore Import Mt Vernon 2021-02-22 09:41:10 -08:00
Cargo.lock Make the map_editor read .osm directly 2021-02-20 09:31:52 -08:00
Cargo.toml Fix flatgeobuf dependency, which was bringing in native SSL bindings. Closes #519 2021-02-18 10:28:11 -08:00
clippy.sh round of clippy. not fixing everything. 2019-12-11 16:17:15 -08:00
import.sh Attempt to display the Timer progress and logs in separate parts of the screen when running the importer. #262 2021-01-21 19:57:38 -08:00
LICENSE Initial import of A/B Street prototype. 2018-03-13 08:06:03 -07:00
README.md new release 2021-02-21 10:38:19 -08:00
rgrep.sh Set up a test scenario for lane-changing to reproduce #382. The same 2020-11-11 11:33:47 -08:00
rustfmt.toml tweaking rustfmt options; the long literal string vecs in tutorial look awful 2020-01-21 15:20:02 -08:00

A/B Street

Ever been stuck in traffic on a bus, wondering why is there legal street parking instead of a dedicated bus lane? A/B Street is a game exploring how small changes to a city affect the movement of drivers, cyclists, transit users, and pedestrians. It works anywhere in the world, thanks to OpenStreetMap.

Show, don't tell

Alpha release trailer

Find a problem:

exploring_traffic

Make some changes:

editing_map

Measure the effects:

evaluating_impacts

Documentation

Roadmap and contributing

See the roadmap for current work, including ways to help. If you want to bring this to your city or if you're skilled in design, traffic simulation, data visualization, or civic/government outreach, please contact Dustin Carlino at dabreegster@gmail.com. Follow r/abstreet for weekly updates or @CarlinoDustin for occasional videos of recent progress.

Project mission

If you fix some traffic problem while playing A/B Street, my ultimate goal is for your changes to become a real proposal for adjusting Seattle's infrastructure. A/B Street is of course a game, using a simplified approach to traffic modeling, so city governments still have to evaluate proposals using their existing methods. A/B Street is intended as a conversation starter and tool to communicate ideas with interactive visualizations.

Why not leave city planning to professionals? People are local experts on the small slice of the city they interact with daily -- the one left turn lane that always backs up or a certain set of poorly timed walk signals. Laura Adler writes:

"Only with simple, accessible simulation programs can citizens become active generators of their own urban visions, not just passive recipients of options laid out by government officials."

Existing urban planning software is either proprietary or hard to use. A/B Street strives to be highly accessible, by being a fun, engaging game. See here for more guiding principles.

Credits

Core team:

Others:

Data: