Commit Graph

150 Commits

Author SHA1 Message Date
Dustin Carlino
fa1273bd34 more dpi fixes:
- margin and padding
- Widget::draw_batch
- trip timeline
- custom buttons

and finally enable automatically setting DPI based on the monitor!!!
[rebuild]
2020-05-17 17:02:33 -07:00
Dustin Carlino
f3b396a7e9 set a window icon 2020-05-09 09:48:24 -07:00
Dustin Carlino
fec2bb51ca start organizing ezgui internal constants into a Style struct 2020-04-05 11:57:27 -07:00
Dustin Carlino
e0acc4973b actually, i don't need to support changing font or size mid-line yet. simplifies some info panel code. 2020-04-03 14:26:17 -07:00
Dustin Carlino
199b175319 change the mouse cursor based on context [rebuild] 2020-04-01 10:23:28 -07:00
Dustin Carlino
69dab9e27d typography overhaul... [rebuild] 2020-03-26 15:42:37 -07:00
Dustin Carlino
2712ea8c74 settle on using the common widget ID for everything (except rows/cols).
move some non-widget tools to a better module, and rename shaders
directory
2020-03-22 10:48:11 -07:00
Dustin Carlino
81c5ae3700 consolidate ezgui internals a little, and start a little bit of rustdoc 2020-03-20 18:05:50 -07:00
Dustin Carlino
c316d918d7 can only type in text boxes with focus 2020-03-09 13:23:03 -07:00
Dustin Carlino
f9b2c5de4f optionally use touchpad for different canvas movement controls 2020-03-07 16:13:30 -08:00
Dustin Carlino
a301343159 add a setting to scale up on-screen UI things [rebuild] 2020-03-02 12:02:25 -08:00
Dustin Carlino
2a747ef46b tooltips for UI elements only. don't need the OSD fullscreen now. 2020-02-20 11:24:50 -08:00
Dustin Carlino
254d07223e option to invert scroll direction 2020-02-18 07:30:32 -08:00
Dustin Carlino
b2c92ab8f9 upstreaming some changes for wasm here
- use instant crate
- bring in the wasm ezgui backend and necessary setup tweaks
- upgrade stdweb

but no map editor build magic yet
2020-02-14 14:28:25 -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
7267410ac0 aha, fixed size problem, gotta update viewport 2020-02-10 19:41:15 -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
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
db65e1d41f slightly less inefficient draw_blocking_text 2020-02-08 13:52:29 -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
3ff56f54cf prepping for a caching layer by changing render API, plumbing ctx...
getting close
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
acef70add0 draw after update events [rebuild] 2020-02-02 22:16:02 -08:00
Dustin Carlino
e733fe9d94 plumb real time passed through Update event, just base off of that 2020-01-28 09:39:44 -08:00
Dustin Carlino
6d016cd01b stop blindly plumbing through no-op events after any input is used. do
it more explicitly in just a few places.

fixes crash when cycling through turns while sim is running.

this makes modal menus appear laggy, but that's fine; phasing those out
anyway.
2020-01-23 17:11:29 -08:00
Dustin Carlino
3482d61c0d attempt to detect hidpi changes? [rebuild] 2020-01-13 19:13:00 -08:00
Dustin Carlino
bb141c7026 also clip text. not used quite yet. 2020-01-13 18:26:24 -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
e2de6b24d9 start windows maximized 2020-01-10 11:23:52 -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
e893e6b98c add a flag to override DPI, so we can tune on mac 2019-12-16 19:09:02 -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
6c6113d1bc ripping text data out of canvas 2019-11-28 22:41:08 -08:00
Dustin Carlino
301a35e4df fix hidpi issues on mac once and for all?? 2019-11-10 18:56:00 -08:00
Dustin Carlino
d82263978b simpler context menu impl. finally delete the old one 2019-10-12 14:53:27 -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
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
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
9a624397e0 supporting up to 10 textures 2019-09-10 15:44:07 -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
60a48be5bc make it a little easier to snag default text size's line height 2019-09-06 12:44:37 -07:00
Dustin Carlino
56ea90c787 draw map-space text with proper z-ordering 2019-08-15 10:30:17 -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