Commit graph

18 commits

Author SHA1 Message Date
Emil Ernerfeldt
e7cfda4941
Shape refactor (#705)
* More introspection stats about vertices/indices etc

* more serde derive

* #[inline] to Shape constructors

* Introduce RectShape

* Introduce CircleShape

* Introduce PathShape

* More serde derive

* impl Copy for RectShape and CircleShape

* Simplify some code

* More serde derive

* Add helpers for appending more input or output

* Serde derives for RawInput

* Rename Fonts::from_definitions to Fonts::new

* Add Output::take

* refactor EguiGlium slightly

* Derive PartialEq for RawInput

* Improve egui::util::History interface

* tweaks

* Improve History filter: add minimum length

* Calculate galley bounding rect

* tessellator: cull line segments and paths

* tessellator: cull meshes

* Fix bug in History bandwidth estimator
2021-09-20 21:36:56 +02:00
Emil Ernerfeldt
9def6ef6df All Ui:s must now have a finite max_rect
Deprecated `max_rect_finite`, `available_size_before_wrap_finite`
and `available_rect_before_wrap_finite`.
2021-08-28 16:02:16 +02:00
Tomáš Vojtášek
f07f9bf5bd
Typo previus -> previous (#214) 2021-03-09 18:57:45 +01:00
Emil Ernerfeldt
9c8439d053 Add some helper functions to Response 2021-03-06 10:48:39 +01:00
Emil Ernerfeldt
c376d0bb7e [emath] RectTransform: transforms Pos2 from one Rect to another
Very useful for transforming coordinate systems, e.g. for painting
2021-02-14 10:33:44 +01:00
Emil Ernerfeldt
a19fd7b780 Add light mode 2021-02-03 19:30:58 +01:00
Emil Ernerfeldt
ca886ea998 Add ui.visuals() as short for ui.style().visuals 2021-02-03 00:20:39 +01:00
Emil Ernerfeldt
01fca2f31c Add Ui::spacing() and Ui::spacing_mut() as shortcuts 2021-02-01 16:56:29 +01:00
Emil Ernerfeldt
247026149c
Multiple mouse button support (#135)
Add support for primary, secondary and middle mouse buttons. Also improve ability to click things in low FPS situations.

This introduces a lot of breaking changes:

    Backends/integrations now pass mouse events via the even stream.
    Response has an interface of mostly methods instead of public members.
    input.mouse is now input.pointer and has new interface.


* Rename 'mouse' to 'pointer' everywhere (pointer = mouse or touch)

* Make Response::clicked and Response::double_clicked into methods

* Remove Response::active and add dragged() and interact_pointer_pos()

* Support multiple mouse buttons

* Make PointerState interface all methods

* Make most members of Response private
2021-01-25 18:50:19 +01:00
Emil Ernerfeldt
31b7eda51e Rename Egui to egui
Also update iamges in README.md
2021-01-17 14:48:59 +01:00
Emil Ernerfeldt
fb2317c993 Rename PaintCmd to Shape 2021-01-10 11:43:01 +01:00
Emil Ernerfeldt
aee1474b6e Move align.rs into mod math 2021-01-10 10:54:34 +01:00
Emil Ernerfeldt
72ed94fcb3 Add helper struct Align2 2021-01-10 10:51:16 +01:00
Emil Ernerfeldt
b4871e2aef Add ui.allocate_at_least and ui.allocate_exact_size 2021-01-06 11:03:29 +01:00
Emil Ernerfeldt
10a23d18e1 Support additive colors in color picker 2021-01-03 18:16:12 +01:00
Emil Ernerfeldt
029a85c1fc Move Color32 constants from mod color to struct Color32 2021-01-02 17:18:41 +01:00
Emil Ernerfeldt
73f3d8cf46 Rename Srgba to Color32 2021-01-02 17:02:18 +01:00
Emil Ernerfeldt
b3d1016507 [demo] Move backend into an optional panel of WrapApp 2021-01-02 01:01:01 +01:00