Michael Kirk
af079c24e6
rename txt.add -> txt.add_line
2021-03-19 17:48:30 -07:00
Dustin Carlino
58ee3175ac
Add a new Seattle map focused on the Arboretum, for #574 , along with
...
prebaked data for the baseline (because it doesn't gridlock, without any
interventions needed!) and a proposal for opening up Broadmoor.
2021-03-19 17:24:11 -07:00
Michael Kirk
affd582093
more concise Text
/ tooltip()
2021-03-19 16:48:54 -07:00
Dustin Carlino
d7b7c2d7cd
Import a slice of London along the A5, including scenario data. It
...
gridlocks, of course. #577
2021-03-19 15:51:43 -07:00
Dustin Carlino
edfb745bb2
Change the default color scheme to day mode. Behaviorally, this rolls out the change for the OSM viewer, 15m app, parking mapper, and map_editor.
2021-03-19 15:26:35 -07:00
Michael Kirk
bf52a84956
Fix crash when viewing settings in osm_viewer
...
Longer term I think we should default to day_theme for all widgetry apps.
That will be easier if we can get rid of pregame theme all together, but
that requires re-styling the pre-game screens (which we want to do, but
that will take time).
2021-03-19 11:03:40 -07:00
Michael Kirk
546599e4f9
Replace ButtonImage with Image
2021-03-17 19:06:43 -07:00
Dustin Carlino
24a60b0b29
Import Tempe, AZ for collaboration with ASU
2021-03-17 10:55:04 -07:00
Michael Kirk
264f1f939f
minimap controls: agent toggles and meters into one row
...
Some ancillary changes:
Made the GeomBatchStack public and extracted the ImageSource
functionality from ButtonBuilder to Image.
2021-03-16 18:28:50 -07:00
Dustin Carlino
2e7d6eeb34
Fix the progress bar in the UI; now the line-rewriting more or less
...
works! #523
2021-03-16 18:08:58 -07:00
Dustin Carlino
77709a24d6
Refactor a method to asynchronously download a file on native, with a simple progress bar. #523
...
Use it in the updater and all the importer tools. Only place it's not
used yet is parking_mapper and the in-game updater. [rebuild]
Also make the RunCommand state understand the control code for erasing
the current line. It... sort of works.
2021-03-15 19:51:45 -07:00
Dustin Carlino
359960c1db
Prepare the new map importer to work in the release. [rebuild]
2021-03-15 14:16:18 -07:00
Dustin Carlino
c0e49f815f
Make the UI load the newly imported map, scraping its name from the other tool. #523
...
For this to work, RunCommand has to be much more careful about getting
all output when the command is done.
2021-03-15 13:54:14 -07:00
Dustin Carlino
f87c1c3b1b
Manage the temporary files in the importer better, and don't re-download
...
pbf. #523
But now we don't know which map to switch to in the UI!
2021-03-15 11:43:06 -07:00
Dustin Carlino
04e0e2aa02
Cache the geofabrik index file in data/input/shared. #523
2021-03-15 10:58:11 -07:00
Dustin Carlino
a8b72691dc
new release
2021-03-14 20:39:56 -07:00
Dustin Carlino
edf3914e4d
Disable the new map importer for this week's release; it's not ready yet. [rebuild] [release]
2021-03-14 17:43:18 -07:00
Dustin Carlino
be4935a316
If the map was imported successfully, switch to it. #525
2021-03-13 15:43:10 -08:00
Dustin Carlino
014d3184cc
Use the subprocess crate to nonblockingly read output from a command. #523
2021-03-13 14:49:01 -08:00
Dustin Carlino
1477262f69
Just split out RunCommand. #523
2021-03-13 14:04:21 -08:00
Dustin Carlino
42a3852784
Actually, we can show command output just fine. The problem was trying
...
to render text with embedded newlines. #523
2021-03-13 13:49:33 -08:00
Dustin Carlino
944b2c337a
Get the importer UI working finally! #523
...
Improved the target dir finding, and hacking around some of the command
output not rendering.
2021-03-13 13:41:34 -08:00
Dustin Carlino
4e665b6214
Run the one-step importer from the UI. Don't attempt a proper loading
...
screen yet. #523
Not working yet; one_step assumes paths to binaries, and it's now wrong.
2021-03-13 13:33:27 -08:00
Dustin Carlino
c252e4a82d
Grab GeoJSON from the system clipboard on native. #523
2021-03-13 12:54:14 -08:00
Dustin Carlino
607ccd0e78
Start a native-only UI to run the one-step importer. #523
2021-03-13 12:41:44 -08:00
Dustin Carlino
7920d7d496
Recalculate the minimap panels as sim time changes, now that agent counters live there. #558
2021-03-12 17:48:35 -08:00
Dustin Carlino
59e9735318
Force actdev top panels to have the same height. #551
2021-03-12 17:48:35 -08:00
Dustin Carlino
69b248cd66
Move agent counters to the minimap, removing the top-right agent panel entirely. #551
...
Adjust the tutorial for these changes.
2021-03-12 17:48:35 -08:00
Dustin Carlino
8ac62fed47
Trying out some UI changes suggested by Martin:
...
- Increase day mode panel opacity to 95% to help text legibility
- Combine the time/speed panels, and remove the sunrise/sunset icons
- 4 mode colors matching actdev, also changing night mode residential
buildings
2021-03-12 17:48:35 -08:00
Dustin Carlino
72418ee6b6
Change the loading screen sidebar to list things the player ought to go try. Previously it was meant to be recent changes, but it's way too much work to also update that every few weeks.
2021-03-11 12:33:17 -08:00
Dustin Carlino
8be24bf007
Use AsRef<str> in more widgetry methods, getting rid of &format at many
...
call-sites. #253
To make some of these work, changed Label to store a String. Ultimately
it gets transformed into Text, so we need to allocate eventually.
2021-03-11 11:29:18 -08:00
Dustin Carlino
9c2c8bbd8f
Change some uses of Into<String> to AsRef<str>, to avoid allocations. #253
...
I manually audited all uses. I kept Into<String> when we really do wind
up storing a String.
2021-03-11 11:29:18 -08:00
Dustin Carlino
f0b522f89a
Figure out which files are in the us/huge_seattle DataPack more consistently. This'll now work from the proposals screen.
2021-03-10 12:40:55 -08:00
Dustin Carlino
fdc6601520
Prompt the user to download missing cities from the Proposals screen, too.
2021-03-10 12:10:16 -08:00
Dustin Carlino
65d7bc5c8e
Rename {Text,TextSpan}::draw to into_widget, for consistency. #253
2021-03-09 09:59:30 -08:00
Dustin Carlino
a4a20ce1e5
draw_text renamed to text_widget, for consistency. #253
2021-03-09 09:56:41 -08:00
Dustin Carlino
b0bcdb2115
Replace Widget::draw_batch with batch.into_widget, for consistency. #253 ( #554 )
2021-03-09 08:55:12 -08:00
Dustin Carlino
ead636549c
new release
2021-03-07 17:07:25 -08:00
Dustin Carlino
42bd63e79b
Lift URL and viewport code from game to map_gui. Also use it for OSM viewer and the 15min tool.
2021-03-04 13:22:09 -08:00
Dustin Carlino
dd42acdc28
Refactor a CityName::seattle()
2021-03-03 18:08:06 -08:00
Dustin Carlino
006ae01216
Move 4 Seattle maps into the us/huge_seattle category to reduce the size
...
of the binary releases. [rebuild]
Handle this special case in the city picker UI, prompting the player to
do the extra download. NOT yet handling the same for the community
proposal screen -- player will just see a missing file error.
2021-03-03 18:03:15 -08:00
Dustin Carlino
0c12948c86
Also grey out unhighlighted people when zoomed in. #539
2021-03-02 12:03:26 -08:00
Dustin Carlino
17e2f485b4
Add support for highlighting certain people in the simulation. For now,
...
mark random people as highlighted when background traffic is active for
actdev. #539
This changes the unzoomed rendering to "fade out" unhighlighted people.
Next up, similar change for zoomed, info panels, and trip tables.
2021-03-02 10:46:21 -08:00
Dustin Carlino
51386d19db
new release
2021-02-28 10:43:06 -08:00
Dustin Carlino
4d048d83bd
A few misc fixes after the grand button/color refactor:
...
- Always draw traffic signal stage numbers as white, even in day mode
- Always draw loading screen text as white, in any theme
- Double the scrollbar thickness from 4px to 8px (still way thinner than
the original design)
[rebuild] [release]
2021-02-28 10:31:00 -08:00
Michael Kirk
86799e2832
Remove StyledButtons - instead implement everything on the individual
...
ButtonStyle
2021-02-27 21:08:26 -08:00
Michael Kirk
cee0e5dbbd
Use btn_primary.* methods instead of btn_primary_*
2021-02-27 21:08:26 -08:00
Michael Kirk
87a1a3f027
fix outline for spinner (without crashing!) and cache drawable
2021-02-27 15:29:03 -08:00
Dustin Carlino
bce3318605
Import halsnead for actdev. It needed a fix to not treat access=private
...
as a no-through-traffic zone for light rail tracks!
2021-02-27 14:35:26 -08:00
Michael Kirk
1e75352ce0
Theme section bg
...
`Widget::outline` takes OutlineStyle
2021-02-27 13:13:41 -08:00
Michael Kirk
bcba72cddf
enable new day theme, but retain legacy theme for pregame
2021-02-26 16:30:14 -08:00
Michael Kirk
4b2f3888ed
replace btn_solid w/ primary/outline as appropriate
2021-02-26 14:05:19 -08:00
Michael Kirk
f5b52073fc
shade dropdown/text-fields in night mode
...
Consistent with other themes, fields in night mode should be distinct
from the panel color, a shade darker.
2021-02-26 14:05:19 -08:00
Dustin Carlino
fb78ec19cd
Use Noto font, not ZCOOL, because it has a full set of Chinese glyphs
2021-02-25 18:06:34 -08:00
Michael Kirk
3019a6fff1
Introduce Image
component to handle themed icons ( #537 )
2021-02-25 18:06:19 -08:00
Michael Kirk
46593b01ed
theme text field (and fixup layout)
2021-02-25 17:42:04 -08:00
Michael Kirk
abf9a9ade1
STOP sign should always be white text
2021-02-25 17:42:04 -08:00
Dustin Carlino
357ba15afe
Add back the zcool font so the Taipei map renders names. But this time, asynchronously load the font instead of bundling it in system assets and increasing the .wasm size. #535
...
Temporarily take on some technical debt with the new RawFileLoader...
2021-02-25 15:25:47 -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
a085db301b
theme minimap controls
...
Easier to style as a normal image button
2021-02-24 20:17:18 -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
Michael Kirk
d774aeae44
rename toggle/checkbox
2021-02-24 14:59:47 -08:00
Michael Kirk
3ab7fc4361
Fix tooltips and hotkey for day-theme ( #528 )
2021-02-24 10:52:57 -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
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
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
Dustin Carlino
81dd5740e6
Import Mt Vernon
2021-02-22 09:41:10 -08:00
Dustin Carlino
c5056fd135
new release
2021-02-21 10:38:19 -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
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
6673521ee9
Import Wynyard, now that the pathfinding bug is fixed.
2021-02-17 15:45:36 -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
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
f55a40e3df
Import Rostock
2021-02-15 14:33:17 -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
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
Dustin Carlino
4a231ac298
Fix crash in minimap with clamp()
2021-02-14 14:05:17 -08:00
Dustin Carlino
e2c648b597
Show each country's flag in the picker UI! #326
2021-02-14 11:49:34 -08:00
Dustin Carlino
482c3e8600
Use country names in the UI, not the codes. #326
2021-02-14 11:12:01 -08:00
Dustin Carlino
864bfacb30
Break down cities by country in the city picker UI. #326
2021-02-14 11:08:14 -08:00
Dustin Carlino
dbd62b5ea6
Fix the in-game map downloader, and "region"->"district" in the city
...
picker UI. #326
2021-02-14 10:30:04 -08:00
Dustin Carlino
39f5d50fcd
The grand country split. #326
...
City names are now disambiguated by a two-letter country code. This
commit handles almost everything needed to make this transition. Main
next steps are fixing up map edits automatically and making the city
picker UI understand the extra level of hierarchy.
A little bit of fallout: lakeslice gridlocks again; this regression is
actually from the recent traffic signal changes, but I'm just now
regenerating everything. Will fix soon.
2021-02-13 15:45:59 -08:00
Dustin Carlino
2f0029daef
Import 7 more actdev sites, since cyipt/actdev#77 is fixed
...
poundbury is missing files, and halsnead had some issue with the
boundary, will look into it later.
2021-02-12 13:30:59 -08:00
Dustin Carlino
48430f5979
Import more actdev sites, using better automation. cyipt/actdev#65
2021-02-11 16:32:27 -08:00
Dustin Carlino
e28b66cb5c
Use a larger hitbox for selecting pedestrians and bicycles.
2021-02-11 15:09:58 -08:00
Dustin Carlino
21573e09f1
Delete all of the actdev maps. I'm going to do this over again and just
...
use the site name as the city, instead of picking the "closest" major
city. This is introducing too much friction in automation.
cyipt/actdev#65
There will be a few awkward results -- cambridge gets renamed, and lcid
gets disassociated from leeds. Worth it for now.
2021-02-11 14:27:28 -08:00
Dustin Carlino
6e7a91ada1
Upgrade to Rust 1.50. Use the new f64 clamp instead of our own. [rebuild]
2021-02-11 10:32:13 -08:00
Dustin Carlino
1241cea22e
Update Chapelford boundary, and add LCID. https://github.com/cyipt/actdev/issues/65
2021-02-09 15:41:42 -08:00
Dustin Carlino
bbdd23dada
Partly automate importing new actdev maps. Bring in 6 new sites
2021-02-09 13:53:50 -08:00
Michael Kirk
4b665c871d
update geo related deps. ( #508 )
...
geo-types to 0.7
geo to 0.17 which removes redundant old geo used by polylabel
geojson to 0.22
2021-02-08 16:34:56 -08:00
Dustin Carlino
829c321190
Get rid of the wasm_s3 build flag. Instead use the URL of the wasm app and find the data/ directory off of that, and assume only localhost has uncompressed files. https://github.com/cyipt/actdev/issues/28
2021-02-08 12:41:28 -08:00
Dustin Carlino
de1084648c
new release
2021-02-07 14:49:05 -08:00
Dustin Carlino
fd423439b8
Upgrade tokio, hyper, and lru
2021-02-03 18:33:06 -08:00
Dustin Carlino
73e405e382
Upgrade most dependencies
2021-02-03 18:13:06 -08:00
Dmitriy Serdyuk
5bd4e79190
[WIP] Add Montreal ( #481 )
2021-02-02 18:24:31 -08:00
Dustin Carlino
02b90741d6
Draw 'STOP' on stop signs. Fixes #450 ( #492 )
2021-02-01 16:47:53 -08:00
Dustin Carlino
3e40686a6b
Fix a bunch of links after the repository renaming.
2021-01-31 15:50:48 -08:00
Dustin Carlino
e7734761fb
new release
2021-01-31 11:53:11 -08:00
Dustin Carlino
802a647a81
Import Providence for a student project.
2021-01-27 15:34:54 -08:00
Dustin Carlino
341ce834e3
Based on startup params, display an extra 'study area' on the map. cyipt/actdev#44
2021-01-27 13:00:48 -08:00
Dustin Carlino
f69335edf0
Let individual maps override the street parking length. #457
...
Now regenerate all map data, because the schema changed. Also had to
revert part of the last commit to unbreak transit route snapping in
Berlin.
2021-01-25 12:36:49 -08:00
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
Dustin Carlino
53227b6ec6
new release (and finally add a little more automation for this step)
2021-01-03 12:23:47 -08:00
Dustin Carlino
5c04923dff
Split abstio crate out from abstutil. #253
...
widgetry, geom, and abstutil may wind up on crates.io in some form to
let other projects use widgetry. abstio has A/B Street-specific tricks
for reading data on native/web. Note widgetry still depends on abstio,
will figure out how to clean that up next.
2021-01-02 10:28:00 -08:00
Dustin Carlino
b7d025b6a6
Simplify DrawRoad a bit (center line and label in the same batch). Include it in GeoJSON export. #440
2021-01-01 15:18:01 -08:00
Dustin Carlino
302ec94e3d
Try exporting the zoomed-in rendering of a map to geojson. #440
...
This approach has some manual effort and it's not capturing everything
yet, but it's a start.
2021-01-01 12:46:25 -08:00
Michael Kirk
acadad8bdf
fetch US census data from a hosted FlatGeoBuf ( #432 )
2020-12-31 16:20:32 -08:00
Dustin Carlino
60e7c91d03
Handle one-way roads more uniformly in the traffic signal heuristics. #8
...
Previously, dual carriageways (pairs of one-way roads in opposite
directions) mostly didn't get any signal templates successfully applied.
This change ignores outbound-only roads when applying the templates. In
one fell swoop, lots of previously broken signals along places like
Aurora Ave suddenly work reasonably.
2020-12-30 15:28:17 -08:00
Dustin Carlino
df59b477a5
Start importing Bellevue. Treat it as a separate city from Seattle, and
...
don't even check if Soundcast data covers it yet.
Now regenerate all map data.
2020-12-30 13:21:59 -08:00
Dustin Carlino
9bc761f98e
Explicitly model U-turns. Sometimes they're legal, often they get
...
generated incorrectly, but regardless, calling them TurnType::Left is
just confusing.
For the moment, always filter out U-turns from merged intersections.
When connections across merged one-ways are handled properly, we won't
need this, but in the meantime, it moves forward. #114
Not regenerating just yet, but will bundle it with the next commit.
2020-12-30 11:11:20 -08:00
Dustin Carlino
cdd3407165
Prevent the minimap from crashing when windows are minimized on Windows
2020-12-30 09:44:40 -08:00
Dustin Carlino
32a3159d19
Express AmenityType as a proper enum.
2020-12-28 12:18:29 -08:00
Dustin Carlino
e4448eea1b
new release
2020-12-27 10:33:16 -08:00
Dustin Carlino
f8ac0fc96b
Remember the upzoned buildings, and add a button to clear the choices. #431
2020-12-26 20:10:17 -08:00
Dustin Carlino
af5811c33c
Lift Cached to widgetry
2020-12-26 14:38:43 -08:00
Dustin Carlino
3c27255479
15 min tool: Optionally don't allow walking on shoulders. #393
2020-12-24 15:52:00 -08:00
Bruce
3be45b8221
Add a Variable phase ( #433 )
...
* Add a Variable phase
Variable provides a min duration, a delay duration, and an additional duration. The maximum cycle time is min + additional. Once min has been exhausted, if there is demand, the cycle is extended by delay until there isn't any demand or the additional duration has been consumed.
#295
2020-12-24 12:33:47 -08:00
Dustin Carlino
0fc0b8db65
Distinguish uncompressed/gzipped size in the updater tool. #377
2020-12-21 15:32:09 -08:00
Dustin Carlino
14fad05634
Link to patched Windows build that disables audio. #430
2020-12-21 13:34:38 -08:00
Dustin Carlino
f24a77e995
Disable audio on Windows, and clarify the game isn't for mobile. #430 [rebuild] [release]
2020-12-21 10:25:58 -08:00
Dustin Carlino
d0995f5b77
New release, with 15-minute Santa!
2020-12-21 08:03:06 -08:00
Dustin Carlino
677cf4f209
Merge the center panels into the ones on the right, which is especially helpful on high DPI screens.
2020-12-19 19:56:25 -08:00
Dustin Carlino
fdc1d4b8f9
Add a legend to the 15 min tool. #393
2020-12-19 15:39:35 -08:00
Dustin Carlino
799adbbdd4
Fix map loader on web. Remote paths wound up with an extra /, breaking
...
the deduping between remote and statically bundled files, which broke
one of the map loader panels with duplicate buttons.
2020-12-19 09:51:52 -08:00
Dustin Carlino
31426db26a
Label stores
2020-12-18 15:53:08 -08:00
Dustin Carlino
2823c04338
Finalization flurry...
...
- Tune colors in the experiment
- Regenerate maps again -- I forgot that the parcel data gets joined in
a later importer step.
- Add some of the new maps as levels
2020-12-18 14:24:45 -08:00
Dustin Carlino
ee0d73847e
Add more small Seattle maps for the experiment -- and who knows, maybe also useful for traffic sim
...
And unbreak the importer, cargo check doesn't build with features! Argh.
2020-12-18 11:00:15 -08:00
Dustin Carlino
16392a461f
Refactor: GeomBatch::load_svg directly takes EventCtx or GfxCtx. The prerender struct should ultimately not be exposed outside of widgetry.
2020-12-15 11:44:58 -08:00
Dustin Carlino
02dd3613cd
Refactor: Rename txt.render_to_batch to txt.render_autocropped, and make
...
it take EventCtx or GfxCtx
2020-12-15 11:35:40 -08:00
Dustin Carlino
271c1f5a4e
More clear upzoning UI
2020-12-15 10:49:36 -08:00
Dustin Carlino
5aecff3b9e
Regularly import Salzburg. #366
2020-12-15 06:02:06 -08:00
Michael Kirk
8b9b3ce2b1
census areas import ( #425 )
...
#424
2020-12-14 17:48:47 -08:00
Dustin Carlino
58e705a489
new release
2020-12-13 19:06:48 -08:00
Dustin Carlino
aa5010f2d0
Import part of Manhattan. Need to adjust the boundary to fix water
...
polygons, but this is a start.
2020-12-09 16:15:08 -08:00
Dustin Carlino
3d361074ab
Draw traffic signals changing over time in the experiment
2020-12-08 09:05:06 -08:00
Dustin Carlino
c8a37a27a0
Create 3 new small maps of Seattle for the experiment. Notably, 2 of
...
them simulate fully with --infinite_parking, and SLU makes it to about
4pm, so these might have some other interesting use...
2020-12-07 20:58:04 -08:00
Dustin Carlino
a88fef0874
Update minimap style and other bits from Figma, better snowflakes
2020-12-07 16:42:41 -08:00
Dustin Carlino
86814f6867
Make A/B Street's minimap specialize the generic widget, instead of duplicating code.
2020-12-07 15:40:35 -08:00
Dustin Carlino
2153b1605b
Move the legend to the minimap in the experiment, by parameterizing the
...
minimap on a trait to specialize it.
2020-12-07 14:42:49 -08:00
Dustin Carlino
df04fd7e18
Give SimpleApp a way to stash session-wide state. First use case is high scores for the experiment.
2020-12-04 15:08:15 -08:00
Dustin Carlino
766fea1441
Prevent warping near bridges, and ban travel along light rail entirely
2020-12-03 21:04:38 -08:00
Dustin Carlino
a11646a6fc
Overhaul building colors [rebuild]
2020-12-02 13:01:01 -08:00
Dustin Carlino
69b14e444f
Simpler abstutil APIs: return string errors immediately, don't make callers transform. We don't need to distinguish different error types anywhere.
2020-12-02 08:44:07 -08:00
Dustin Carlino
3eda17627b
Handle binary or JSON scenarios
2020-11-30 14:00:19 -08:00
Dustin Carlino
8ee3466815
new release
2020-11-29 17:02:34 -08:00
Dustin Carlino
be3d1dc83b
Refactor github workflow, since most steps are OS-independent. Build all of the separate binaries. [rebuild] [release]
2020-11-29 16:01:18 -08:00
Dustin Carlino
057587076c
Split config for different levels, add some sort of title screen
2020-11-29 15:44:45 -08:00
Dustin Carlino
f030086e8e
Overhaul how buildings get colored in different states, and reset things
...
when changing depots
2020-11-28 17:07:14 -08:00
Dustin Carlino
d6c179385e
Start in night mode, and adjust minimap coloring there
2020-11-28 10:19:21 -08:00
Dustin Carlino
4b28cfe806
Add a minimap
2020-11-28 09:45:58 -08:00
Dustin Carlino
b6484f31d4
Upzoning
2020-11-27 17:42:58 -08:00
Dustin Carlino
ebcae62652
Slightly simplify how some states specify what map objects can be
...
selected and clicked on.
2020-11-26 13:42:31 -08:00
Dustin Carlino
b7f3f2113b
Start refactoring a common UI pattern: recalculate some value only when ( #406 )
...
Start refactoring a common UI pattern: recalculate some value only when
a key changes.
It's quite verbose right now for some widgetry States to determine if
the mouse is over a particular type of object, check if that object has
changed since the last time, and calculate something based on it. This
introduces a new helper for expressing the pattern a little more
clearly.
2020-11-25 12:22:11 -08:00
Dustin Carlino
b6ebee0dd8
Tiny refactor: Drawable::empty(ctx)
2020-11-25 11:19:26 -08:00
Dustin Carlino
ff829db8f1
Expanding the boundary of huge_seattle, and creating a new north_seattle map
2020-11-25 08:56:55 -08:00
Dustin Carlino
314f01496e
Save/restore camera state per map in all map_gui apps too.
2020-11-24 11:53:50 -08:00
Dustin Carlino
5e952f9012
Fix web build break from a cfg() line creeping down
2020-11-23 18:01:42 -08:00
Dustin Carlino
f3ff910c37
Cleanup from the great app split:
...
- move show_zorder into DrawMap
- reorganize modules in map_gui
Next is to reorganize/collapse modules in game.
2020-11-23 17:58:32 -08:00
Dustin Carlino
c450922211
Split out the 15min tool to its own crate.
2020-11-23 17:58:32 -08:00
Dustin Carlino
9f422033e9
Make a SimpleMinimap for map_gui. Will refactor later.
2020-11-23 17:58:32 -08:00
Dustin Carlino
c3db4de087
Lift the Navigator tools to map_gui.
2020-11-23 17:58:32 -08:00
Dustin Carlino
139d435bd3
Split out the OSM viewer to its own crate, porting over a simple form of current_selection. Temporarily omit the minimap and navigator from it.
2020-11-23 17:58:32 -08:00
Dustin Carlino
6568c9e959
Add mouseover to the split parking mapper, sadly just by copying a simpler version of the code...
2020-11-23 17:58:32 -08:00
Dustin Carlino
ad0d1ae7a4
Split out the OSM parking mapper into a separate app, temporarily
...
WITHOUT mouseover.
2020-11-23 17:58:32 -08:00
Dustin Carlino
e6d21d81e7
Add the city picker to the experiment, as a way to lift it to map_gui.
2020-11-23 17:58:32 -08:00
Dustin Carlino
859d78f2cf
Refactor the CLI flag parsing that all apps will share.
2020-11-23 17:58:32 -08:00
Dustin Carlino
ab2f6fefec
Split the controls experiment into a separate binary, get it to draw a
...
map way more simply than the game
2020-11-23 17:58:32 -08:00
Dustin Carlino
558eb6f716
Extract DrawMap into a separate crate, along with everything else it
...
depends on.
The goal is to be able to split things like the OSM viewer, parking
mapper, and 15 min tool into separate crates from the game, while still
sharing lots of code.
2020-11-23 17:58:32 -08:00