Commit graph

42 commits

Author SHA1 Message Date
Emil Ernerfeldt
5f6a468812 Add Context::set_pixels_per_point to control the scale of the UI 2021-02-21 11:23:33 +01:00
Emil Ernerfeldt
dbc6a620cd Control the maximum egui web canvas size with App::max_size_points 2021-02-12 17:58:02 +01:00
Emil Ernerfeldt
b493bc6efc Wrap tesselated output in struct ClippedMesh(Rect, Mesh) 2021-01-25 21:43:17 +01:00
Emil Ernerfeldt
75fa77e040 Rename Triangles to Mesh 2021-01-25 21:23:24 +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
b869db728b [egui_web] Call prevent_default for arrow keys when entering text
Closes https://github.com/emilk/egui/issues/58
2021-01-17 12:24:17 +01:00
Emil Ernerfeldt
ef595153c9 [egui_web] Improve alpha blending + add WebGL2 painter 2021-01-16 20:48:00 +01:00
Emil Ernerfeldt
fb2317c993 Rename PaintCmd to Shape 2021-01-10 11:43:01 +01:00
Emil Ernerfeldt
5ef9f35d1e [epi] Simplify TextureAllocator interface 2021-01-07 16:29:58 +01:00
Emil Ernerfeldt
69d31a5e47 [eframe] Make persistence, http and time optional features
Saves on compile times.
2021-01-04 10:25:13 +01:00
Emil Ernerfeldt
73f3d8cf46 Rename Srgba to Color32 2021-01-02 17:02:18 +01:00
Emil Ernerfeldt
14a96ca5d0 Add a dummy warm-up frame to the demo app to pre-cache emojis 2021-01-02 14:42:43 +01:00
Emil Ernerfeldt
b1022d01c1 Rename epi::App::ui to epi::App::update 2021-01-01 20:22:18 +01:00
Emil Ernerfeldt
375e317547 Move http fetch api from eframe to epi 2021-01-01 14:54:26 +01:00
Emil Ernerfeldt
84414e62a3 Add new crate eframe which wraps egui, epi, egui_web and egui_glium 2020-12-29 15:57:13 +01:00
Emil Ernerfeldt
d7459bc13d Move egui::app into new epi crate 2020-12-29 14:15:46 +01:00
Emil Ernerfeldt
d38b16f1ea Learn how to spell to "tessellation" 2020-12-29 12:18:41 +01:00
Emil Ernerfeldt
fb941cf618 [egui_web] Simplify the arguments you pass to start() 2020-12-19 21:15:07 +01:00
Emil Ernerfeldt
89937bf636 [egui_web] Auto-save app state to Local Storage every 30 seconds 2020-12-19 20:50:00 +01:00
Emil Ernerfeldt
01c65b0dcb Replace Arc<Context> with struct CtxRef 2020-12-19 14:48:04 +01:00
Emil Ernerfeldt
82a3997188 [egui_web] Add max canvas size to help perf issues on some platforms
Related: https://github.com/emilk/egui/issues/67
2020-12-18 22:51:23 +01:00
Emil Ernerfeldt
c3c4f28a9d Added App::clear_color() that apps can use to specify background color 2020-12-18 22:44:26 +01:00
Emil Ernerfeldt
709e711364 Deprecated RawInput::screen_size and replaced with screen_rect 2020-12-16 21:52:28 +01:00
Emil Ernerfeldt
2c766aa540 Make RawInput::time an Option 2020-12-16 21:22:45 +01:00
Emil Ernerfeldt
8de74e4250 [egui_web] respect the native zoom/scale of the browser
Remove all complexity with own scale slider.

Closes https://github.com/emilk/egui/issues/53
2020-11-28 10:46:31 +01:00
Emil Ernerfeldt
633b19ee99 [egui_web] Repaint on finished fetch in example app 2020-11-20 20:35:16 +01:00
Emil Ernerfeldt
c6ce0b9e8c [example_web] show loading of an image
Required some redesign of `TextureAllocator` as well as
some improvements to the fetch API.
2020-11-18 22:16:01 +01:00
Emil Ernerfeldt
86cfd0dcd3 egui_web: Repaint at least every seconds
Just in case the app needs it, e.g. because it has finished a download.
2020-11-18 01:07:32 +01:00
Emil Ernerfeldt
fe0d159324 Support Cmd+A ^W ^U ^K and shift-click 2020-11-15 14:21:21 +01:00
Emil Ernerfeldt
af11d766fc Split out tesselation from Context::end_frame() 2020-11-07 11:44:32 +01:00
Emil Ernerfeldt
ca96172552 You can override the default Egui fonts
Closes https://github.com/emilk/egui/issues/32
2020-10-31 18:03:13 +01:00
Emil Ernerfeldt
7638ca9962 [app] Simplify interface to egui::app::App 2020-10-24 19:23:16 +02:00
Emil Ernerfeldt
c364403d44 [app] Give apps the ability to resize integration 2020-10-24 18:45:31 +02:00
Emil Ernerfeldt
44a7cac046 Context::begin_frame() no longer returns anything.
Put your widgets into a `SidePanel`, `TopPanel`,
`Window` or into `ctx.background_ui()`.
2020-10-24 10:56:23 +02:00
Emil Ernerfeldt
a4e19d7207 [app] Add demo app slider to change scale of all of Egui 2020-10-17 23:54:46 +02:00
Emil Ernerfeldt
251cde60f0 [app] Refactor egui::app::App interface to be more data oriented 2020-10-17 16:13:20 +02:00
Emil Ernerfeldt
6fcfb52aa0 [demo] add frame time graph to demo app 2020-10-01 22:25:44 +02:00
Emil Ernerfeldt
b77151fb64 remove seconds_from_midnight from core egui input
It is only used by demo app, and so does not belong to egui proper.
Instead it is now passed as part of a DemoEnvironment
2020-09-23 08:57:23 +02:00
Emil Ernerfeldt
5856cded95
refactor RunMode: move it from backend to the demo App (#23)
This simplifies the egui_glium and egui_web backends substantially,
reduces the scope of RunMode to a single file, and
removes duplicated code.

Basically: this is how I should have written it from the beginning.
2020-09-16 08:03:40 +02:00
Emil Ernerfeldt
d49aec4079 Add user texture support to egui_glium and egui_web backends 2020-09-11 18:54:57 +02:00
Emil Ernerfeldt
bb367752cf [text] support non-latin characters by dynamically adding them to atlas 2020-09-09 14:33:30 +02:00
Emil Ernerfeldt
554e6e7120 [app] unify web and glium demo app 2020-07-23 19:04:23 +02:00