Dustin Carlino
56101addcf
Remove the zcool font and Xi'an import. #377
...
The Xi'an map isn't being regularly used, and it has some issues
(boundary is too large, OSM is missing buildings in most of the area).
The zcool font enables Chinese characters to render, but costs 6MB in
the binary files, slowing down wasm loading time. Eventually, we can
support async loading fonts and passing them to widgetry when loading a
map requiring them. For now, cutting down wasm size is a bigger
priority.
game wasm from 18MB to 12MB. Not bad!
2021-01-24 20:30:20 -08:00
Dustin Carlino
c88e449f3e
new release
2021-01-24 16:42:57 -08:00
Dustin Carlino
ea103803d1
New map focusing on Rainier Valley for #446 , studying the effects of amping up maximum signal cycle lengths. [rebuild] [release]
2021-01-24 15:49:15 -08:00
Dustin Carlino
9aa18a35e6
rename color scheme to be more clear with day/night mode [rebuild] [release]
2021-01-24 14:19:30 -08:00
Dustin Carlino
7d8c818eea
Remove the last traces of the old orange hovering color.
2021-01-24 13:09:37 -08:00
Michael Kirk
4ad7f6bebd
Label "Pedestrian" -> "Walk" for reasonable panel width ( #476 )
2021-01-24 10:27:21 -08:00
Dustin Carlino
ee62d05f8d
Attempt better colors for pedestrian plazas and the map background in night mode.
...
Also fix Santa, broken by the button SVG moving.
2021-01-23 17:47:10 -08:00
Dustin Carlino
f93a30ea04
Recreate panels whenever the color scheme changes, whether that happens from fiddling with settings or the day/night toggle happening.
2021-01-23 16:35:09 -08:00
Michael Kirk
1a3d1b4cdb
reconcile new button styles w/ dark theme ( #475 )
2021-01-22 21:21:38 -08:00
Dustin Carlino
4446d99fad
Merge branch 'mkirk/btn-fix' of https://github.com/michaelkirk/abstreet into michaelkirk-mkirk/btn-fix
2021-01-22 21:13:13 -08:00
Michael Kirk
3855f284b8
Fix hotkey conflict
...
Even though we *usually* want these hotkeys for next/prev, sometimes we
don't, and the damage of forgetting to add them to a new pager is less
than the damage done if we forget to remove them and clobber something
important like the speedup/slowdown controls.
2021-01-22 15:31:33 -06:00
Michael Kirk
1990642dee
More conventional button names
...
This was all done by search/replace, and should not affect
functionality.
Goals:
- be consistent with the figma terminology.
- consistently order:
"btn_{solid|outline|plain}_{dark|light}_{text|image|dropdown|back|etc}"
2021-01-22 13:11:42 -06:00
Dustin Carlino
2505d64e8b
Always use ctx.style() to construct buttons. Remove the indirection through app's colorscheme.
2021-01-22 07:45:05 -08:00
Dustin Carlino
c9c6f240ae
Remove timer.{note, warn, error} in favor of the log crate. #262
...
Originally, the intention of the deleted calls was to not interrupt
Timer progress bars with warnings. But the output of things like the
importer is impossible to read anyway. Strongly considering explicitly
sending logs and timing info to separate places and using something like
multitail for live progress.
Unplumb timer from LOADS of places that just needed it for logging.
2021-01-21 19:22:02 -08:00
Dustin Carlino
dc19d11f64
Make the file management menu in edit mode occupy the center of the screen.
2021-01-21 15:36:21 -08:00
Michael Kirk
4989887117
remove final references to Btn
2021-01-21 15:25:46 -08:00
Michael Kirk
2b8e77de9f
manual replace of remaining hotkey Btn::text_fg
2021-01-21 15:25:46 -08:00
Michael Kirk
1f75145a8a
introduce btn_next/btn_prev, parameterize disabled
to simplify common usage
2021-01-21 15:25:46 -08:00
Michael Kirk
b924d40daa
regex update Btn::text_fg simple hotkeys, inline &str
2021-01-21 15:25:46 -08:00
Michael Kirk
a2c5ce0fb3
regex upgrade Btn::text_fg: No hotkeys, inline &str
...
Btn\:\:text_fg\("([^"]*)"\).build_def\(ctx, None\)
ctx.style().btn_secondary_light_text("$1").build_def(ctx)
2021-01-21 15:25:46 -08:00
Michael Kirk
bfb190a730
manually update remaining Btn::text_bg2
2021-01-21 15:25:46 -08:00
Michael Kirk
a5b6dca62a
replace Btn::text_bg2 w/ regex
...
In case I have to revisit, here's the regex I used:
Btn::text_bg2\(([^)]*)\)*.build_def\(ctx, ([^()]*)\)
ctx.style().btn_primary_dark_text($1).hotkey($2).build_def(ctx)
And something like this for the "no hotkey" case
Btn::text_bg2\(([^)]*)\)*.build_def\(ctx, None\)
ctx.style().btn_primary_dark_text($1).build_def(ctx)
2021-01-21 15:25:46 -08:00
Michael Kirk
69e31029ac
replace Btn::svg_def
2021-01-21 15:25:46 -08:00
Michael Kirk
c013c8d342
replace remaining Btn::custom
2021-01-21 09:08:41 -08:00
Michael Kirk
5b6c88d3b4
more button progress and fixups ( #465 )
...
* replace Btn::txt with new ButtonBuilder styles
* fixup! replace Btn::text_bg1 with ButtonBuilder (btn_primary_light)
2021-01-20 14:11:28 -08:00
Michael Kirk
e1ec69f9f7
Replace Btn::plaintext_custom with new ButtonBuilder
2021-01-19 17:40:35 -08:00
Michael Kirk
def3644eca
add "destructive" (red) button styles
2021-01-19 17:40:35 -08:00
Michael Kirk
743b74510d
replace Btn::close with new style ( #463 )
2021-01-19 16:17:11 -08:00
Michael Kirk
d7445d889e
button revamp groundwork ( #459 )
2021-01-19 10:10:18 -08:00
Filip Czaplicki
c6e211cc77
Map: Warsaw
2021-01-18 17:58:05 -08:00
Dustin Carlino
a6c61e4fae
Use Great Kneighton study area for Cambridge, not Trumpington. And bring
...
in Chapelford too. #449
2021-01-17 17:35:11 -08:00
Dustin Carlino
ad7715612e
new release
2021-01-17 09:58:49 -08:00
Michael Kirk
356a64ec87
rename INVISIBLE -> CLEAR
...
easier to type name
2021-01-16 21:16:14 -08:00
Dustin Carlino
ec8c37ab05
Import pedestrian plaza areas, just for rendering. #458
...
Not regenerating everything yet.
2021-01-16 15:16:14 -08:00
Dustin Carlino
87f13a0d0c
Improve crosswalk rendering, by orienting each dash perpendicular to the line of the crosswalk. This wasn't true for some degenerate intersections where the turn first crosses part of the sidewalk. #457
2021-01-15 21:15:10 -08:00
Dustin Carlino
6ba1cfe8a1
Import Detroit for #452
2021-01-14 18:06:52 -08:00
Dustin Carlino
e233012ee8
Use a full modal to select a scenario. During the button UI audit, we
...
realized a dropdown doesn't make sense. A larger panel gives room to
explain what the choices mean.
2021-01-14 09:05:44 -08:00
Dustin Carlino
ff598f21a3
Add a new layer to star buildings. Autosave it. While trying out changes
...
for #446 in the UI, I kept losing track of the two buildings I'm
focusing on. A player-defined list of shortcuts seems generally helpful.
2021-01-12 19:22:50 -08:00
Dustin Carlino
a1988f269c
Based on importer config, try using separate cyclepaths directly. #330
...
Small adjustments to unzoomed rendering and stop sign placement.
Regenerate all maps because of the format change, but only Cambridge
changes. Since we're doing this anyway, also pull in leisure=garden.
2021-01-12 11:13:45 -08:00
Dustin Carlino
b4cee2d6f9
Start importing parts of Cambridge for https://github.com/cyipt/actdev/issues/26 .
...
I did
https://dabreegster.github.io/abstreet/howto/new_city.html#including-the-city-to-ab-street-more-permanently ,
using
https://github.com/cyipt/actdev/blob/main/data-small/study_area_trumpington-test.geojson
2021-01-11 14:23:52 -08:00
Dustin Carlino
5af0e7da24
new release
2021-01-10 12:20:23 -08:00
Dustin Carlino
b1dda3628f
Start all UI apps except for game by loading a map using the async interface. This lets someone on the web immediately start with any map based on URL params. And it's one step towards removing the montlake file from being hardcoded in the wasm. #344
...
Demo: http://0.0.0.0:8000/?salzburg/maps/south.bin when running the 15m
tool locally
2021-01-09 14:45:33 -08:00
Dustin Carlino
fa9565e22b
Stop bundling Seattle's city.bin file in wasm. Always load that file asynchronously from HTTP if needed. #344
...
This also happens to fix showing city overview maps in other regions.
2021-01-09 13:15:27 -08:00
Dustin Carlino
fea3ebbe5b
Change the city picker UI to show cities on the left. After clicking one, open up the overview for that city.
2021-01-08 15:51:22 -08:00
Dustin Carlino
afceb5e268
Adjust Leeds import: #444
...
- stretch central polygon a bit to avoid crash when clipping
https://www.openstreetmap.org/way/511767781
- rename polygons ("center" to "huge", and removing the "leeds_" prefix
from the others)
- generate a region overview from the huge map
- only import/match collision data on the huge map
2021-01-08 09:29:45 -08:00
Robin Lovelace
6af15c202c
Break-up Leeds, closing #444
2021-01-08 09:21:05 -08:00
Dustin Carlino
e99def9124
Switch all error handling to anyhow. Nothing consumes our code as a
...
library yet, so this is a step forward from string errors. Manually
tested how errors show up (including the nice with_context bit).
2021-01-05 11:35:03 -08:00
Dustin Carlino
bc3c3dfd6c
Rename phase -> stage in the JSON traffic signal format. Meant to do this a long time ago. #295
...
Make this schema change backwards compatible for player edits.
2021-01-04 11:18:17 -08:00
Dustin Carlino
dedb041bdb
Move CameraState to map_gui. Now widgetry has no dependency on abstio! #253
2021-01-04 10:39:15 -08:00
Dustin Carlino
965d999199
Upgrade misc other dependencies
2021-01-03 20:01:27 -08:00