Commit Graph

701 Commits

Author SHA1 Message Date
Dustin Carlino
152568476c no more Text::prompt 2020-02-13 13:57:48 -08:00
Dustin Carlino
691dcdfbbc also revamp panels for other objects, except for the trip details part 2020-02-12 12:22:43 -08:00
Dustin Carlino
fc47d2b948 work on info panels a little more. lanes are looking pretty good now. 2020-02-12 11:16:05 -08:00
Dustin Carlino
67846ee2ca X buttons in popup menus werent clickable, fix by unconsuming the event 2020-02-11 16:25:44 -08:00
Dustin Carlino
606325ac77 make the glow and glium backends toggleable at build-time 2020-02-10 20:23:12 -08:00
Dustin Carlino
0b56ef6dea clipping support 2020-02-10 20:10:58 -08:00
Dustin Carlino
b2e9709c33 fixed the broken drawing, needed indices count, not vertices 2020-02-10 19:51:05 -08:00
Dustin Carlino
7267410ac0 aha, fixed size problem, gotta update viewport 2020-02-10 19:41:15 -08:00
Dustin Carlino
34fdf6a5e5 got stuff displaying! \o/ buggily 2020-02-10 19:28:23 -08:00
Dustin Carlino
dcca8e7147 WIP upload and draw buffers. doesn't work yet. I miss glium's nice
abstractions. :(
2020-02-10 17:44:59 -08:00
Dustin Carlino
5205a0c43e starting a stubbed out port to glow (glutin dependencies still). it
uploads the shaders, clears the window out so far!
2020-02-10 16:59:02 -08:00
Dustin Carlino
c5a055cbb6 rearrange ezgui internals to isolate all glium/glutin specifics into one
module
2020-02-10 16:18:31 -08:00
Dustin Carlino
82f149db56 X button on popup menus 2020-02-10 13:38:14 -08:00
Dustin Carlino
9c5ea334e0 avoid a crash with empty text (happening in building info panels, for example) [rebuild] 2020-02-10 10:10:05 -08:00
Dustin Carlino
6ff0c85a14 cutover to use winit's own event loop. thanks to goddessfreya for help
fixing the animation timing in
https://github.com/rust-windowing/winit/pull/1450#pullrequestreview-355698895
2020-02-10 10:01:49 -08:00
Dustin Carlino
935e42aee6 upgrade glium and glutin
- reference events exported from glutin as winit events, which will ease a transition to wasm (where winit is used with glow, not glium)
- also winit stopped requiring a dance to convert logical to physical sizes, so stop tracking dpi!
2020-02-09 10:56:51 -08:00
Dustin Carlino
62fb7bfd95 avoid unnecessary polygon transformations when adding SVGs to things.
rotate() requires center(), which is actually a bit expensive because of
some paranoia about dupe pts.
2020-02-08 17:08:08 -08:00
Dustin Carlino
4660dd077c rip out the old support for mapping UV coordinates onto a polygon 2020-02-08 16:48:01 -08:00
Dustin Carlino
e46cd7b677 cache SVGs 2020-02-08 16:27:45 -08:00
Dustin Carlino
4f79339b0f adjust plot axes and mouseover 2020-02-08 14:08:26 -08:00
Dustin Carlino
db65e1d41f slightly less inefficient draw_blocking_text 2020-02-08 13:52:29 -08:00
Dustin Carlino
0fc864ee51 limit text cache size. work on build scripts again [rebuild] 2020-02-08 13:25:48 -08:00
Dustin Carlino
a5e9505fd2 manually add padding to text, making it look reasonably usable. cutover!
[rebuild]
2020-02-08 13:08:31 -08:00
Dustin Carlino
5a1e54f40e override dims of text-based things. kinda fixes some problems, but... 2020-02-08 10:36:44 -08:00
Dustin Carlino
f262317b7e trying to sort out line height 2020-02-08 10:36:44 -08:00
Dustin Carlino
c51c37caba draw the OSD better [rebuild] 2020-02-08 10:36:44 -08:00
Dustin Carlino
4b95f34209 make loading screen draw its bg properly 2020-02-08 10:36:44 -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
6268b291b9 escape svg text 2020-02-08 10:36:44 -08:00
Dustin Carlino
da59362dfe fix z values, especially for tooltips. also refactor Button::new 2020-02-08 10:36:44 -08:00
Dustin Carlino
b7b607a6b6 eradicate DrawBoth 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
12826fe118 start dismantling DrawBoth, and make the JustDraw API nicer 2020-02-08 10:36:44 -08:00
Dustin Carlino
1371ed35ee dirt simple hack to cache rendered text. reasonable! 2020-02-08 10:36:44 -08:00
Dustin Carlino
1e7760062d rephrase render API to not include transformation, so we can cache Text 2020-02-08 10:36:44 -08:00
Dustin Carlino
3ff56f54cf prepping for a caching layer by changing render API, plumbing ctx...
getting close
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
d806d9509b draw traffic signal text label properly (and way more efficiently now) 2020-02-08 10:36:44 -08:00
Dustin Carlino
37bcfab7af whoa, tspan exists and is magical. simplify things... 2020-02-08 10:36:44 -08:00
Dustin Carlino
bd20d61500 use my own enum for font. remove glium-glyph dependency completely 2020-02-08 10:36:44 -08:00
Dustin Carlino
95c1f47047 clean up text_dims, then unplumb a BUNCH of stuff 2020-02-08 10:36:44 -08:00
Dustin Carlino
9355bcf5fd cutover mapspace text quickly (without doing the scaling down yet.
delete lots of stuff.
2020-02-08 10:36:44 -08:00
Dustin Carlino
234689533a woohoo, dismantle screenspace glyphs entirely 2020-02-08 10:36:44 -08:00
Dustin Carlino
7f0539bcac cutting over more internal callers to new thing 2020-02-08 10:36:44 -08:00
Dustin Carlino
ab1652aa77 cutover text_dims to the new thing. fixes lots of buttons. 2020-02-08 10:36:44 -08:00
Dustin Carlino
613fa73a32 offset negative dims. doesnt quite work but kinda leaving this in... 2020-02-08 10:36:44 -08:00
Dustin Carlino
a9ef443c17 handle empty lines 2020-02-08 10:36:44 -08:00
Dustin Carlino
ec08a9177e custom font families 2020-02-08 10:36:44 -08:00
Dustin Carlino
3eea1f2a45 changing DrawBoth internally to use the new thing. this actually gets
most callers!
2020-02-08 10:36:44 -08:00
Dustin Carlino
fa6cbea28c be able to handle generic Text 2020-02-08 10:36:44 -08:00