Commit Graph

533 Commits

Author SHA1 Message Date
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