Commit Graph

1218 Commits

Author SHA1 Message Date
Dustin Carlino
6f92a82efe glue TopMenu to UserInput... get ready to change lots of calls to it 2018-12-17 09:47:53 -08:00
Dustin Carlino
1f1f3b63e2 wiring up submenu events 2018-12-17 09:07:49 -08:00
Dustin Carlino
6595f804e0 spawn submenu in the proper place 2018-12-16 20:19:30 -08:00
Dustin Carlino
b571f410ef spawn submenus... but not in the right place. no input wiring yet. 2018-12-16 19:57:39 -08:00
Dustin Carlino
7c5ba61e89 touchscreen support. (not) 2018-12-16 19:49:00 -08:00
Dustin Carlino
8aa12fb6d9 highlight selected item in top menu 2018-12-16 19:41:11 -08:00
Dustin Carlino
a4a312d488 draw the top menu bar 2018-12-16 19:22:48 -08:00
Dustin Carlino
efc0db122a specify top menu in UI, but it doesn't do anything yet 2018-12-16 18:23:17 -08:00
Dustin Carlino
0b069a7083 display optional prompt in the menu 2018-12-16 16:58:04 -08:00
Dustin Carlino
435f3f35c9 start wizard menus with first item selected, like the good ol days 2018-12-16 16:51:15 -08:00
Dustin Carlino
24fbc18324 rewrite a fxn from wizard with NLL 2018-12-16 16:45:52 -08:00
Dustin Carlino
2a5384cf11 making wizard use the new Menu 2018-12-16 16:29:25 -08:00
Dustin Carlino
3a47cb04e9 expressing context menu as an FSM instead 2018-12-16 16:12:51 -08:00
Dustin Carlino
6993294f24 make ContextMenu use Menu now 2018-12-16 15:49:12 -08:00
Dustin Carlino
2b245f9277 write a proper Menu constructor, now that we can calculate geometry up-front 2018-12-16 15:23:49 -08:00
Dustin Carlino
62bdd92ac3 move ownership of GlyphCache into Canvas, so calculating text dimensions can be done during event. Stick the glyphs behind a RefCell to avoid mutability creeping into canvas everywhere 2018-12-16 15:16:02 -08:00
Dustin Carlino
671dad6b02 make a blend between ScrollingMenu and ContextMenu... don't use it yet 2018-12-16 14:47:48 -08:00
Dustin Carlino
11945739bd rename old ezgui menu to scrolling menu, which color picker will keep using for now 2018-12-16 14:18:43 -08:00
Dustin Carlino
4629015e12 delete unused TreeMenu and stop passing in the category for unimportant actions 2018-12-16 14:13:28 -08:00
Dustin Carlino
9adcb0315e making my own event, mapping piston's event to it. will simplify downstream code and make moving away from piston even easier. 2018-12-15 20:44:28 -08:00
Dustin Carlino
d9721caa8a left clicking to confirm or cancel a menu 2018-12-15 16:48:47 -08:00
Dustin Carlino
51d1cbba6e highlighting if a menu item is selected 2018-12-15 16:36:45 -08:00
Dustin Carlino
cf74050758 dont call event() for a render event 2018-12-15 12:24:06 -08:00
Dustin Carlino
b633d698d2 make sure nothing else happens while a context menu is present 2018-12-15 11:07:51 -08:00
Dustin Carlino
003881fe93 prototyping right-click context menus. solid start, lots of work needed. 2018-12-15 10:39:50 -08:00
Dustin Carlino
7b6d20bb08 tweak instructions and at least say what current turn priority is in OSD 2018-12-14 12:38:38 -08:00
Dustin Carlino
8a8d017063 hide all agents when editing intersections, so turn icons are always
visible
2018-12-14 12:21:12 -08:00
Dustin Carlino
3f2a7d6e68 display when a traffic signal is in overtime 2018-12-14 12:01:00 -08:00
Dustin Carlino
a8ee229793 fix traffic signal bugs letting TurnPriority::Banned cars in on a cycle 2018-12-14 11:40:18 -08:00
Dustin Carlino
28d025103c show accepted agents when hovering over an intersection 2018-12-14 11:29:14 -08:00
Dustin Carlino
2a8842aa00 brief round of clippy 2018-12-14 11:13:05 -08:00
Dustin Carlino
c55faec3fe more color in tooltips 2018-12-14 11:11:34 -08:00
Dustin Carlino
2b16b9571e making it easier to create one-line Texts 2018-12-14 11:01:14 -08:00
Dustin Carlino
0f1c475ab7 simplify tutorial map, actually count cars spawning now 2018-12-14 10:55:21 -08:00
Dustin Carlino
84b136be14 finally letting tutorial mode listen to sim events 2018-12-14 10:38:14 -08:00
Dustin Carlino
a3a41ed186 move PerMapUI to state module 2018-12-13 15:26:02 -08:00
Dustin Carlino
b8ca1728e2 dont need PluginsPerUI; collapse it into DefaultUIState 2018-12-13 15:21:32 -08:00
Dustin Carlino
59c30ac03e make tutorial mode go through its two states again 2018-12-13 14:59:35 -08:00
Dustin Carlino
7c48ec02cc making tutorial UIState that just wraps and delegates, doesn't do
its own thing yet
2018-12-13 14:51:40 -08:00
Dustin Carlino
bb71418fd3 make UI generic over UIState 2018-12-13 14:30:18 -08:00
Dustin Carlino
28327b4905 another attempt to remove the list of plugins and use a struct directly. keeping active_plugin idx. 2018-12-13 14:24:04 -08:00
Dustin Carlino
79dc9aee40 pulling UI state behind a trait. result is a bit convoluted still. 2018-12-13 14:03:09 -08:00
Dustin Carlino
f9016c6871 move recalc_current_selection... it's this temporary bit of state 2018-12-13 11:22:25 -08:00
Dustin Carlino
8e715de098 simplify UI state a bit... dont plumb around extra KML shapes to display. if we load an A/B test or different map edits, no need to preserve the KML; its for one-off debugging. 2018-12-13 11:13:33 -08:00
Dustin Carlino
4b7a424b1f remove duplicate color definitions and don't allow them 2018-12-12 17:27:34 -08:00
Dustin Carlino
a5befc83fe run rustfmt in the build script 2018-12-12 17:22:15 -08:00
Dustin Carlino
87bbadecc1 change ColorScheme to use the generated code. remove the terrible mutability. 2018-12-12 17:18:47 -08:00
Dustin Carlino
90fffe2410 invoke from build.rs 2018-12-12 17:03:31 -08:00
Dustin Carlino
13134a091b generate a module 2018-12-12 16:55:01 -08:00
Dustin Carlino
010a636ae6 change the colorscheme method name to find more easily in parsing 2018-12-12 16:25:08 -08:00