Commit Graph

6010 Commits

Author SHA1 Message Date
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
Dustin Carlino
2c0334a37d Make the map_editor read .osm directly 2021-02-20 09:31:52 -08:00
Dustin Carlino
15b154aa23 Explicitly draw the OSM boundary in the map_editor, so we can effectively create borders 2021-02-19 17:33:37 -08:00
Dustin Carlino
94c8a34804 More map_editor:
- toggle traffic signals / stop signs
- show the direction of a road when editing it, so left/right have
  context
2021-02-19 16:54:22 -08:00
Dustin Carlino
d74fa982b5 Context-sensitive instructions in the map_editor, once again 2021-02-19 16:31:57 -08:00
Dustin Carlino
cce43daecc Restore the map_editor to some of its former glory:
- start showing partial instructions again
- remove old debug popup
- start a new road editor
2021-02-19 16:24:13 -08:00
Dustin Carlino
5139a88a66 Also sort city districts by zorder when creating them from many maps. Noticed this issue in Leeds. 2021-02-19 10:26:51 -08:00
Dustin Carlino
05622760fc Fix crash when opening the tutorial when the wrong map is previously opened. 2021-02-19 10:15:48 -08:00
Dustin Carlino
9e83823620 When a city is missing a city.bin, just list files to discover districts. Better experience after importing a oneshot map. 2021-02-18 15:07:08 -08:00
Dustin Carlino
aefefedee9 Don't crash when we're missing a country flag. Discovered for oneshot
imports (which wind up in the dummy zz country code)
2021-02-18 14:55:15 -08:00
Dustin Carlino
a596cb8d04 Fix flatgeobuf dependency, which was bringing in native SSL bindings. Closes #519 2021-02-18 10:28:11 -08:00
Dustin Carlino
487c7f3a01 Delete data/other_polygons -- this was a place to store boundaries that people were interested in, before it was easy to maintain lots of cities. If demand for any of these areas comes up, we can just import properly. 2021-02-17 19:33:15 -08:00
Dustin Carlino
6673521ee9 Import Wynyard, now that the pathfinding bug is fixed. 2021-02-17 15:45:36 -08:00
Dustin Carlino
64d150690a When building the contraction hierarchies for different vehicle types,
be more careful with nodes representing uber-turns. Even if that vehicle
type doesn't use an uber-turn, we still need to force the nodes to exist
and match up between input graphs.

Although this really only fixes gb/charleville_mezieres/secteur4, it
potentially affects all maps, because the node map changes. So
regenerate everything...
2021-02-17 14:17:27 -08:00