Commit Graph

150 Commits

Author SHA1 Message Date
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
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
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
b0ca4429ad make turn blinkers work even when sim is paused 2019-05-06 12:56:19 -07:00
Dustin Carlino
272503873c avoid menu flickering and incorrect entries by sending a NoOp after used events 2019-05-05 18:23:36 -07:00
Dustin Carlino
73f32854be fix up other ezgui apps, run clippy 2019-05-04 17:25:05 -07:00
Dustin Carlino
a921469da9 dont special-case having a loading screen during make_gui. pass in EventCtx to make_gui to undo some hacks 2019-05-04 17:19:45 -07:00
Dustin Carlino
798a7b5354 be able to trigger a loading screen anywhere 2019-05-04 17:07:07 -07:00
Dustin Carlino
eed33931de proof-of-concept for gluing Timer to loading screen. hacky and not
featurefull yet.
2019-05-04 16:41:01 -07:00
Dustin Carlino
951e2f37ce flush text to display immediately, not at the end. prerequisite to drawing scaled text better 2019-05-04 15:36:40 -07:00
Dustin Carlino
3db78d1ddd hacky way of showing context menu hotkeys in OSD 2019-05-03 14:21:43 -07:00
Dustin Carlino
3b6ecbf4af draw everything from ezgui in screencap mode 2019-05-01 16:14:15 -07:00
Dustin Carlino
913ec8d4c7 remove top menu from ezgui. unused right now, can restore it later if needed 2019-05-01 16:06:40 -07:00
Dustin Carlino
e767a704d3 remove old modal menu stuff from ezgui 2019-05-01 16:02:50 -07:00
Dustin Carlino
2384157108 simplify ezgui API -- event takes &mut EventCtx 2019-04-23 21:28:03 -07:00
Dustin Carlino
6c247d376c clean up ezgui draw() API by putting screencap and naming_hint inside GfxCtx 2019-04-23 15:42:15 -07:00
Dustin Carlino
008b2f9de5 preps for variable font size 2019-04-22 20:02:18 -07:00
Dustin Carlino
4eece7bae7 borrow text to draw, stop cloning everywhere 2019-04-22 13:29:24 -07:00
Dustin Carlino
8ff293bdc4 dont plumb last_data through ezgui layer. apps can just... store that themselves. removes unnecessary plumbing. 2019-04-21 13:20:40 -07:00
Dustin Carlino
0b4694dcba start splash screen wrapping everything. doesn't do anything yet 2019-04-21 13:05:03 -07:00
Dustin Carlino
4b1107bf57 clean up ezgui runner API 2019-04-20 15:10:03 -07:00
Dustin Carlino
46d24a7c58 compile on mac 2019-04-19 09:23:36 -07:00
Dustin Carlino
9a2699aab9 take a single screenshot (hiding menus and stuff) 2019-04-15 10:07:50 -07:00
Dustin Carlino
0cf9e1a1cd draw a simple loading screen 2019-04-03 08:24:06 +09:00
Dustin Carlino
7100900714 load different glsl versions 2019-03-18 14:58:41 -07:00
Dustin Carlino
8bf8b958d7 supporting glsl 110 as well as 140 2019-03-18 12:26:40 -07:00
Dustin Carlino
3eb5270d51 trying to cross-compile to windows. making some unix-only dependencies
optional.
2019-03-11 17:09:47 -07:00
Dustin Carlino
cab95e91e2 dont redraw on ignored Update events either 2019-03-11 13:15:16 -07:00
Dustin Carlino
0c26e3e127 dont redraw if key release event was unused 2019-03-11 13:08:57 -07:00
Dustin Carlino
5830908604 version control checksums of screencaps for all maps... well,
still not small_seattle. :P
2019-02-17 14:27:48 -08:00
Dustin Carlino
06c8ed72a9 flag-based profiling of GUI 2019-02-14 13:16:43 -08:00
Dustin Carlino
72e823c2c6 only have one Prerender object constructed, simplifying the plumbing of the Cell counters 2019-02-11 12:14:43 -08:00
Dustin Carlino
1d3e4284a7 do some tracking of video memory used by RenderMap 2019-02-11 12:02:29 -08:00
Dustin Carlino
579097dbb1 fiddling with the event loop. simplified code, but didn't fix issues. 2019-02-06 12:58:26 -08:00
Dustin Carlino
72b39b0401 aha, a slight optimization to not call draw() when events happen that aren't even sent to the application 2019-02-05 15:10:15 -08:00
Dustin Carlino
40d3c6b0ca count all Prerender uploads, not just the ones that happen in draw() 2019-02-05 15:02:10 -08:00
Dustin Carlino
e4b95c936b organizing ezgui into subdirectories 2019-02-01 09:55:25 -08:00
Dustin Carlino
06b8c26716 split ezgui runner into setup and loop functions 2019-02-01 09:30:01 -08:00
Dustin Carlino
bd7d18592b simplify screenshot internals 2019-02-01 09:23:16 -08:00
Dustin Carlino
8c80755bbd moving screenshot code into a module 2019-02-01 09:09:27 -08:00
Dustin Carlino
64573ea0ea own canvas inside of ezgui, not in applications. lots of refactoring
unlocked now...
2019-01-31 22:33:36 -08:00
Dustin Carlino
067ee108c7 make screencap work (and more simply) with custom event loop 2019-01-26 10:04:20 -08:00
Dustin Carlino
623e578665 inverting the ezgui/GUI control to plumb Prerender 2019-01-25 10:19:58 -08:00
Dustin Carlino
237a19b6ec appease the clippy 2019-01-24 16:17:22 -08:00
Dustin Carlino
d2f0cd91ee send Update events, fixing animation 2019-01-24 12:07:46 -08:00
Dustin Carlino
2cbb28a1a4 fixing srgb issue... geez 2019-01-23 23:13:30 -08:00
Dustin Carlino
f1b81456a6 calculating line height from the font 2019-01-23 14:02:43 -08:00
Dustin Carlino
d9d89e93dd using glium_glyph... things initially kind of work 2019-01-23 12:10:17 -08:00
Dustin Carlino
03215a5836 disable unneeded depth testing. enable antialiasing and alpha blending 2019-01-22 23:10:14 -08:00
Dustin Carlino
099846437c dont redraw unnecessarily 2019-01-22 22:30:36 -08:00
Dustin Carlino
af7596f9a5 remove piston stuff, cut over to glutin in some basic way. nothing
displays now. :D
2019-01-22 16:51:02 -08:00
Dustin Carlino
974b04e74d start to move ezgui to glium. just copying extra code in, not deleting
existing stuff yet
2019-01-22 16:11:49 -08:00
Dustin Carlino
3422877d3d adding a stable ID for raw roads and intersections. way easier to refer to things in the midst of deletions. 2019-01-17 11:10:05 -08:00
Dustin Carlino
ac9b9fa302 dont asap combine tiles 2019-01-15 17:21:20 -08:00
Dustin Carlino
3cc1ccfd26 annotate screencaps with an intersection in the shot 2019-01-15 11:00:13 -08:00
Dustin Carlino
6d4e958ea5 retain directory of screencap tiles, for faster diffing 2019-01-14 13:02:03 -08:00
Dustin Carlino
3f88eb2142 reorganizing ezgui runner to have proper state struct... 2019-01-14 12:54:25 -08:00
Dustin Carlino
bae23f79da even better progress, and make it easier to deal with failed montage 2019-01-14 12:01:56 -08:00
Dustin Carlino
299f05e0a2 force showing full detail when screencapping at low zoom 2019-01-14 11:24:07 -08:00
Dustin Carlino
dbfc1ec0d2 combine the tiled images 2019-01-14 11:13:48 -08:00
Dustin Carlino
2f35ca5dc1 much faster screencapturing with scrot instead 2019-01-14 10:14:14 -08:00
Dustin Carlino
164cd7d757 print screengrab progress better 2019-01-14 10:11:11 -08:00
Dustin Carlino
e47ddfb1c4 call gnome-screenshot directly, removing the border 2019-01-14 09:52:46 -08:00
Dustin Carlino
afa159abb4 ezgui-driven magic for screencapping EVERYTHING 2019-01-14 08:46:40 -08:00
Dustin Carlino
a94fddb209 try screenshot capture again. it's very slow and broken. 2019-01-13 15:40:58 -08:00
Dustin Carlino
976f210b9a stack modal states... also fix the show score plugin drawing a bit 2018-12-25 10:27:38 -08:00
Dustin Carlino
972a0d2fa2 hide debug top menu when appropriate 2018-12-24 19:32:56 -08:00
Dustin Carlino
2d7034e9cb canvas wont serve up map-space cursor when it's out of the window 2018-12-22 17:12:30 -08:00
Dustin Carlino
2510625efc removing piston window size type from canvas, meaning piston deps are now very narrowly isolated to part of ezgui 2018-12-21 10:00:45 -08:00
Dustin Carlino
ad497ac698 make menus handle window resizing 2018-12-19 11:48:35 -08:00
Dustin Carlino
b7f31cc8f4 make canvas know initial screen size, so centering on map pt initially does work 2018-12-18 15:37:44 -08:00
Dustin Carlino
e6595c0d14 destroy modal menu when done 2018-12-17 16:08:32 -08:00
Dustin Carlino
32db434862 trying out modal flow in UserInput... at least initially displaying the
sidebar
2018-12-17 13:58:06 -08:00
Dustin Carlino
bbacdfb676 declaring modal menus 2018-12-17 13:08:46 -08:00
Dustin Carlino
661c9715b3 handle idle event; happens when running sim 2018-12-17 11:36:14 -08:00
Dustin Carlino
b3dea902de handle window close event 2018-12-17 11:33:57 -08:00
Dustin Carlino
21c61e4a60 avoid typos in action_chosen 2018-12-17 10:23:14 -08:00
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
b571f410ef spawn submenus... but not in the right place. no input wiring yet. 2018-12-16 19:57:39 -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
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
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
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
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
003881fe93 prototyping right-click context menus. solid start, lots of work needed. 2018-12-15 10:39:50 -08:00
Dustin Carlino
d61255a4b3 lift panic handling from UI's event to ezgui runner, use also for draw 2018-12-12 14:11:18 -08:00
Dustin Carlino
f64f411093 upgrade all crates to 2018 in Cargo.toml. this requires switching to
crate:: paths everywhere. not yet fiddling with 'extern crate's
2018-12-06 10:57:31 -08:00
Dustin Carlino
6a0cd7f71e rust 2018: run the new fmt, delete the unneeded script 2018-12-06 10:05:50 -08:00
Dustin Carlino
43fa67177d plumbing generic things in ezgui runner 2018-12-04 10:20:08 -08:00
Dustin Carlino
f1d82a4c97 make the warp plugin animate the panning 2018-11-12 11:02:51 -08:00
Dustin Carlino
7b3069a1a1 clean up ezgui draw() API and hide window size inside ezgui entirely 2018-10-06 11:52:08 -07:00
Dustin Carlino
7ee75ea6be renaming osd -> just text 2018-10-01 13:56:43 -07:00
Dustin Carlino
b365f595bd populate OSD during event. this lets wizard display prompts easily. 2018-09-20 14:57:42 -07:00
Dustin Carlino
64d4117c0c moving GUI runner to ezgui 2018-09-09 18:50:36 -07:00