Commit graph

206 commits

Author SHA1 Message Date
Emil Ernerfeldt
f7291e4a0d Frame: more customizeable 2020-05-10 13:06:16 +02:00
Emil Ernerfeldt
ad0f6f6117 Resize component: better handling of resize=false 2020-05-10 13:04:45 +02:00
Emil Ernerfeldt
dba494e306 bug fix: only catch clicks on currently open windows 2020-05-10 10:33:35 +02:00
Emil Ernerfeldt
3a1d677840 refactor interact style 2020-05-10 08:55:41 +02:00
Emil Ernerfeldt
2bd610cb5b Fix dubplicate itmes in Style menu 2020-05-08 22:48:08 +02:00
Emil Ernerfeldt
fa82e8d806 Rename Region to Ui (shorter, sweeter) 2020-05-08 22:42:31 +02:00
Emil Ernerfeldt
9f6e9c94d6 Merge struct Emigui into Context 2020-05-08 22:25:28 +02:00
Emil Ernerfeldt
e317f697c0 Small fixes and added TODOs 2020-05-08 21:31:27 +02:00
Emil Ernerfeldt
702e135f07 Keep window title and collapsing headers on one line 2020-05-08 17:16:32 +02:00
Emil Ernerfeldt
570215df9a Better debug rendering of expanded region 2020-05-08 17:10:25 +02:00
Emil Ernerfeldt
ec93f20604 fix typo 2020-05-07 17:37:17 +02:00
Emil Ernerfeldt
87e3aacf35 enforce and fix a bunch of clippy issues 2020-05-07 10:47:03 +02:00
Emil Ernerfeldt
8fd95153fe Nice foldable animations 2020-05-05 19:41:49 +02:00
Emil Ernerfeldt
0fdc1048c8 Bug fix: window/floating sizes 2020-05-05 19:33:02 +02:00
Emil Ernerfeldt
6aadf4128e Refactor: pass Rect:s by value (cleaner) 2020-05-05 19:12:00 +02:00
Emil Ernerfeldt
9d1cf77aa7 Minor cleanup around desired_rect 2020-05-05 19:08:59 +02:00
Emil Ernerfeldt
fade508c15 Make Region::child_bounds private 2020-05-05 08:15:20 +02:00
Emil Ernerfeldt
2f9e70febf Fix collapsing header animation 2020-05-05 03:05:36 +02:00
Emil Ernerfeldt
50d759d1b4 Make Region::desired_rect private 2020-05-05 02:55:31 +02:00
Emil Ernerfeldt
be93d5b0e0 Made Region::clip_rect private 2020-05-05 02:42:01 +02:00
Emil Ernerfeldt
24ce7b4145 Bug fix: forced shrunked clip rect is now nicer 2020-05-05 02:42:01 +02:00
Emil Ernerfeldt
2d7131d713 Made more Region members private 2020-05-04 21:59:28 +02:00
Emil Ernerfeldt
45016ebf53 Fix: resize handle positioning 2020-05-04 21:54:59 +02:00
Emil Ernerfeldt
17ddc75afe Bug fix: tooltip frame size 2020-05-04 21:54:28 +02:00
Emil Ernerfeldt
94645cb918 Add stats about number of painted primitives 2020-05-04 21:54:01 +02:00
Emil Ernerfeldt
d02194d33a Made the fields in Context private 2020-05-04 21:35:16 +02:00
Emil Ernerfeldt
45564f952b Kinetic windows 2020-05-03 13:28:47 +02:00
Emil Ernerfeldt
bfbb669d02 Store/restore emigui memory state (window positions, sizes etc) 2020-05-02 11:37:12 +02:00
Emil Ernerfeldt
d52cccde7b Move Slider widgets to own file 2020-05-01 19:24:52 +02:00
Emil Ernerfeldt
5ac39d9643 Better handling of forcibly trying to shink something that can't be 2020-05-01 10:02:53 +02:00
Emil Ernerfeldt
f97dcdc9b5 Reorder some functions in Region 2020-05-01 09:35:44 +02:00
Emil Ernerfeldt
b73fbb33d8 Improve size negotiation code.
Better enfocred minimum sizes.
You can now have windows that expand to fit their content.
2020-05-01 02:08:01 +02:00
Emil Ernerfeldt
7cd8ac2bbf Rename Widget::add_to to Widget::ui 2020-04-29 22:01:39 +02:00
Emil Ernerfeldt
bf59455097 Add a bunch of TODOs 2020-04-29 21:58:41 +02:00
Emil Ernerfeldt
14db237b1d Basic text input support 2020-04-29 21:25:49 +02:00
Emil Ernerfeldt
1e685d1cb0 Add support for text input in emilib and glium.
Add input inspectors
2020-04-28 23:05:22 +02:00
Emil Ernerfeldt
680d1888da Add a Debug layer 2020-04-27 16:53:14 +02:00
Emil Ernerfeldt
fbedc2e9ab Add scroll bars to windows.
Auto-hide scroll bars when not needed

Bug fixes:
 * collapsing headers animation
 * clip rect interactions
 * clip rects for scroll areas
2020-04-26 22:30:24 +02:00
Emil Ernerfeldt
2897b1cafc Fix paint canvas example (move painting with window) 2020-04-26 22:25:23 +02:00
Emil Ernerfeldt
6dd41982ba Expand Region when child overflows desired_rect 2020-04-25 23:07:03 +02:00
Emil Ernerfeldt
154424384f Implement Window as collection of Floating + Frame + Resize 2020-04-25 22:49:57 +02:00
Emil Ernerfeldt
649dcec09c Refactor: replace bounding_size: Vec2 with child_bounds: Rect 2020-04-25 15:46:50 +02:00
Emil Ernerfeldt
cce048509f Refactor: make Rect members min/max public 2020-04-25 15:45:38 +02:00
Emil Ernerfeldt
e26d08851f Add Floating and Frame containers as building blocks for windows 2020-04-25 15:26:24 +02:00
Emil Ernerfeldt
3a430c8fc7 Add new Resize container 2020-04-25 14:37:39 +02:00
Emil Ernerfeldt
9ba5bea143 Use RangeInclusive for clamp and lerp 2020-04-25 11:14:32 +02:00
Emil Ernerfeldt
4cc6ca7236 Use ..= range arguments to remap functions 2020-04-25 11:11:44 +02:00
Emil Ernerfeldt
663fbda90c Use min..=max syntax for slider ranges 2020-04-25 11:01:57 +02:00
Emil Ernerfeldt
02f3b6dddf std::f32::INFINITY -> f32::INFINITY 2020-04-25 10:52:20 +02:00
Emil Ernerfeldt
b407a65e87 Update rusttype 2020-04-25 10:45:53 +02:00
Emil Ernerfeldt
a66f4efaac Minor code cleanup and clippy fixes 2020-04-24 18:47:14 +02:00
Emil Ernerfeldt
ddc34d654b Nicer window resize icon 2020-04-24 18:32:55 +02:00
Emil Ernerfeldt
39e17a7562 Add painter region as example 2020-04-24 18:32:27 +02:00
Emil Ernerfeldt
7459aa60a4 Make emigui fill entire web page 2020-04-23 22:08:42 +02:00
Emil Ernerfeldt
1affa10dee Keep windows within the screen 2020-04-23 22:07:27 +02:00
Emil Ernerfeldt
b39555bb23 Add support for hyperlinks 2020-04-23 19:15:17 +02:00
Emil Ernerfeldt
25b06a6ff0 Update wasm/web example 2020-04-23 09:50:03 +02:00
Emil Ernerfeldt
723c3ca908 Shrink window heights to fit content 2020-04-23 09:34:33 +02:00
Emil Ernerfeldt
b4ea51f0f9 Sliders: use title as id if available with scroll position as fallback
This fixes the sliders in the style window
2020-04-23 09:27:08 +02:00
Emil Ernerfeldt
fd8180cea4 Fix left alignment of widgets and tweak style slightly 2020-04-23 00:23:29 +02:00
Emil Ernerfeldt
a4db437413 Make scroll bar prettier, and handle clicks outside of handle 2020-04-22 23:41:05 +02:00
Emil Ernerfeldt
61033a5fc1 Remove dead code 2020-04-22 21:11:13 +02:00
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