Commit Graph

5990 Commits

Author SHA1 Message Date
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
Dustin Carlino
2d182a4582 Fix crash in commuter viz layer. The block-finding algorithm was written before pedestrian-only roads. 2021-02-17 12:00:13 -08:00
Dustin Carlino
4de7cb68c0 Start actdev mode with the baseline scenario, if it exists. Improve the follow shortcut. cyipt/actdev#66 2021-02-16 17:58:20 -08:00
Dustin Carlino
12d73e10bc Add a few shortcut buttons to the actdev UI. cyipt/actdev#66 2021-02-16 17:34:56 -08:00
Dustin Carlino
612e257fbf Revert "Fix actdev deployment script again -- how did I forget the data/ directory?!"
This reverts commit c9cef2ac8c.

I got confused by cyipt/actdev-ui#10, but the web version doesn't ship
data/input or data/player, so no need for the extra nesting.
2021-02-16 14:53:55 -08:00
Dustin Carlino
c87940a858 Fix an issue with a6dfc95aa9: districts in a city are ordered in a z-order friendly way 2021-02-16 14:52:47 -08:00
Dustin Carlino
d8061f3bf6 Update prebaked data after UT change 2021-02-16 13:44:23 -08:00
Bruce
e6e3fc844a
Improve Uberturns (#518)
If starting an UT and blocked, remove the reservation, allowing others to proceed.
If awakened, and banned and reserved attempt to proceed through the intersection.
2021-02-16 13:32:59 -08:00
Dustin Carlino
1fa57a1e17 Import Charleville-Mézières. So many new places from Twitter!
Few workarounds based on importing crashes found.
2021-02-15 16:35:24 -08:00
Dustin Carlino
c9cef2ac8c Fix actdev deployment script again -- how did I forget the data/ directory?! 2021-02-15 14:39:04 -08:00
Dustin Carlino
f55a40e3df Import Rostock 2021-02-15 14:33:17 -08:00
Dustin Carlino
932da8b262 Fix actdev deployment script a bit 2021-02-15 13:34:58 -08:00
Dustin Carlino
5d0c5766e5 Import scenarios for all actdev sites. Delete the old code for actdev
scenarios, which did a little disaggregation itself from desire lines.
2021-02-15 13:26:44 -08:00
Dustin Carlino
3f23a3c57c Remove hotkey buttons entirely, to get closer to Yuwen's button spec. 2021-02-15 13:02:29 -08:00
Dustin Carlino
a6dfc95aa9 Improve city picker UI:
- stop color-coding the buttons
- highlight the district when hovering on a button (broken recently)
- sort the districts
2021-02-15 13:02:29 -08:00
Dustin Carlino
6d2cfa5750 Don't list a country in the city picker if there's nowhere different to navigate to there. 2021-02-15 12:03:06 -08:00
Dustin Carlino
46c746d446 Generate buildings for all the new actdev sites too 2021-02-15 11:57:41 -08:00
Dustin Carlino
7c3ced6401 Import 10 more actdev sites. Start a script for importing Robin's
scenario JSON, but don't run it yet.
2021-02-15 11:06:28 -08:00
Dustin Carlino
e8d1a4bb0d Import Anchorage 2021-02-14 17:21:02 -08:00
Dustin Carlino
9b1b9f467e new release 2021-02-14 14:31:04 -08:00
Dustin Carlino
48bf0e504d Fix a rendering crash that's hard to reproduce. #514 [rebuild] [release] 2021-02-14 14:12:34 -08:00