Commit Graph

6023 Commits

Author SHA1 Message Date
Dustin Carlino
601d367c32 Import highway=track as a separate cycle+footway. We identified https://www.openstreetmap.org/way/842138587 that really affects the Poundbury site. 2021-02-25 12:59:48 -08:00
Dustin Carlino
378122a329 Specify trip purpose when importing external scenario data. 2021-02-25 11:00:43 -08:00
Dustin Carlino
0feeb3cee4 When nothing's selected, don't display anything in the status bar. Previously, it was '...', which looked clickable. 2021-02-25 10:56:02 -08:00
Dustin Carlino
0320b2be89 Little actdev fixes:
- when leaving edit mode, still return to actdev mode
- rename "bike network" layer to "cycling activity", to emphasize it
  shows where cyclists have been going so far in the simulation and not
  everything on the ground
- add tooltip with exact counts to the cycling activity layer, just like
  throughput does
- add a "walking activity" button (throughput layer with filters
  pre-applied)
2021-02-25 10:54:03 -08:00
Dustin Carlino
fa4d46e648 Remove the SRTM elevation data from the Seattle import. The link has expired, and I can't find a replacement. The elevation data has always been extremely incorrect, and a proper replacement for it is in the works. #82, #534
Not regenerating Seattle maps yet, but next time, the elevation will be set to 0 everywhere. Should be a no-op.
2021-02-25 10:17:26 -08:00
Dustin Carlino
e0fd8dd369 Import Taipei! 2021-02-25 09:21:45 -08:00
Dustin Carlino
6bfa569923
Support changing fonts in the middle of a line. Use this to draw numeric (#533)
IDs in the status bar as bold, not red.
2021-02-25 08:57:42 -08:00
Michael Kirk
494be704da style parking lot info like other info panels 2021-02-24 20:21:14 -08:00
Michael Kirk
a085db301b theme minimap controls
Easier to style as a normal image button
2021-02-24 20:17:18 -08:00
Michael Kirk
5d7875d5be theme spinner 2021-02-24 20:17:18 -08:00
Michael Kirk
fc4a4d1071 Fix loading screen legibility
long-term we should probably get all the colors from Style, but until
then just hardcode White text since all other colors are hardcoded.
2021-02-24 20:17:18 -08:00
Dustin Carlino
7e4d529872 Import all the actdev scenarios again, which have a fix for more diverse destinations.
Automated:
1) rm -fv `find data/system/gb/ | grep base.bin | xargs`
2) rm -fv `find data/system/gb/ | grep dutch.bin | xargs`
3) for city in allerton_bywater ashton_park aylesbury aylesham bailrigg bath_riverside bicester castlemead chapelford clackers_brook culm dickens_heath didcot dunton_hills ebbsfleet great_kneighton hampton handforth kidbrooke_village lcid long_marston micklefield newcastle_great_park poundbury priors_hall taunton_firepool taunton_garden tresham trumpington_meadows tyersal_lane upton wichelstowe wixams wynyard; do ./importer/actdev_scenarios.sh $city; done
2021-02-24 18:18:12 -08:00
Michael Kirk
ac30774b06 theme dropdowns and menus 2021-02-24 18:10:06 -08:00
Michael Kirk
c6d361c4b0 remove take_menu 2021-02-24 18:10:06 -08:00
Dustin Carlino
fa515054fb lcid was missing a friendly map name
and adjust the elevation query format
2021-02-24 17:26:23 -08:00
Dustin Carlino
737019a9ec Emit a file with points to query for an elevation service. #82 2021-02-24 15:58:10 -08:00
Dustin Carlino
5577021ee5 When merging intersections and preserving simple turn restrictions, pay
attention to which intersection is being destroyed. Fixes #527 --
montlake and phinney both look correct now.

Regenerating everything. Actually, Phinney now runs, so adding a 4th
prebaked map!!! But Rainier regressed -- there's an issue with the
signal heuristics that's now a problem; I'll fix later.
2021-02-24 15:16:12 -08:00
Michael Kirk
9533c10137 Theme switches
The main button API only allows re-writing one color of the image.

Since we need to rewrite multiple colors for the switch, I introduced a
`image_batch` for buttons which lets you do all kinds of manual
fanciness, and pass the result into the button API.
2021-02-24 14:59:47 -08:00
Michael Kirk
f34f6ab315 theme checkbox 2021-02-24 14:59:47 -08:00
Michael Kirk
d774aeae44 rename toggle/checkbox 2021-02-24 14:59:47 -08:00
Dustin Carlino
23b19fa7ce Add a quick debug tool to find roads with no turns between them, for #527 2021-02-24 11:00:59 -08:00
Michael Kirk
3ab7fc4361
Fix tooltips and hotkey for day-theme (#528) 2021-02-24 10:52:57 -08:00
Dustin Carlino
ac615e97c3 Autorepair Lake Wash Blvd proposal, also broken by the service road change. 2021-02-23 20:13:36 -08:00
Dustin Carlino
b36ebec0b9 Penalize unprotected left turns at the routing layer. #494
I experimented on the Rainier Valley map, which recently started
gridlocking due to too many cars doing this, to tune the value. Got it
running again! The two other maps keep running, with some trips on
average getting a little slower.
2021-02-23 19:32:00 -08:00
Michael Kirk
1387a8c11f
Text gets default color from Style (#526) 2021-02-23 19:30:50 -08:00
Dustin Carlino
9eea3c9247 Draw corners where shoulders and sidewalks meet more carefully. 2021-02-23 14:20:59 -08:00
Dustin Carlino
0344e51170
Merge pull request #525 from a-b-street/prefetch
Make a web loader that can 'prefetch' abst in the background. cyipt/a…
2021-02-23 13:34:55 -08:00
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
Dustin Carlino
4c97687a5b Make a web loader that can 'prefetch' abst in the background. cyipt/actdev-ui#15 2021-02-23 11:45:39 -08:00
Michael Kirk
a3ecffbb44 Temporary fix for day-theme inner panels legibility
Apparently we had two different ways of styling inner panels - compare
the info panels with the settings panel.

I intentionally consolidated to a single style, since that's where we
want to be but it made the info panel contrast to low. For now I'm
preferring to use the legacy "info-panel" style for inner panels
everywhere, meaning we'll temporarily lose the cute section backgrounds
in the day-theme settings panel, but retain legibility everywhere.
2021-02-23 11:39:58 -08:00
Michael Kirk
657887e90f stray mut 2021-02-23 11:32:20 -08:00
Dustin Carlino
8bee003808 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
Michael Kirk
62a433ed8d btn_solid_panel is the same as btn_solid 2021-02-23 10:17:49 -08:00
Michael Kirk
dde3ca9f67 rethink rename... keep Style.ButtonStyle, rename button::ButtonStyle->ButtonStateStyle 2021-02-23 09:56:58 -08:00
Michael Kirk
e6ed2e67de 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.
2021-02-23 09:52:33 -08:00
Michael Kirk
cfaf441b89 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.)
2021-02-23 07:24:48 -08:00
Michael Kirk
2ed55f40a1 cargo fmt 2021-02-23 07:24:48 -08:00
Dustin Carlino
ecf7c0c836
On HiDPI screens with low resolution, allow widgetry applications to (#521)
* On HiDPI screens with low resolution, allow widgetry applications to
override the default scale factor in order to achieve a minimum width.
2021-02-22 15:59:57 -08:00
Dustin Carlino
03989bf3a6 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
Dustin Carlino
81dd5740e6 Import Mt Vernon 2021-02-22 09:41:10 -08:00
Dustin Carlino
6ceac88cbe Import most service roads, except driveways. #449
Added an extra step to classify service roads as running through a
parking lot, to prevent them from being treated as regular roads.

Had to fix up a few prebaked traffic signals. lakeslice falls back into
gridlock; will fix separately -- too much effort behind this change to
stop.
2021-02-21 18:27:34 -08:00
Dustin Carlino
c5056fd135 new release 2021-02-21 10:38:19 -08:00
Dustin Carlino
f4103cf1fe Redraw the intersection in map_editor when deleting or creating a road.
[rebuild] [release]
2021-02-21 10:17:38 -08:00
Dustin Carlino
a7de2eef14 Disable parking simulation for actdev. I noticed people in Poundbury walking very far just to fetch their car, because the data about available parking is nonexistent. 2021-02-20 13:19:38 -08:00
Dustin Carlino
c7ae44d02a Start actdev simulations at 8, not 6. And refactor the ffw-after-starting pattern. cyipt/actdev#66 2021-02-20 13:12:41 -08:00
Dustin Carlino
0804f877dd Toggle between the baseline/go active scenario in actdev mode. Don't allow opening up any scenario. If we settle on a good background traffic generator, that can probably be exposed as an orthogonal checkbox. cyipt/actdev#66 2021-02-20 13:03:42 -08:00
Dustin Carlino
7592d192e3 Rename the blog gameplay mode to actdev, since it's specific to that integration. In the future if we have a simplified simulation running in a blog, we can figure out common requirements and refactor. 2021-02-20 12:44:27 -08:00
Dustin Carlino
b11cd48fb3 On the web, constantly update the --cam param in the URL with the current viewport. 2021-02-20 11:10:14 -08:00
Dustin Carlino
add122549f Modernize map_editor code: EventCtx should always be the first param 2021-02-20 10:03:06 -08:00
Dustin Carlino
1ed5e7c444 Add a toggle in the map_editor to show all intersection geometry or not. Subsumes the confusing previous preview tool. 2021-02-20 09:57:06 -08:00