Commit Graph

865 Commits

Author SHA1 Message Date
Dustin Carlino
2c5030926c add outline to any widget. use to outline popup menus a bit 2020-01-19 14:18:38 -08:00
Dustin Carlino
1e49d4b6eb adjust parking heatmap color. start changing sandbox mode's top-center
panel
2020-01-19 14:04:59 -08:00
Dustin Carlino
901b938b31 dont let screenspace things see cursor if it's in mapspace. fixes clicking buttons hidden by clipping. 2020-01-17 14:11:07 -08:00
Dustin Carlino
1c3b7fe52b cut down the places populating covered_areas. mainly Composite should do it, being aware of clipping. some temporary exceptions remain. 2020-01-17 13:58:33 -08:00
Dustin Carlino
14596d00ea lock down many widgets from being used outside of Composites 2020-01-17 13:50:13 -08:00
Dustin Carlino
3cf916a2bc adjust info panel dims slightly [rebuild] 2020-01-16 18:19:30 -08:00
Dustin Carlino
aff092776e fix hidpi issue ONCE AND FOR ALL. tested successfully on linux and
windows. [rebuild]
2020-01-16 10:38:01 -08:00
Dustin Carlino
bb01c30b9d scale scrollbar length to show how much stuff is actually scrollable 2020-01-15 12:07:25 -08:00
Dustin Carlino
a349eb330b fix flex wrapping and other weird issues 2020-01-15 11:21:32 -08:00
Dustin Carlino
c1f35aca46 simplify size management -- minimal size by default, can limit max size 2020-01-15 10:33:08 -08:00
Dustin Carlino
5af9c7e17b every composite will automatically be scrollable if needed. simplify API. 2020-01-15 10:19:21 -08:00
Dustin Carlino
ffb8270b10 treat the percentage as a max, not a set limit 2020-01-14 16:53:11 -08:00
Dustin Carlino
8eecb6e190 draw the scrollbars outside the clip 2020-01-14 16:50:26 -08:00
Dustin Carlino
b348e5d393 position the scrollbars so that theyre always visible. is kind of
broken.
2020-01-14 16:46:45 -08:00
Dustin Carlino
851e12f432 simplify some code without changing behavior 2020-01-14 15:57:21 -08:00
Dustin Carlino
d637243f2a support horizontal scrolling 2020-01-14 15:47:35 -08:00
Dustin Carlino
6db84efdae WIP clip composites 2020-01-14 15:18:27 -08:00
Dustin Carlino
f613b003a4 fix scissor DPI issue once and for all? the math was backwards [rebuild] 2020-01-14 10:50:18 -08:00
Dustin Carlino
3482d61c0d attempt to detect hidpi changes? [rebuild] 2020-01-13 19:13:00 -08:00
Dustin Carlino
cca6ce48a6 creep towards floating info panels, by moving it away from the corner of the screen 2020-01-13 18:52:44 -08:00
Dustin Carlino
bb141c7026 also clip text. not used quite yet. 2020-01-13 18:26:24 -08:00
Dustin Carlino
61e8003cca upgrade glutin (and thus winit). maybe will help dpi issues on some
platforms? [rebuild]
2020-01-13 17:07:31 -08:00
Dustin Carlino
8a7e3cecff make clipping be a stateful API, as prep for clipping composites 2020-01-13 16:57:09 -08:00
Dustin Carlino
90300c655e switch remaining signal editor stuff to a top-center panel 2020-01-13 15:56:25 -08:00
Dustin Carlino
af76ad9d60 wrap text in signal diagram to limit width 2020-01-13 14:57:46 -08:00
Dustin Carlino
1ab3c5200a limit max unzoom based on actual map dims 2020-01-13 14:39:02 -08:00
Dustin Carlino
0a771404ea make the zoom in/out fully feature actually smoothly zoom 2020-01-13 14:01:56 -08:00
Dustin Carlino
30664d9791 stop listing edits in main edit mode too 2020-01-13 09:51:35 -08:00
Dustin Carlino
ec1e3f435b make it easy to dump raw events for debugging on windows/mac [rebuild] 2020-01-12 09:35:38 -08:00
Dustin Carlino
f1b42ecdb9 consolidate composite layouting... just need to know alignment and percentage of screen 2020-01-11 14:59:27 -06:00
Dustin Carlino
0023002935 proof of concept: max size for composites! 2020-01-11 14:32:41 -06:00
Dustin Carlino
abe89d65f8 center popup menus 2020-01-11 14:02:47 -06:00
Dustin Carlino
60c20230ec align X button to the right. flexbox is so unintuitive. 2020-01-11 13:54:42 -06:00
Dustin Carlino
6469664b5f dont crash when changing phases without a scrollbar 2020-01-10 12:28:13 -06:00
Dustin Carlino
511c451e8a totally ditch the fixed Composite positioning 2020-01-10 12:01:05 -06:00
Dustin Carlino
e2de6b24d9 start windows maximized 2020-01-10 11:23:52 -06:00
Dustin Carlino
c64b445bd9 clicking a menu entry in a wizard was double-using the event 2020-01-10 09:30:37 -06:00
Dustin Carlino
11ece6b188 no more log scroller. have an OK button 2020-01-09 17:54:07 -06:00
Dustin Carlino
1d379e8315 zoom limits 2020-01-09 15:57:34 -06:00
Dustin Carlino
45c7ee08e1 remove speed slider, use the 3 settings instead 2020-01-08 10:55:34 -06:00
Dustin Carlino
5ae2557b2c adjusting some speed panel buttons. the new triangles dont do anything
yet.
2020-01-07 12:52:56 -06:00
Dustin Carlino
24565cfe49 refactoring composite builder API 2020-01-07 12:08:39 -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
9aac76ee39 draw less terrible bus stops 2020-01-04 09:50:03 -06:00
Dustin Carlino
4ae7a04d79 last commit broke wizard menus, fix it 2020-01-03 09:28:29 -06:00
Dustin Carlino
27912bdaf0 elide scrollbar if it's not needed 2020-01-02 12:26:24 -06:00
Dustin Carlino
3bd4a7220d make popup menus use scrolling 2020-01-02 11:35:41 -06:00
Dustin Carlino
642084c595 rotate walk icons 2020-01-02 10:24:12 -06:00
Dustin Carlino
1ad3dfd634 always draw crosswalks, draw walk / dont walk icons 2020-01-01 13:47:55 -06:00
Dustin Carlino
863e239c98 turning histogram into a proper ManagedWidget 2019-12-29 10:16:38 -06:00
Dustin Carlino
71553cbc70 make time jump textbox start with the current time, so the format is a bit more clear. addresses #24 2019-12-26 18:30:51 -06:00
Dustin Carlino
517a35775f adding pan buttons to minimap. they dont do anything yet, but the hard
part was positioning the minimap using all the new layouting
2019-12-25 12:01:51 -08:00
Dustin Carlino
ebd405e2ef make the scrollbar slider work! also, stop wasting github resources 2019-12-23 15:00:22 -08:00
Dustin Carlino
21b8f41a59 change API of Composite. we need to own all the sliders after all. prep
for including a scrollbar.
2019-12-23 14:33:43 -08:00
Dustin Carlino
3c0b88dfdf rewrite slider a bit. support vertical scrolling (untested). fix some
bugs in speed panel introduced a while ago. keep tuning github workflow.
2019-12-23 13:56:29 -08:00
Dustin Carlino
dafcc50479 for now, hack around layouting mess by hardcoding window width to make flex wrapping kind of work 2019-12-23 11:05:24 -08:00
Dustin Carlino
2a8c657770 only upload widget backgrounds once 2019-12-22 10:52:41 -08:00
Dustin Carlino
194dbae66f embed Scroller functionality in Composite directly. use for analytics panel 2019-12-22 10:26:48 -08:00
Dustin Carlino
2a67872d17 turning the old scoreboard into a separate dashboard. also fold in the
bus route explorer
2019-12-21 14:43:03 -08:00
Dustin Carlino
a5910ff99b add back a legend to the plots 2019-12-21 11:04:30 -08:00
Dustin Carlino
e7d9efc4e4 split the plot into 3 pieces, use layouting for the axes 2019-12-21 10:43:26 -08:00
Dustin Carlino
f1566b48c9 lift ManagedWidget and friends into ezgui. have a wrapper layer in game that adds callbacks. here's my herculean refactor of the week. :D 2019-12-20 15:56:04 -08:00
Dustin Carlino
c2e5678308 cut intersection delay and thruput plots over to being embedded in info panel composite. working on rendering issues. 2019-12-20 14:19:40 -08:00
Dustin Carlino
2a02e31bce making Plot be something that can be composited. just some of the glue
so far, nothing working yet.
2019-12-20 13:42:58 -08: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
ae41408c70 compute Composite layout upfront. only recompute when window is resized. 2019-12-20 11:20:09 -08:00
Dustin Carlino
49a0f7abd6 yay, delete old gunky attempts at scrolling 2019-12-20 10:30:56 -08:00
Dustin Carlino
b229c44511 make the new signal diagram selectable. it's now basically usable! 2019-12-20 10:25:14 -08:00
Dustin Carlino
04bcf77e2b work on new traffic signal scrolling panel. generalized scrollable
Composite works!
2019-12-20 09:35:27 -08:00
Dustin Carlino
56285a7b30 add screen positioning to some Composites 2019-12-19 10:59:39 -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
7ad40959ca adjust all of the UI panels... 2019-12-18 16:20:14 -08:00
Dustin Carlino
892e0592e1 adjust rendering of parked cars 2019-12-17 15:55:47 -08:00
Dustin Carlino
e893e6b98c add a flag to override DPI, so we can tune on mac 2019-12-16 19:09:02 -08:00
Dustin Carlino
eda40ecdec start an interactive legend for the minimap. pretty disjoint from real
AgentColorScheme right now
2019-12-16 15:40:32 -08:00
Dustin Carlino
ec01267dd0 let some buttons skip having callbacks and let the owner query them instead 2019-12-16 10:10:01 -08:00
Dustin Carlino
97c8a84efb switching out lane editing icons for yuwen's nice ones 2019-12-15 11:06:59 -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
33bd713609 fix the weirdness with clicking in the info panel to choose actions. the
click event was getting immediately reused after exiting the panel,
causing the panel to reappear. problem was some widget stuff looking for
mouse-down events. instead they should look for mouse-up.
2019-12-13 11:47:02 -08:00
Dustin Carlino
1fc7a73882 add version number to release dirs and zips 2019-12-12 19:04:14 -08:00
Dustin Carlino
5440fca4fe move the functions from the last MenuUnderButton to the ModalMenus, just so I can get rid of the atrocity that is MenuUnderButton 2019-12-12 15:24:07 -08:00
Dustin Carlino
7d53f536d4 fix up speed controls a bit after yesterday's move. closes #23 2019-12-12 13:16:53 -08:00
Dustin Carlino
dc2cc81249 make Timer methods and ModalMenu take &str or String 2019-12-12 10:25:48 -08:00
Dustin Carlino
1542e237d9 limit precision on ScreenDims. should fix #18 2019-12-12 09:13:25 -08:00
Dustin Carlino
770507610c try to workaround the mac dpi issue for minimaps again. hardcoding didnt work. 2019-12-11 16:59:13 -08:00
Dustin Carlino
ee598b6ae4 round of clippy. not fixing everything. 2019-12-11 16:17:15 -08:00
Dustin Carlino
cb68536989 ripping out the old ezgui context menu gunk. woo! 2019-12-11 16:08:58 -08:00
Dustin Carlino
ec40780ee3 use the action list to populate a menu in InfoPanel. cant choose the actions yet there. 2019-12-11 15:25:43 -08:00
Dustin Carlino
14f4dc2e3c left click to open info panel. refiddling how drag events are detected.
kind of messy code, but the behavior is FINALLY right.
2019-12-11 13:52:01 -08:00
Dustin Carlino
f0af92f00e split out an agent meter with icons for the modes 2019-12-11 10:13:36 -08:00
Dustin Carlino
3187fc7ef8 replace MultiText with DrawBoth 2019-12-09 13:03:28 -08:00
Dustin Carlino
4e96363398 tuning color rewriting and placement of some svg icons. removing the
crazy shader color masking
2019-12-08 13:44:43 -08:00
Dustin Carlino
5a7314d137 Add color rewriting and stroke support for SVG images. Cut over more
images, discovering some break...
2019-12-08 12:46:56 -08:00
Dustin Carlino
77099a164b try using usvg and lyon to produce Polygon+Colors from svg files. so
far, so good. dodging a dependency on harfbuzz (which doesn't build in
my windows cross-compilation env), now trying on mac...
2019-12-08 10:24:01 -08:00
Dustin Carlino
e567d14fc2 silently add hotkeys to challenge picker screen for my own sanity 2019-12-07 13:29:34 -08:00
Dustin Carlino
631cc493c1 hack around mac dpi minimap issue 2019-12-06 10:29:24 -08:00
Dustin Carlino
f94a6ad667 when there are too many textures, print the current groupings 2019-12-05 18:23:19 -08:00
Dustin Carlino
ac4cfea3e3 skip hidden files (.gitignore started showing up, oops). also, stash
screenshots outside of the game/ dir, so we dont recompile when we
accidentally create these
2019-12-05 14:21:17 -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
c37eb1a5ed woops, i had broken hatching a while back, just now noticed 2019-12-03 15:19:44 -08:00
Dustin Carlino
6695f72847 organize abstutil paths internally a bit, inching towards organizing data/ dir 2019-12-03 11:15: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
295f5b7786 managed widgets are now glued to flexbox rows and columns. need to plumb
more style options, but this was the crux
2019-11-30 09:15:51 -08:00
Dustin Carlino
5fd067ea62 adding roboto 2019-11-29 10:17:14 -08:00
Dustin Carlino
6c6113d1bc ripping text data out of canvas 2019-11-28 22:41:08 -08:00
Dustin Carlino
1a9c78b5fe tuning a few last things with the speed panel for now 2019-11-28 13:45:08 -08:00
Dustin Carlino
6fcf8d4478 redo layouting of new speed panel. pull absolute coordinates from
mockup. looks much closer now
2019-11-28 10:31:55 -08:00
Dustin Carlino
229bac4149 plumb tooltips for image buttons. small refactor making a
color+rectangle for an image. organizing NewSpeedControls a bit
2019-11-28 09:55:56 -08:00
Dustin Carlino
d553530ee7 prototype new speed panel. adapting changes from
https://github.com/jinzhong2/abstreet/tree/new_speed_panel
2019-11-27 15:42:19 -08:00
Dustin Carlino
819e27aa5d cutover sim time (via the API) to time 2019-11-27 11:49:57 -08:00
Dustin Carlino
c0cfbde4ec add a bit of padding to the minimap, pick an initial zoom to fit the entire width, and clip using scissor test 2019-11-27 09:55:08 -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
b47a186373 unify the two JustDraw things 2019-11-26 13:55:16 -08:00
Dustin Carlino
13b1e86fb7 unify the two button types 2019-11-26 13:41:05 -08:00
Dustin Carlino
202cfcf0d6 hack in a mask to change the color of image buttons without backgrounds 2019-11-26 10:59:33 -08:00
Dustin Carlino
c87c043286 unify two button types, and use proper bbox for images 2019-11-25 22:00:36 -08:00
Dustin Carlino
188b2fd372 adding in some image buttons for the main menu. no highlighting yet.
wrong bounding boxes.
2019-11-25 19:31:39 -08:00
Dustin Carlino
d66daa22f0 adding some hotkeys back to the main menu. not sure how to communicate them yet. 2019-11-25 18:37:59 -08:00
Dustin Carlino
9ba4f83ca4 remove the unused total_width param from set_pos. it's confusing, and will probably change with flexbox soon 2019-11-25 17:58:55 -08:00
Dustin Carlino
dfd036300b refactor: make text_dims return ScreenDims. also, update the logo image 2019-11-25 17:38:37 -08:00
Dustin Carlino
a4d5aa766b widget wrapper for drawing text, so we can layout it 2019-11-25 17:19:22 -08:00
Dustin Carlino
b1bc7de2e8 prototype flexbox support via stretch. it unbreaks the challenge picker
screen, to start. :)
2019-11-25 16:51:45 -08:00
Dustin Carlino
e1496acf70 toggle dev mode at runtime 2019-11-25 15:23:17 -08:00
Dustin Carlino
69d6aca0ef switch from wget to curl, since wget isnt installed by default on mac.
improve developer instructions a bit. don't crash if scrot doesnt exist.
This partly helps with #3, but more work still needed
2019-11-25 11:21:43 -08:00
Dustin Carlino
573edbd13e adding the logo to the title screen and filling out some credits 2019-11-24 19:09:07 -08:00
Dustin Carlino
f0314c31b1 making an... almost rounded rectangle ;) 2019-11-24 18:08:46 -08:00
Dustin Carlino
3511669c4e ripped out the old splash screen entirely now, new about screen 2019-11-24 17:05:44 -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
941b423b16 make conversion from ScreenPt to Pt2D a bit easier 2019-11-24 14:42:46 -08:00
Dustin Carlino
aa4a002fb4 fix the mysterious flipped textures. i thought the UV mapping was the problem, but turns out I was using from_rgba_reversed for some mysterious reason 2019-11-24 08:55:37 -08:00
Dustin Carlino
888e405146 actually, auto-group textures into groups based on size. too tedious otherwise. 2019-11-24 08:52:50 -08:00
Dustin Carlino
a2ea691fa3 fix the 16 texture limit on mac properly, by using texture arrays for icons 2019-11-24 07:38:32 -08:00
Dustin Carlino
0814974885 fix more stuff... 2019-11-23 13:15:05 -08:00
Dustin Carlino
640fcae07e temporary workarounds for the hackathon, will revert later 2019-11-23 12:03:23 -08:00
Dustin Carlino
e7bda09978 simple perf boosts: avoiding some unnecessary GPU uploads every frame 2019-11-22 14:06:44 -08:00
Dustin Carlino
ade23dac5f also prompt to save edits before loading different edits. refactor some of the flow 2019-11-19 12:27:11 -08:00
Dustin Carlino
2e6e0f3e79 fix bug where clicking another button with a popup menu would choose that entry 2019-11-18 12:42:52 -08:00
Dustin Carlino
8c2d383fd7 undo button, and displaying last 5 edits 2019-11-17 17:02:14 -08:00
Dustin Carlino
7512098411 circular buttons need to act as covered areas too 2019-11-13 11:47:37 -08:00
Dustin Carlino
5afc45182b show which paint mode is active better 2019-11-13 11:18:43 -08:00
Dustin Carlino
0f427542c7 putting in dummy paint buttons to edit mode 2019-11-13 08:54:25 -08:00
Dustin Carlino
301a35e4df fix hidpi issues on mac once and for all?? 2019-11-10 18:56:00 -08:00
Dustin Carlino
fff1068689 remove text bg in speed panel. adjust text API to remove bg color. 2019-11-08 11:56:29 -08:00
Dustin Carlino
db86a24cda draw button text in the OSD (not owned by ezgui), not as a mouse tooltip 2019-11-01 11:45:02 -07:00
Dustin Carlino
e9e6664f61 using popup text box in a few more places to show important messages 2019-11-01 11:33:15 -07:00
Dustin Carlino
e564a67ad4 try to wrangle the complexities of synchronizing menus with analytics and colorschemes, which can be separately modified. added something for gridlock mode too. 2019-11-01 10:30:36 -07:00
Dustin Carlino
50ee547994 adding some help text to all gameplay modes 2019-10-31 15:30:12 -07:00
Dustin Carlino
3d68c3b83b cant click off wizard menus to cancel them 2019-10-31 14:54:45 -07:00
Dustin Carlino
1d08181eaa parameterize sandboxmode by a gameplaymode. makes the reset sim button
reinitialize scenarios properly
2019-10-31 09:59:03 -07:00
Dustin Carlino
a94e210c22 changing speed controls to be a panel of manually arranged buttons. not
done, but functionality is cutover. fix details later.
2019-10-30 15:01:11 -07:00
Dustin Carlino
9d828abbd0 move bus explorer to sandbox mode. make it start at the current stop 2019-10-30 12:20:04 -07:00
Dustin Carlino
7faeafd998 nice hatching for construction lanes, hackily encoded 2019-10-29 17:19:36 -07:00
Dustin Carlino
d757b45bff manually workaround y inversion with stretched textures by modifying the
images
2019-10-29 16:36:19 -07:00
Dustin Carlino
0575e57584 tweaks to buttons 2019-10-29 15:45:26 -07:00
Dustin Carlino
aae6d6d998 cleanup: collapse the old separated modal menu groups 2019-10-29 15:37:19 -07:00
Dustin Carlino
7574869798 tie together a popup menu and a button in a really simple way. move some
info and location things there
2019-10-29 15:14:17 -07:00
Dustin Carlino
00253d2783 using textures for the hide/show buttons. making it easier to sometimes
upload expensive textures. draw show/hide buttons on top of modal menus,
even when they sometimes overlap.
2019-10-29 13:47:04 -07:00
Dustin Carlino
573fc4dc35 redo zooming towards mouse. support zooming really far out, useful for
huge_seattle
2019-10-29 11:50:29 -07:00
Dustin Carlino
0d948cef91 share camera state between game and map_editor 2019-10-26 16:16:32 -07:00
Dustin Carlino
7d7bfef5ea filter out parking garages with 0 spots. render water on top of parks,
to workaround issue of the green lake park polygon covering everything
up
2019-10-26 11:37:10 -07:00
Dustin Carlino
cb4720946c experiment with texturing cars, with some fun UV coordinates. looks half
reasonable when it works. breaks on duplicate points, not sure what's
wrong yet
2019-10-24 14:07:03 -07:00
Dustin Carlino
17e02ebdf0 adding in support for rotating textures, except missing y-inversion 2019-10-23 16:30:23 -07:00
Dustin Carlino
d133dfd152 experimentally use textures for pedestrians. add support for stretching
texture coordinates
2019-10-23 15:46:00 -07:00
Dustin Carlino
63127960c9 skip info phase of menus if there is no info 2019-10-21 15:28:31 -07:00
Dustin Carlino
56a277a284 show live parking counts in that analytics legend 2019-10-18 12:35:49 -07:00
Dustin Carlino
c70a57e7ae click to cancel info panel 2019-10-17 11:29:02 -07:00
Dustin Carlino
b479c8afed hotkeys and tooltips for buttons 2019-10-16 15:42:58 -07:00
Dustin Carlino
83d10c714b toggle between 3 states for hiding modal menus 2019-10-16 15:21:13 -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
a1cc53d68a redo mouseover when zooming, so that we never have current_selection when unzoomed. 2019-10-14 15:15:56 -07:00
Dustin Carlino
430b1245c4 working on a new traffic signal scroller. disabled. decent start. 2019-10-13 18:44:19 -07:00
Dustin Carlino
f82000cff4 just select entire road in map_editor. individual lanes were only for labeling one side of the road, which is only a theoretical feature for test maps. also dont allow swapping lanes uselessly. 2019-10-13 16:42:03 -07:00
Dustin Carlino
f772f12a7d combining info/controls for map_editor sidebar 2019-10-13 16:14:47 -07:00
Dustin Carlino
5358931a5e fixing up a few lingering places in the game that were constructing text prompts 2019-10-13 15:43:11 -07:00
Dustin Carlino
5304aa6ecf trying out permanent sidebar in map_editor. no more tooltips 2019-10-13 15:31:17 -07:00
Dustin Carlino
df4d37f996 migrate some map_editor stuff to a proper modal menu. display constant
OSD for info and for controls.
2019-10-12 19:02:58 -07:00
Dustin Carlino
d82263978b simpler context menu impl. finally delete the old one 2019-10-12 14:53:27 -07:00
Dustin Carlino
a077276275 rewriting the wizard menu from scratch too. also making sure to update
master GUI state (where's the cursor?) up-front. that's independent from
letting the canvas pan, a client decision
2019-10-12 10:24:07 -07:00
Dustin Carlino
f548ded8cc most modalmenus will maintain layout themselves. also stop doing
layouting in constructors; the first event will work fine.
2019-10-11 20:45:27 -07:00
Dustin Carlino
f1cae9bd37 dont show info when modalmenu hidden, just title. simplify setting info
from outside.
2019-10-11 20:10:12 -07:00
Dustin Carlino
0ea138aa02 adding show/hide functionality back to modalmenu, but WAY more cleanly 2019-10-11 15:00:08 -07:00
Dustin Carlino
05b953d639 split sim summary onto two nice lines 2019-10-11 13:25:41 -07:00
Dustin Carlino
81addd9c8c making menu label swaps more ergonomic 2019-10-11 13:15:14 -07:00
Dustin Carlino
f71d229594 ability to change menu labels. use for speed controls and debug mode. 2019-10-11 13:09:32 -07:00
Dustin Carlino
88be94e789 simple stacked layouting for text box, slider, and modal menu (rewritten
from scratch). not fully done, but perfectly usable and clean!
2019-10-11 12:37:48 -07:00
Dustin Carlino
21aa42891d parameterizing slider dims, making them match menus 2019-10-09 15:03:23 -07:00
Dustin Carlino
da0b880484 place mouse tooltips away from screen edge, just like context menus 2019-10-09 11:21:04 -07:00
Dustin Carlino
ec7d0b463d force modal menus beneath sliders to have top-left corner at a point; stop doing the jump left/right behavior based on running off the screen. need a proper vertical stacking layout thing for that. 2019-10-09 10:44:11 -07:00
Dustin Carlino
e0ae1d5195 tooltip with key bindings for hide/expand icons. doesn't look great
though.
2019-10-09 10:29:11 -07:00
Dustin Carlino
7c3a26fed8 making ItemSlider and all trip viz also combine menu and slider better 2019-10-07 14:54:42 -07:00
Dustin Carlino
3459d9c8fd change default font size by flag 2019-10-07 10:39:09 -07:00
Dustin Carlino
e7507bad85 plumbing initial settings to ezgui better 2019-10-07 09:45:53 -07:00
Dustin Carlino
1df7c580f3 hack in a way for ModalMenu to work alongside a slider. use in
SpeedControls.
2019-10-05 17:01:33 -07:00
Dustin Carlino
47ccf2c70b making normal ModalMenu be able to add/remove items. killing off DynamicMenu. 2019-10-05 14:59:59 -07:00
Dustin Carlino
bbbfc4a064 fold trip stats into new exclusive analytics thing, so it also auto-updates 2019-10-05 13:56:43 -07:00
Dustin Carlino
5f9cf2accd display basic labels on trip stats 2019-10-01 19:28:03 -07:00
Dustin Carlino
b11f33f7f6 trying out a different type of menu for agent controls. explicitly
add/remove actions, and grow/shrink the menu based on temporarily
activated things
2019-09-24 13:02:23 -07:00
Dustin Carlino
ae31d2d983 disable cpuprofiler dep in ezgui by default, since it requires manually installing some other stuff 2019-09-23 13:37:47 -07:00
Dustin Carlino
f18fc72265 finish structopt removal 2019-09-18 17:29:34 -07:00
Dustin Carlino
4a12cdd36a easy way to select and delete big chunk of stuff in synthetic 2019-09-16 10:16:56 -07:00
Dustin Carlino
1248dac270 nicer API for appending bits of text 2019-09-13 15:23:25 -07:00
Dustin Carlino
180fdd1412 builder API for World. restoring synthetic labels 2019-09-12 11:11:31 -07:00
Dustin Carlino
672899c20f better synthetic drawing: lanes offset properly (still buggy...), draw center line 2019-09-12 10:25:34 -07:00
Dustin Carlino
353d89cd25 more synthetic fixes: redo mouseover when model changes, avoid panic
with 0-len new road line, fix reused IDs, fix contains_pt for
some precomputed polygons
2019-09-12 09:54:12 -07:00
Dustin Carlino
92a4f304f7 restoring functionality to synthetic: changing stuff updates the world 2019-09-11 17:08:11 -07:00
Dustin Carlino
cb7121162b folding viewer into ezgui crate 2019-09-11 15:27:12 -07:00
Dustin Carlino
43de343372 stop serializing synthetic's model format, just save raw_data maps 2019-09-11 13:52:49 -07:00
Dustin Carlino
97361317ed greying out choices in scoreboard that have no trips 2019-09-11 12:51:07 -07:00
Dustin Carlino
c8e3e9ce4b rearrange colorscheme changing, so it doesnt happen in irrelevant modes 2019-09-11 12:43:06 -07:00
Dustin Carlino
612b02d526 migrating all callers off old methods. decided to keep choose_string 2019-09-11 12:32:17 -07:00
Dustin Carlino
aa3fed3395 builder-based API for wizard choosing stuff. need to convert other
callers now.
2019-09-11 11:52:34 -07:00
Dustin Carlino
224461fcdc plumb hatching bit in the style vertex attrib, not this awkward stateful uniform value 2019-09-11 11:06:57 -07:00
Dustin Carlino
7eae18b71a tiling all the textures seamlessly, instead of stretching 2019-09-11 10:46:03 -07:00
Dustin Carlino
ac131ebedf moving some things around ezgui; i can never remember where to find some structs 2019-09-11 09:03:59 -07:00
Dustin Carlino
9ed38c849c be able to flag off using textures, and sub a fallback color. also move texture loading into the loading screen. and fix the release script 2019-09-10 17:04:33 -07:00
Dustin Carlino
9867619c9c generalize ezgui Color to also cleanly represent textured things 2019-09-10 16:41:35 -07:00
Dustin Carlino
5ef4ed16b8 packing texture info into the color Vertex channel 2019-09-10 16:08:01 -07:00
Dustin Carlino
9a624397e0 supporting up to 10 textures 2019-09-10 15:44:07 -07:00
Dustin Carlino
fdd770088d very hacky, minimal impl of texturing water 2019-09-10 15:21:58 -07:00
Dustin Carlino
5637a1cf34 remove support for glsl 110; i think it was just wine having problems with 140. can restore later easily, is annoying to maintain in the meantime 2019-09-10 14:13:23 -07:00
Dustin Carlino
e6bf997bee simplify glium uniforms storage 2019-09-10 14:08:05 -07:00
Dustin Carlino
105f526e9e contextual_action takes &str or String 2019-09-07 13:56:00 -07:00
Dustin Carlino
08b18b682d overhaul Text API to builder pattern 2019-09-06 13:58:04 -07:00
Dustin Carlino
60a48be5bc make it a little easier to snag default text size's line height 2019-09-06 12:44:37 -07:00
Dustin Carlino
ea9d01bcc1 set a modal menu's prompt just once in a few places, where that's more
convenient
2019-08-27 14:56:43 -07:00
Dustin Carlino
7fffb8d6e5 use modalmenu, not logscroller, for scenario and a/b test info. remove
logscroller from public ezgui api
2019-08-24 14:53:26 -07:00
Dustin Carlino
f8aaf4d7bf using dyn explicitly, per rust 1.37 deprecation warning 2019-08-22 15:05:17 -07:00
Dustin Carlino
9f897ef094 removing ezgui inline color parsing. pretty much unused, isn't helping
compile time. also fixing clippy issues
2019-08-22 13:38:16 -07:00
Dustin Carlino
a5b73c060a make savestate_every a flag again 2019-08-16 13:34:38 -07:00
Dustin Carlino
4e83f492d8 upgrade rand, get rid of now unneeded serde1 feature, in hopes of fixing feature mismatch between deps 2019-08-15 12:14:35 -07:00
Dustin Carlino
56ea90c787 draw map-space text with proper z-ordering 2019-08-15 10:30:17 -07:00
Dustin Carlino
caddf69dcc cache unzoomed agent geometry when possible 2019-08-14 14:44:43 -07:00
Dustin Carlino
e145ae2e5d label buildings with street numbers. disable because it's noisy, but
great start!
2019-08-13 11:45:11 -07:00
Dustin Carlino
c50830c4c0 add an extra scaling factor to map-space text, so we can draw in a reasonable font size, then squish down without losing quality 2019-08-13 11:24:04 -07:00
Dustin Carlino
5dc92e6eb8 strong steps towards real map-space text. not quite working yet, but
this shouldn't break anything in the meantime.
2019-08-12 15:38:57 -07:00
Dustin Carlino
e5486e587b renaming wizard things 2019-08-07 15:48:46 -07:00
Dustin Carlino
8c7116af97 heavily revamping wizard callers... wow, what a huge difference! 2019-08-07 15:27:25 -07:00
Dustin Carlino
3b1671fdcb proof-of-concept that wizard closures can have reasonable lifetimes! 2019-08-07 14:53:20 -07:00
Dustin Carlino
adde2669c1 convert some old-school plugins to Wizard (in fact WizardState), and start to hide some stuff inside ezgui crate a bit more 2019-08-07 13:49:27 -07:00
Dustin Carlino
950fb65bea visually expose time since last completed turn 2019-08-07 10:37:25 -07:00
Dustin Carlino
b1c92fa867 dont allow zooming when mouse is on a covered GUI area 2019-08-06 12:05:09 -07:00
Dustin Carlino
77c01580f1 refactoring path references... 2019-08-04 17:11:33 -07:00
Dustin Carlino
f8cee896bf fixed text box size for loading screens 2019-08-02 16:53:48 +02:00
Dustin Carlino
1412a888d6 move Scroller to ezgui lib 2019-08-02 16:49:31 +02:00
Dustin Carlino
721037e2fb actual scrolling logic! 2019-07-31 16:08:53 +02:00
Dustin Carlino
5b65cb139a switching to a generic scroller widget thing, which doesnt actually
scroll yet ;)
2019-07-28 17:06:00 +02:00
Dustin Carlino
c3c467343a add dummy buttons to scroll traffic signal diagram 2019-07-28 15:35:56 +02:00
Dustin Carlino
6192a1357d at last, add controls to hover on and select a cycle 2019-07-28 12:26:53 +02:00
Dustin Carlino
557db1d3fe wrapping up something to interact with a diagram, using in signal editor
and standalone diagram explorer
2019-07-28 12:12:46 +02:00
Dustin Carlino
16926d57a1 upgrade glium, glutin, etc. fix the HIDPI issues properly! 2019-07-26 17:25:19 +02:00
Dustin Carlino
84ac102d05 fix major perf regression from modal menus getting sections. need to
call draw_queued for text once per frame, otherwise cache gets ruined
2019-07-26 16:26:41 +02:00
Dustin Carlino
3c2d794c62 sliders coupled with text boxes in wizards for picking times 2019-07-21 11:26:11 +02:00
Dustin Carlino
de929a5fb9 user-defined shortcuts 2019-07-14 11:22:37 +01:00
Dustin Carlino
d08c794cfe woops, didnt use GeomBatch for all the new ModalMenu stuff 2019-06-26 15:20:25 -07:00
Dustin Carlino
5e97c9f548 add a minimize/expand icon to modal menus 2019-06-26 12:14:43 -07:00
Dustin Carlino
8d1581241f render separators between groups of menu items. very messy
implementation, but many other ideas fell through, and this works.
2019-06-25 10:58:40 -07:00
Dustin Carlino
f7b5cf9a9f organize all modal menus into groups. dont render them yet. 2019-06-24 15:43:22 -07:00
Dustin Carlino
3958ec556e state transitions for nicely handling a few things... in particular,
clearing splash screen wizard state so we dont get stuck on a choice ;)
2019-06-22 20:05:12 -07:00
Dustin Carlino
6738de2488 draw text beneath Sliders, not in the ModalMenu 2019-06-20 14:48:32 -07:00
Dustin Carlino
cdacaef1a6 refactor menu text for all ItemSliders 2019-06-17 17:22:20 -07:00
Dustin Carlino
efb6954a97 refactor the combination of ItemSlider and Warper 2019-06-14 14:17:08 -07:00
Dustin Carlino
8c055312b4 refactor Warper to an ezgui widget, to use it in fix_map_geom 2019-06-14 12:45:46 -07:00
Dustin Carlino
1f34e591e0 debug_initialmap: use loading screens, stop depicting half-roads, draw
OSM tags non-invasively on the side, rename it, highlight degenerate
intersections
2019-06-13 13:20:24 -07:00
Dustin Carlino
0adeac1d53 remove the single point associated with intersections, now that we're
actually going to be mucking with geometry. it wasnt doing anything
useful anyway. also a round of clippy.
2019-06-12 10:10:04 -07:00
Dustin Carlino
47654b61cf make wizard acknowledge a bit easier to use. name psrc scenarios by time
range and fix some filename parsing
2019-06-10 13:29:23 -07:00
Dustin Carlino
53d87afa6e move hex parsing 2019-06-08 13:15:31 -07:00
Dustin Carlino
6221fd858b make edit mode's cross hatches less intrusive 2019-06-06 13:29:45 -07:00
Dustin Carlino
36cddbf5df recalculate current selection in all the places that used to before a big UI refactor. if not, hovering on agent + jumping savestates can crash badly. also refactor how mouseover is detected 2019-06-06 12:51:49 -07:00
Dustin Carlino
34e637773d simplify wizard.wrap API slightly 2019-06-05 13:13:33 -07:00
Dustin Carlino
b2ad0b5ae7 converting PSRC trips to a repeatable scenario. along the way,
parallelizing and refactoring a bit of psrc stuff
2019-06-05 12:58:06 -07:00
Dustin Carlino
0c6a93d38f introducing a basic slider to adjust speed of all route viz player and
sim. code duplication.
2019-06-04 14:22:11 -07:00
Dustin Carlino
0c4399e683 use mem::replace, not clone, for swapping TimeTravel states 2019-05-30 15:34:33 -07:00
Dustin Carlino
53addc79b9 use ItemSlider for time travel 2019-05-30 15:20:43 -07:00
Dustin Carlino
602a936440 using nom to create Text with inline colors. just using in a few places;
still buggy and kind of inconvenient actually.
2019-05-30 14:14:38 -07:00
Dustin Carlino
9faa2bf143 using MultiKey a bit more consistently 2019-05-29 14:13:46 -07:00
Dustin Carlino
53e2c3e905 hack in a way to easily check for ctrl+key. use to jump between
sandbox, debug, and edit modes
2019-05-29 14:08:59 -07:00
Dustin Carlino
35b3e4b7be round of clippy / unbreaking the build 2019-05-29 13:01:33 -07:00
Dustin Carlino
17b31582cb delete ModalMenu::hacky_new 2019-05-29 11:34:53 -07:00
Dustin Carlino
cce1b6ff88 making an ItemSlider to handle the common case of scrolling through items 2019-05-29 11:31:01 -07:00
Dustin Carlino
110140f391 union make_arrow polygon 2019-05-28 18:05:10 -07:00
Dustin Carlino
f2f16ad992 make slider just operate on percentages. use for scrolling time in all trip viz 2019-05-28 14:56:09 -07:00
Dustin Carlino
28b2734d59 starting a slider widget, using in easy places where the range is usize 2019-05-28 12:13:22 -07:00
Dustin Carlino
1cdbe0ea81 refactor parallelized pathfinding and use it in trip viz too 2019-05-24 12:50:01 -07:00
Dustin Carlino
788cd237a8 upload traffic signal Drawable once per state change 2019-05-23 11:31:28 -07:00
Dustin Carlino
d2dc7e52eb draw the traffic signal diagram on the left. stop caring where the
bottom left of a modalmenu is
2019-05-21 14:13:48 -07:00
Dustin Carlino
3a625f9a32 print percentages and number of samples in bar chart 2019-05-20 14:57:17 -07:00
Dustin Carlino
09493f9b7b remove old color shifting 2019-05-20 11:58:35 -07:00
Dustin Carlino
381883b357 display the stats with simple bar charts 2019-05-20 11:56:00 -07:00
Dustin Carlino
de51b1c154 simplify some render/ code by using GeomBatch 2019-05-17 13:14:58 -07:00
Dustin Carlino
222ddf6a96 use Distance, not f64, for some params in geom/ layer, simplifying other code 2019-05-17 12:42:36 -07:00
Dustin Carlino
db04553626 batch traffic signal drawing 2019-05-16 17:55:26 -07:00
Dustin Carlino
d5aebd4d4a prevent double-use of Escape key between context and modal menus 2019-05-15 11:02:02 -07:00
Dustin Carlino
5b6e541f9c fix mac scrolling and the directory name in the release script 2019-05-15 10:06:42 -07:00
Dustin Carlino
639ce25d09 hatching shader's stripes are now in map-space, are crosses, and have
color/size tuned
2019-05-12 18:35:12 -07:00
Dustin Carlino
f4620c1951 add basic hatching support to fragment shader. use it to visualize map
edits when zoomed in
2019-05-12 17:59:12 -07:00
Dustin Carlino
240efa5ad7 make warping be slightly snappier with impatient keypressing and a
minimum speed
2019-05-08 12:07:32 -07:00
Dustin Carlino
939f2fefdd adding hands to the bikes 2019-05-06 18:33:01 -07:00
Dustin Carlino
b0ca4429ad make turn blinkers work even when sim is paused 2019-05-06 12:56:19 -07:00