Commit Graph

185 Commits

Author SHA1 Message Date
Dustin Carlino
de6a12e472 After much deliberation, rename Composite -> Panel (#253) 2020-08-27 12:12:44 -07:00
Dustin Carlino
2935d2379b Mechanical rename of ezgui -> widgetry, a much better name to enchant the Rust community. #253 [rebuild] 2020-08-27 10:37:04 -07:00
Dustin Carlino
ad423b22e9 Remove the glium backend, now that @michaelkirk has gotten the glow native/wasm backends ship-shape. Got rid of the glutin fallback behavior for now; need to ideally upstream something there for #103 2020-08-20 16:59:54 -07:00
Dustin Carlino
11cefb118a And the same thing for OriginalIntersection
Actually, don't need to regenerate map data. Thanks to the magic of
zero-cost wrapper types, the binary format is the same.
2020-08-13 11:48:13 -07:00
Dustin Carlino
843d24b6ed Refactor: OriginalBuilding should just be OsmID. The purpose of
OriginalBuilding was to refer to buildings in a stable way across
different maps and across OSM updates. Recently, OsmID and friends
appeared. The double layer of wrapping is an annoying API.

Not regenerating map data yet; about to do the same thing for
OriginalIntersection
2020-08-13 11:37:06 -07:00
Dustin Carlino
d1e9e38e82 refactor for #231: use typed OSM IDs everywhere, dedupe URL code
have to regen, the binary format has changed
2020-08-08 16:09:36 -07:00
Dustin Carlino
cd712009ec whittle down old stuff from map_editor. i think it still has value as a RawMap viewer with an easy way to move points and quickly iterate on intersection geometry, but things like lane editing and turn restriction viewing aren't useful anymore. 2020-08-05 08:38:04 -07:00
Dustin Carlino
e82fe996ad reduce GfxCtx surface area 2020-08-05 07:56:57 -07:00
Dustin Carlino
225abcd112 clean up old UserInput APIs from long, long ago 2020-08-04 12:00:07 -07:00
Dustin Carlino
5fe3cc5f8a slowly whittle down public surface of ezgui
- stop referencing Prerender when easy
- default_font_size hasn't been used since the great typography refactor

some of this harms the usability of map_editor, but that's fine, because
the UX is awful anyway, and nobody should be using this except for me
very occasionally. long-term fate of it is to go away.
2020-08-04 11:36:47 -07:00
Dustin Carlino
41f4cfff6d tool-assisted refactor of ezgui Outcome 2020-08-03 13:42:59 -07:00
Dustin Carlino
03796fcd66 introduce the tiny walkable shoulder lane type. pathfinding penalty,
rendering adjustments. #176

the SharedSidewalkCorner geometry looks bad, but acceptable for now.
2020-07-30 13:42:36 -07:00
Dustin Carlino
e1e265db14 tighten up Polygon constructors to enforce an outer ring... in most
cases now.
2020-07-27 14:03:55 -07:00
Dustin Carlino
f1ef02b907 store Tags in map_model objects, to reap its benefits anywhere in the codebase. serialization format doesnt change! 2020-07-23 07:43:50 -07:00
Dustin Carlino
e2d478340b bring in planning area KML for berlin, #119 2020-07-16 11:15:22 -07:00
Dustin Carlino
07ed1fec95 more polyline work... get rid of Warn<>. extremely spammy and hasn't
been helpful in ages.
2020-07-11 15:17:16 -07:00
Dustin Carlino
cce624edd8 start the big one: Polyline::new 2020-07-11 13:42:19 -07:00
Dustin Carlino
98c6f46c78 the first real big change: Line::new always returns Option 2020-07-11 12:37:38 -07:00
Dustin Carlino
0dd3199f7a cut down variations of pt2d<->gps. mostly we want to forcibly convert.
possible semantic change: soundcast border matching now includes ALL
borders, even if the center is slightly OOB
2020-07-11 12:02:12 -07:00
Dustin Carlino
6919c24bf8 detect the data/ dir more intelligently. fixes #73. still need to
- consider collapsing the directory structure in the releases
- fix wasm

[rebuild]
2020-07-07 11:09:35 -07:00
Dustin Carlino
4f507ef96a refactor Composite style 2020-07-03 13:01:54 -07:00
Dustin Carlino
a62e3133db cleanup after #59:
- cargo fmt
- update some comments
- remove EventLoopMode
- if no updates are requested, that's the equivalent of InputOnly
2020-07-01 17:57:43 -07:00
Javed Nissar
1f58cbf16d
Refactor event update loop (#59)
* Refactor event update loop to enable multiple game update types

* Implement pan event to improve panning with cursor at edge of screen and
fixed formatting
2020-07-01 17:47:30 -07:00
Dustin Carlino
1422643973 finish the ezgui layout refactor. most things are way more consistent now, and with less code 2020-07-01 15:39:04 -07:00
Dustin Carlino
834f060462 yet more layout refactor 2020-07-01 15:31:52 -07:00
Dustin Carlino
6696263a08 fix map_editor and headless build break, for #108 2020-06-30 13:49:24 -07:00
Dustin Carlino
7f6beb73db mac keyboards maybe dont have right ctrl, use left ctrl instead [rebuild] 2020-06-23 10:38:41 -07:00
Dustin Carlino
a86ef0fa12 start revamping layers. for delay, have zoomed and unzoomed views. always use gradients. 2020-06-15 12:51:32 -07:00
Dustin Carlino
63067656b8 whittle away weird geombatch APIs. more left 2020-06-05 11:14:17 -07:00
Dustin Carlino
855d8f4d22 update glutin, winit, glium now that a fix for linux startup time is upstreamed in glutin. and a few other packages too. ditch geo-offset dependency, since it uses old versions and isn't being used yet 2020-06-01 09:18:17 -07:00
Dustin Carlino
9f78766ee6 try brian's signals. making them the default to get used to them, but
not updating screenshot goldenfiles yet
2020-05-13 15:31:29 -07:00
Dustin Carlino
4816e5fe8f filling out the parking mapper 2020-05-11 12:18:19 -07:00
Dustin Carlino
d55ebb71ca starting a dedicated OSM mapping mode for parking in the main game, not map_editor 2020-05-11 10:45:36 -07:00
Dustin Carlino
182f5139a5 rip out old mapfixes code. pure OSM is more maintainable. keep map_editor for drawing synthetic maps and debugging raw maps 2020-05-10 10:39:08 -07:00
Dustin Carlino
a2533244a4 temporarily? hardcode some exceptions to dont-block-the-box to make some
progress on 23rd

and tiny little cleanups
2020-04-29 11:14:53 -07:00
Dustin Carlino
18779c10ad organizing data/input by city. (I tried organizing everything in data/,
but it's too big a change. small steps.)
2020-04-28 12:28:37 -07:00
Dustin Carlino
6580360f99 fix map editor. also, apparently Cargo.lock should be under version control for binary crates 2020-04-10 20:00:13 -07:00
Dustin Carlino
fec2bb51ca start organizing ezgui internal constants into a Style struct 2020-04-05 11:57:27 -07:00
Dustin Carlino
06bb5e08e6 refactoring Color / FancyColor. remove hatching style 1 2020-03-30 16:15:32 -07:00
Dustin Carlino
69dab9e27d typography overhaul... [rebuild] 2020-03-26 15:42:37 -07:00
Dustin Carlino
4df64b4c83 remove last users of ModalMenu. so long, (some variant of) the original widget. 2020-03-22 20:59:44 -07:00
Dustin Carlino
d63c79d87c popup info in map editor only when a key is held. lock down old
blocking_text methods a little more
2020-03-18 11:13:40 -07:00
Dustin Carlino
812c7fa640 start support driving on the left, more carefully tracking all the dependencies. part of #27. lots of bugs left, but it doesn't break anything for driving on the right. 2020-03-16 17:40:12 -07:00
Dustin Carlino
6e8846bf85 bring back elevation data before the hackathon. manual revert of 35b7c18df9 2020-03-11 11:08:49 -07:00
Dustin Carlino
51745d2675 add a better bg for tooltips, centralized in one place 2020-02-27 11:28:57 -08:00
Dustin Carlino
c65b120044 get map_editor working on wasm target 2020-02-14 16:04:33 -08:00
Dustin Carlino
dd9667b95e make map_editor compile again 2020-02-10 12:06:38 -08:00
Dustin Carlino
fad4cdbda2 plumb font directory so it'll work anywhere, but still would prefer to bundle binary data properly 2020-02-08 10:36:44 -08:00
Dustin Carlino
d3aa02cee4 improve loading screen text rendering time. don't double-render text,
use fixed dims, adjust lyon tolerance
2020-02-08 10:36:44 -08:00
Dustin Carlino
7c76f2d119 migrating all callers of draw_text_at_mapspace to do something better now 2020-02-08 10:36:44 -08:00
Dustin Carlino
e96fa0f96f fix bounds of tutorial levels, so max unzoom and minimap and such work.
always display minimap in sim modes.
2020-01-30 14:25:02 -08:00
Dustin Carlino
b2216bb482 not all lanes have to be the same width. make sidewalks a bit thinner. 2020-01-28 17:26:14 -08:00
Dustin Carlino
1ab3c5200a limit max unzoom based on actual map dims 2020-01-13 14:39:02 -08:00
Dustin Carlino
e2de6b24d9 start windows maximized 2020-01-10 11:23:52 -06:00
Dustin Carlino
0ad371525b after clicking a button, figure out if we're hovering over any new buttons that're created. kind of an invasive refactor to get to this, but worth it. 2020-01-07 11:43:34 -06:00
Dustin Carlino
a67b1bf19a refactor Polygon::rectangle_top_left and a few more things... taking
Distance everywhere is kind of silly
2019-12-20 12:42:49 -08:00
Dustin Carlino
d5312fabd4 remove the show/hide feature from ModalMenus. ModalMenus are on the way out, the icon is often covering stuff up, and now we can delete some old pngs 2019-12-18 16:26:28 -08:00
Dustin Carlino
442a0509dd invert the default for text background. none by default, should be an exception to use it. planning to support background more generally through some kind of widget layouting. 2019-12-13 15:45:24 -08:00
Dustin Carlino
ee598b6ae4 round of clippy. not fixing everything. 2019-12-11 16:17:15 -08:00
Dustin Carlino
61ef9f0b33 adding turn lanes to the tutorial level 2019-12-07 10:44:05 -08:00
Dustin Carlino
81a19eb78d remove the experimental hi-res grass and park textures and all the
flagged off textures. going to experiment in a different branch instead.
2019-12-05 09:37:05 -08:00
Dustin Carlino
f3f4562e00 simple solution for adjusting map boundaries in editor 2019-12-04 13:03:47 -08:00
Dustin Carlino
3501aa6d72 reviving some way of saving and using purely synthetic maps. creating a
few for the traffic signal tutorial.
2019-12-04 12:19:17 -08:00
Dustin Carlino
a043a9ba05 clean up more of abstutil path/filesystem API 2019-12-03 09:59:43 -08:00
Dustin Carlino
720f9b8b30 similar for writing 2019-12-02 20:41:09 -08:00
Dustin Carlino
808c3da141 panic early with a nice error if we cant read a binary or json file 2019-12-02 20:35:20 -08:00
Dustin Carlino
082ae0cea1 simple polygon translate API -- no use in taking distances. pt2d isnt natively expressed in meters, and mostly using this for screenspace anyway 2019-11-27 09:15:46 -08:00
Dustin Carlino
1440a8630b prototyping a text button, using it for a title screen 2019-11-24 15:23:28 -08:00
Dustin Carlino
bdc66526a6 tool to clear interior points of road, nice for fixing dangling borders 2019-11-20 12:45:39 -08:00
Dustin Carlino
0e6f89f88b for now, just clobber turn restrictions when merging roads. want to move forward with fixing other maps. also remove label from previous fixes 2019-11-20 11:27:22 -08:00
Dustin Carlino
463ed7022e small fixes/cleanups to map layer:
- print highest cost in heatmap over all turns
- rm defunct label support for roads/bldgs
- trim out unused methods from Map
- making spawner go through sim layer to get paths, consolidating a bit
2019-11-18 10:33:36 -08:00
Dustin Carlino
53bbf4e272 manually trim a few disconnected sidewalks 2019-11-13 15:01:53 -08:00
Dustin Carlino
5aecb96d8f refactor turn restriction handling in map_editor... no behavioral changes yet 2019-11-09 16:10:18 -08:00
Dustin Carlino
179009de32 stop coloring synthetic/original stuff in map editor. not useful now that it's normal to modify existing stuff 2019-11-06 10:16:06 -08:00
Dustin Carlino
ada5484501 finishing up the montlake map, no gridlock by default 2019-11-04 12:55:04 -08:00
Dustin Carlino
03e2c0b3f2 one master set of fixes in huge_seattle coordinate space, then a single override per map. start over with fixes... again. for the last time?! all the tricky cases from last time work now... 2019-11-04 09:50:59 -08:00
Dustin Carlino
a5892daedb add a new lane type for road closures 2019-10-29 17:04:57 -07:00
Dustin Carlino
aae6d6d998 cleanup: collapse the old separated modal menu groups 2019-10-29 15:37:19 -07:00
Dustin Carlino
b3611707c8 transforming fixes into huge_seattle coordinate space, to avoid most
border issues.
2019-10-28 22:26:39 -07:00
Dustin Carlino
8e4bc6961b montlake is completely fixed of short roads! also turn restrictions
around 520, crosswalks over 2 one-ways, decided to use one fix file per
map
2019-10-28 19:08:44 -07:00
Dustin Carlino
ca43e6fb43 woops, wasnt deleting turn restrictions from world layer. fix up
montlake/520 once again, modulo turn restrictions
2019-10-28 16:16:25 -07:00
Dustin Carlino
6771c965b4 fix bug in road creation. montlake roundabout as the test case. 2019-10-28 14:42:18 -07:00
Dustin Carlino
1f7c113267 fix road merging. simpler now that roads only have one object
associated. require turn restrictions to be deleted first. fix the
boston area as a test
2019-10-28 14:33:10 -07:00
Dustin Carlino
ea50371d64 rip out stable IDs in favor of orig IDs. the extra layer is confusing for things like MapFixes. stop modifying orig IDs when merging roads.
NOT done with this transition yet, just pushing to not lose work
2019-10-28 12:08:11 -07:00
Dustin Carlino
ecc86b6d6a revamping MapFixes. very straightforward full override of synthetic/normal stuff, including geometry. no more semantically weird hints like merging roads. some bugs left. 2019-10-27 17:15:27 -07:00
Dustin Carlino
9cfd22d5e0 allow creating new internal points for roads in the editor 2019-10-26 16:32:01 -07:00
Dustin Carlino
0d948cef91 share camera state between game and map_editor 2019-10-26 16:16:32 -07:00
Dustin Carlino
e881d13014 find all the short lanes, from map_editor 2019-10-26 15:01:27 -07:00
Dustin Carlino
1e903c6cee pass a flag to disable using mapfixes, since it's annoying to keep temporarily deleting these 2019-10-25 10:09:47 -07:00
Dustin Carlino
5784a389c1 quick sidewalk tagger in map_editor, with upstreaming 2019-10-23 14:12:49 -07:00
Dustin Carlino
f7ca317422 optionally use real intersection polygons in map editor, including for grabbing 2019-10-23 13:38:58 -07:00
Dustin Carlino
996eceea92 with the new traffic signal, add back the 520 EB onramp 2019-10-22 15:00:56 -07:00
Dustin Carlino
468fd65021 copy over highway type too for coloring. fill out some metadata in the
520 fixes.
2019-10-18 12:15:51 -07:00
Dustin Carlino
4eadcc29f5 allow toggling parking when blockface hints are different through the way. just warn. 2019-10-17 11:36:03 -07:00
Dustin Carlino
10f2f6008f improve map_editor's intersection preview
- timer for setting up world
- preview all intersections
- move world to map_editor; it's too oddly specialized
- dont show circle while previewing intersection geom
- show overlapping intersection polygons
2019-10-16 15:08:22 -07:00
Dustin Carlino
22df33f66a try to clean up crashes with showing_pts state 2019-10-16 08:58:14 -07:00
Dustin Carlino
84c5241506 when toggling parking, make sure hints applied uniformly to the entire way. warn if not. 2019-10-16 08:47:48 -07:00
Dustin Carlino
1fc9792378 finish producing the osm change 2019-10-15 18:49:06 -07:00
Dustin Carlino
76f5dc21be steps towards producing an osm change file 2019-10-15 13:43:47 -07:00
Dustin Carlino
74372c64b6 count how many roads have been audited. apply default tags (and mark
them inferred) to everything, to count properly.
2019-10-15 12:17:38 -07:00