Commit graph

144 commits

Author SHA1 Message Date
Emil Ernerfeldt
a8d9c3fc42 Listen to scroll wheel (glium only) 2020-04-22 20:01:49 +02:00
Emil Ernerfeldt
9b404159c5 Expand clip_rects slightly to allow widgets just on the border 2020-04-22 19:41:42 +02:00
Emil Ernerfeldt
104f2191a0 Improve Widget code, and make sure it paints within the given bounds 2020-04-22 19:39:51 +02:00
Emil Ernerfeldt
700c93b8e3 Add Rect left/right/top/bottom accessors 2020-04-22 19:38:38 +02:00
Emil Ernerfeldt
2a4828670e Unify child region creation 2020-04-22 19:03:38 +02:00
Emil Ernerfeldt
c604574e52 Unify state management 2020-04-22 19:03:38 +02:00
Emil Ernerfeldt
d941c5830d Unify style for buttons and collapsing headers 2020-04-22 19:03:38 +02:00
Emil Ernerfeldt
d70ae351c1 Rename foldable to CollapsingHeader and move to own file 2020-04-22 19:03:33 +02:00
Emil Ernerfeldt
0b61d952e6 Drag scroll area background to scroll 2020-04-22 17:38:36 +02:00
Emil Ernerfeldt
dbf8520e63 Basic scroll area support
Just vertical scrolling at the moment
2020-04-21 20:52:17 +02:00
Emil Ernerfeldt
4efbb94e1b Various small improvements 2020-04-21 20:48:31 +02:00
Emil Ernerfeldt
a56a869f48 Window: store inner size + misc improvements 2020-04-21 20:46:30 +02:00
Emil Ernerfeldt
8b4e506493 Fix bug: accidental interaction on mouse-up 2020-04-21 20:43:47 +02:00
Emil Ernerfeldt
e9bdadb1da Some visual tweaks 2020-04-21 16:50:56 +02:00
Emil Ernerfeldt
9be5537418 Animate foldable regions 2020-04-21 14:47:17 +02:00
Emil Ernerfeldt
0ed578341b Add time as input to emigui to enable animations 2020-04-21 14:46:42 +02:00
Emil Ernerfeldt
609473f85a Add option to debug paint clip rects 2020-04-21 10:33:33 +02:00
Emil Ernerfeldt
ed67cc6e59 Nicer looking indent regions with a gray vertical line 2020-04-21 10:28:25 +02:00
Emil Ernerfeldt
b89ab7aa3f Add a bunch of TODOs 2020-04-21 10:27:53 +02:00
Emil Ernerfeldt
cac5352ad7 Remove dead code 2020-04-21 10:27:12 +02:00
Emil Ernerfeldt
864eae2081 Separate clip_rect and desired_rect in Region 2020-04-21 07:42:33 +02:00
Emil Ernerfeldt
94fdc2fd55 Expand and improve math code 2020-04-21 07:39:23 +02:00
Emil Ernerfeldt
46f123eeb6 WIP: Working clip rects for glium 2020-04-21 00:17:02 +02:00
Emil Ernerfeldt
2f02446f6f WIP: clip_rect 2020-04-20 23:48:55 +02:00
Emil Ernerfeldt
335b22d38d Create region.add_label shortcut 2020-04-20 23:45:05 +02:00
Emil Ernerfeldt
1f8cee7573 Fxi bug in column subregion code 2020-04-20 23:22:50 +02:00
Emil Ernerfeldt
3eeb4eca2c Resize windows based on cursor position rather than movement 2020-04-20 10:54:57 +02:00
Emil Ernerfeldt
98178e9d69 Show resize mouse cursor when resizing windows 2020-04-20 10:01:13 +02:00
Emil Ernerfeldt
472e0b9afe Refactor Region: remember region rectangle
This will be used as a clip rectangle for generated paint commands.
2020-04-20 00:48:54 +02:00
Emil Ernerfeldt
7f85b2623b Draw separator between window title and its contents 2020-04-19 23:51:38 +02:00
Emil Ernerfeldt
388132ba93 Implement window resizing 2020-04-19 23:44:24 +02:00
Emil Ernerfeldt
1be828bbe3 Remove roadmap and replace with emigui/README.md with a TODO section 2020-04-19 11:15:35 +02:00
Emil Ernerfeldt
6eae91e028 Distinguish ids that need to be unique and warn about name clashes 2020-04-19 11:13:24 +02:00
Emil Ernerfeldt
1afda00fc4 Make it easier to create an Outline 2020-04-19 11:11:41 +02:00
Emil Ernerfeldt
2170081221 Use new type Pos2 for positions (points) instead of Vec2 2020-04-19 01:05:49 +02:00
Emil Ernerfeldt
6eb1053c35 Start refactor mesher module into a more reusable Path concept 2020-04-19 00:27:25 +02:00
Emil Ernerfeldt
7480191f1a Refactor Font towards supporting all unicode 2020-04-18 17:14:38 +02:00
Emil Ernerfeldt
624e709a8f Make Id a proper newtype 2020-04-18 09:32:39 +02:00
Emil Ernerfeldt
407df94945 Switch to parking_lot::Mutex 2020-04-18 09:32:39 +02:00
Emil Ernerfeldt
481af55ce5 Handle window paint order (click to bring to front etc) 2020-04-17 23:22:28 +02:00
Emil Ernerfeldt
f709423809 Rename Data to Context and move to own file 2020-04-17 15:33:52 +02:00
Emil Ernerfeldt
de76cb6190 Move Memory and Region to own files 2020-04-17 15:29:48 +02:00
Emil Ernerfeldt
1d3836ba80 Add rudimentary support for gui windows that you can move around 2020-04-17 14:26:36 +02:00
Emil Ernerfeldt
b26359d383 Add checkbox for antialiasing on/off 2020-04-17 14:25:27 +02:00
Emil Ernerfeldt
49cbd3fe07 Fix: properly sample white color (was off by half a texel) 2020-04-16 23:10:05 +02:00
Emil Ernerfeldt
4a36b2c1c1 Fix name clash 2020-04-15 17:41:50 +02:00
Emil Ernerfeldt
0265b3d43a Refactor: define rect by min/max 2020-04-15 17:41:35 +02:00
Emil Ernerfeldt
d999962602 Refactor example code 2020-04-12 12:07:51 +02:00
Emil Ernerfeldt
98899c80b0 Fix font sliders 2020-04-11 18:35:21 +02:00
Emil Ernerfeldt
dba42b1ada Compilation fix 2020-04-11 18:18:52 +02:00
Emil Ernerfeldt
f4f03d49eb Some predefined colors 2019-12-02 21:59:49 +01:00
Emil Ernerfeldt
157de8a966 Add support for monospace font 2019-12-02 20:08:49 +01:00
Emil Ernerfeldt
100d4e328f export more 2019-11-24 20:45:45 +01:00
Emil Ernerfeldt
be23d66f9e Update rusttype and run cargo update 2019-11-02 10:15:06 +01:00
Emil Ernerfeldt
be8eb02b3f Some minor fixes and additions 2019-11-02 09:50:49 +01:00
Emil Ernerfeldt
1d6bc3baba Minor API improvements 2019-04-25 18:07:36 +02:00
Emil Ernerfeldt
97bbc6f066 Minor API tweaks 2019-03-16 15:14:22 +01:00
Emil Ernerfeldt
6b5da83642 Adjust font sizes again 2019-03-16 14:16:27 +01:00
Emil Ernerfeldt
07711a456a Adjust font sizes 2019-03-16 14:12:27 +01:00
Emil Ernerfeldt
e06a4db7bc New font: Comfortaa 2019-03-16 13:37:29 +01:00
Emil Ernerfeldt
075fa7ab0f Button clicked on mouse release 2019-03-16 12:56:00 +01:00
Emil Ernerfeldt
01862d07ae Add native glium backend 2019-03-12 22:59:55 +01:00
Emil Ernerfeldt
0be9722af5 Handle more than 2^16 vertices in WebGL renderer 2019-03-12 14:43:50 +01:00
Emil Ernerfeldt
9cdd038285 Expose mesher module 2019-03-12 10:01:25 +01:00
Emil Ernerfeldt
192b59ebb0 Refactor: remove GuiCmd 2019-03-11 15:59:49 +01:00
Emil Ernerfeldt
87288634e9 Refactor: Merge LayoutOptions and Style 2019-03-11 15:39:54 +01:00
Emil Ernerfeldt
7cbf8e45bc Nicer looking colors and sliders 2019-03-11 15:30:32 +01:00
Emil Ernerfeldt
e398668f96 Add support for usize sliders 2019-03-11 13:31:55 +01:00
Emil Ernerfeldt
79e38e39fe Fix: allow sliders without text 2019-03-10 21:00:44 +01:00
Emil Ernerfeldt
c15768dbf4 Refactor: rename Frame to Mesh 2019-03-10 21:00:28 +01:00
Emil Ernerfeldt
f2040c6fc5 Fix antialiasing for non-retina screens 2019-02-24 17:18:30 +01:00
Emil Ernerfeldt
eb589757a8 Add function to check if user is interacting with anything 2019-02-10 22:27:41 +01:00
Emil Ernerfeldt
4741955f68 Add function for vertical layout 2019-02-10 22:06:57 +01:00
Emil Ernerfeldt
da6d590908 Minor improvements 2019-02-10 20:56:59 +01:00
Emil Ernerfeldt
2583fd2c52 integer sliders 2019-02-10 16:10:08 +01:00
Emil Ernerfeldt
f0c879b2f4 Code cleanup: allow None mouse_pos + clippy fixes 2019-02-10 15:30:48 +01:00
Emil Ernerfeldt
ef4f0908f2 make label into a macro 2019-01-21 01:48:32 -06:00
Emil Ernerfeldt
c2c94ddda5 Pixel-perfect fonts 2019-01-19 10:10:28 -06:00
Emil Ernerfeldt
cd8ca47e76 Small tweaks 2019-01-19 10:09:00 -06:00
Emil Ernerfeldt
391abda3d5 Mobile fixes 2019-01-17 17:34:01 -06:00
Emil Ernerfeldt
46293f6fd4 Allow zooming font atlas 2019-01-17 17:33:20 -06:00
Emil Ernerfeldt
88fdd127ea Allow resizing fonts at runtime 2019-01-17 11:03:39 -06:00
Emil Ernerfeldt
fe3542a28d Allow floating point font sizes 2019-01-17 07:07:02 -06:00
Emil Ernerfeldt
616245c323 Refactor: create Texture struct 2019-01-16 17:09:12 -06:00
Emil Ernerfeldt
7f83876005 Enable colored text (and other misc fixes) 2019-01-16 09:28:43 -06:00
Emil Ernerfeldt
4dab7a1504 Fix font test 2019-01-15 04:50:30 -06:00
Emil Ernerfeldt
2c0ca77e09 Add support for alignment (min, center, max) in horizontal and vertical layouts 2019-01-15 04:50:30 -06:00
Emil Ernerfeldt
3f84836c20 Add rect field to InteractInfo struct 2019-01-15 04:48:05 -06:00
Emil Ernerfeldt
6e8cc8439b Add separator widget 2019-01-13 19:15:11 +01:00
Emil Ernerfeldt
ca9333ec3e Support multiple fonts 2019-01-13 00:55:56 +01:00
Emil Ernerfeldt
1b8a45a514 Share font atlas 2019-01-13 00:19:53 +01:00
Emil Ernerfeldt
2fc191eed4 Break out texture atlas into own struct 2019-01-13 00:10:53 +01:00
Emil Ernerfeldt
e607097da0 Refactor where and how options are stored 2019-01-12 23:20:19 +01:00
Emil Ernerfeldt
8963a99a09 Rename to Emigui 2019-01-12 23:07:30 +01:00