Commit graph

156 commits

Author SHA1 Message Date
Emil Ernerfeldt
1f5cd482f6
Replace ProggyClean.ttf with Hack-Regular.ttf as default monospace font (#802)
https://github.com/source-foundry/Hack, MIT license
2021-10-17 20:49:28 +02:00
Emil Ernerfeldt
6f699b3391 Replace every ... with … like some sort of crazy person
Also fix some small typos

Closes https://github.com/emilk/egui/pull/736
2021-10-13 11:52:34 +02:00
Emil Ernerfeldt
1b36863248
Split out new crate egui-winit from egui_glium (#735) 2021-09-28 17:33:28 +02:00
Emil Ernerfeldt
52e49bd4ae README: Point to better example in the "how to render 3D" FAQ section 2021-09-20 22:58:26 +02:00
Emil Ernerfeldt
93c2fde1fc Extend section about rendering 3D inside of egui 2021-09-19 20:16:50 +02:00
Emil Ernerfeldt
f2b6edd6db Replace egui_winit_ash_vk_mem with egui-winit-ash-integration in README.md
Closes https://github.com/emilk/egui/issues/707
2021-09-11 09:34:00 +02:00
Emil Ernerfeldt
391bec1170 FAQ: add "How do I render 3D stuff in an egui area?" 2021-09-05 10:18:49 +02:00
Emil Ernerfeldt
5f88d89f74
Faster galley cache (#699)
* Speed up galley cache by only using the hash as key

This hashes the job but doesn't compare them with Eq,
which speeds up demo_with_tessellate__realistic by 5-6%,
winning back all the performance lost in
https://github.com/emilk/egui/pull/682

* Remove custom Eq/PartialEq code for LayoutJob and friends

* Silence clippy

* Unrelated clippy fixes
2021-09-04 10:19:58 +02:00
Emil Ernerfeldt
de1a1ba9b2
New text layout (#682)
This PR introduces a completely rewritten text layout engine which is simpler and more powerful. It allows mixing different text styles (heading, body, etc) and formats (color, underlining, strikethrough, …) in the same layout pass, and baked into the same `Galley`.

This opens up the door to having a syntax-highlighed code editor, or a WYSIWYG markdown editor.

One major change is the color is now baked in at layout time. However, many widgets changes text color on hovered. But we need to do the text layout before we know if it is hovered. Therefor the painter has an option to override the text color of a galley.


## Performance
Text layout alone is about 20% slower, but a lot of that is because more tessellation is done upfront. Text tessellation is now a lot faster, but text layout + tessellation still lands at a net loss of 5-10% in performance. There are however a few tricks to speed it up (like using `smallvec`) which I am saving for later. Text layout is also cached, meaning that in most cases (when all text isn't changing each frame) text tessellation is actually more important (and that's more than 2x faster!).

Sadly, the actual text cache lookup is significantly slower (300ns -> 600ns). That's because the `TextLayoutJob` is a lot bigger (it has more options, like underlining, fonts etc), so it is slower to hash and compare. I have an idea how to speed this up, but I need to do some other work before I can implement that.

All in all, the performance impact on `demo_with_tesselate__realistic` is about 5-6% in the red. Not great; not terrible. The benefits are worth it, but I also think with some work I can get that down significantly, hopefully down to the old levels.
2021-09-03 18:18:00 +02:00
Mohammed Alyousef
d9fd806e94
add fltk-egui as a 3rd party backend crate (#694) 2021-09-03 15:20:34 +02:00
Emil Ernerfeldt
4f8dcf9a27 Augment list of fedora dependencies
Taken from https://github.com/emilk/egui_template/pull/24
2021-09-02 21:25:38 +02:00
Emil Ernerfeldt
ce19e10258 REAMDE: add link to egui docs about immediate mode 2021-08-23 21:48:38 +02:00
Emil Ernerfeldt
661f0d71a7
Add libssl-dev to apt-get install path (#635) 2021-08-20 14:37:14 +02:00
Emil Ernerfeldt
734ec9dc5a Add link to amethyst_egui 2021-08-18 12:46:59 +02:00
Emil Ernerfeldt
d6299bcd91 Expand egui_web/README.md with list of shortcomings 2021-08-16 21:17:15 +02:00
Emil Ernerfeldt
9bbcfd5996 Fix typo
Closes #567 #617
2021-08-15 17:02:28 +02:00
Luca
a1c5ce05f7
readme: add egui_glfw_gl (#586) 2021-07-29 22:14:17 +02:00
Emil Ernerfeldt
4feee59f84 Improve README files for all crates 2021-07-29 22:04:20 +02:00
Emil Ernerfeldt
326da7a0d7 README: Clean up the integration section 2021-07-29 21:58:50 +02:00
Emil Ernerfeldt
9b1a8c9e00 Add link to egui-tetra 2021-07-29 01:33:55 +02:00
Emil Ernerfeldt
94937a33e8 Add link to ggez-egui 2021-07-28 17:52:05 +02:00
Emil Ernerfeldt
52d187ab5f Add godot-egui to README.md 2021-07-23 11:04:55 +02:00
Emil Ernerfeldt
d8b2b50780
Add libxkbcommon-dev to list of linux deps (#549)
Closes https://github.com/emilk/egui/issues/545
2021-07-06 19:33:37 +02:00
Emil Ernerfeldt
d807451348 Release 0.13.0 - Better panels, plots and new visual style 2021-06-24 20:00:06 +02:00
Benjamin Bouvier
e22c242d17
Use ab_glyph instead of rusttype for font rendering (#490)
* Use ab_glyph instead of rusttype for font rendering

* address review feedback
2021-06-24 12:13:57 +02:00
Emil Ernerfeldt
ef36cac422 Improve misc docs 2021-06-12 22:12:45 +02:00
Emil Ernerfeldt
ec6268e4ac egui_web: document how to fill the full width of the browser 2021-06-03 18:56:37 +02:00
Emil Ernerfeldt
6468b2b84e
Implement efficent scrolling of large content (#457) 2021-06-03 18:48:45 +02:00
ilya sheprut
9dd23b44e0
readme: add nannou_egui (#379) 2021-05-12 13:29:37 +02:00
Emil Ernerfeldt
7b0f991b20 Improve docs concerning custom fonts, themes and accessibility
Closes https://github.com/emilk/egui/pull/370
Closes https://github.com/emilk/egui/issues/372
2021-05-11 14:56:27 +02:00
crumblingstatue
e991a1c310
Fix typo in README.md (#340) 2021-04-29 19:31:24 +02:00
ilya sheprut
d6de19b507
Mention macroquad backend in the readme (#308) 2021-04-15 10:20:04 +02:00
follower
0353f40dd5
Typo fix: "occational" -> "occasional" (#286) 2021-04-08 22:22:58 +02:00
pixeljoelson
b028e708e0
fixed typo in README.md (#275) 2021-04-05 09:56:58 +02:00
Emil Ernerfeldt
33a4058381 Add comment about Firefox CPU usage in FAQ 2021-04-02 09:24:34 +02:00
Emil Ernerfeldt
94baf98eab Add a galley cache to Fonts to avoid doing the same layout each frame 2021-03-29 22:49:48 +02:00
Emil Ernerfeldt
de439b6e21 Deprecate old Slider constructors in favor of Slider::new 2021-03-27 16:07:18 +01:00
Emil Ernerfeldt
405ae3bcee Add link to https://github.com/hakolao/egui_winit_vulkano 2021-03-21 16:09:44 +01:00
Emil Ernerfeldt
24b3cd021f Add demo app instructions for Defora Rawhide
Closes https://github.com/emilk/egui/issues/235
2021-03-21 15:28:00 +01:00
Emil Ernerfeldt
07a17dc6cf Sort 3rd party integrations and add link to egui_vulkano 2021-03-08 22:57:45 +01:00
Emil Ernerfeldt
fdb1aa6bec improve documentation 2021-02-28 18:59:46 +01:00
Emil Ernerfeldt
fc8b27807c Add discussion about the pros and cons of immediate mode GUIs 2021-02-11 19:29:05 +01:00
Emil Ernerfeldt
e5233d2268 Add link to egui_winit_ash_vk_mem crate 2021-02-09 18:38:37 +01:00
Emil Ernerfeldt
5ce681ef16 Improve documentation 2021-02-07 17:04:03 +01:00
Emil Ernerfeldt
18e1ea1d63 Clarify which platforms egui runs on.
Closes https://github.com/emilk/egui/issues/145
2021-01-27 21:33:37 +01:00
Emil Ernerfeldt
b493bc6efc Wrap tesselated output in struct ClippedMesh(Rect, Mesh) 2021-01-25 21:43:17 +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
c476c7f1a2 Add note about required libraries on Linux
Closes https://github.com/emilk/egui/issues/121
2021-01-20 17:27:58 +01:00
Emil Ernerfeldt
90a0ce969b Add link to bevy_egui integration 2021-01-17 22:11:12 +01:00
Emil Ernerfeldt
37a3fe7f76 Release 0.8.0 - Grid layout & new visual style 2021-01-17 15:28:52 +01:00
Emil Ernerfeldt
9814b25246 List default egui dependencies after badges 2021-01-17 14:54:24 +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
2854a84728 Improve documentation about how to write a painter for egui 2021-01-17 02:12:29 +01:00
Emil Ernerfeldt
f3b011a8cd Add widget gallery image to README.md 2021-01-11 21:09:48 +01:00
Emil Ernerfeldt
fb2317c993 Rename PaintCmd to Shape 2021-01-10 11:43:01 +01:00
Emil Ernerfeldt
d0d22ea09b Release 0.7.0 2021-01-04 15:52:29 +01:00
Emil Ernerfeldt
4202c4b6a9 Add an eframe example app 2021-01-02 13:18:21 +01:00
Emil Ernerfeldt
d38b16f1ea Learn how to spell to "tessellation" 2020-12-29 12:18:41 +01:00
Emil Ernerfeldt
a1fa9903b0 Add a lot of documentation and inter-doc links 2020-12-27 12:57:15 +01:00
Emil Ernerfeldt
6f5fd1b9c0 Replace parking_lot with atomic_refcell
You can still opt-in to use parking_lot if you plan to use the same
egui::Context from multiple threads.
2020-12-26 20:36:25 +01:00
Emil Ernerfeldt
05f3cd66ce README.md: add links to egui_template, Discussions and CONTRIBUTING.md 2020-12-20 00:54:20 +01:00
Emil Ernerfeldt
8b7649c85d Add brush emoji to README.md 2020-12-13 21:16:19 +01:00
Emil Ernerfeldt
891c5d84d7 Add a second emoji font: emoji-icon-font 2020-12-12 15:03:12 +01:00
Emil Ernerfeldt
cb310676af Add Emoji support with NotoEmoji-Regular 2020-12-12 00:53:54 +01:00
Emil Ernerfeldt
428e2373e5 Change default font to Ubuntu-Light 2020-11-30 07:55:00 +01:00
Cong
a2d0f88069
Fix demo anchor 2020-11-26 12:40:23 +11:00
Emil Ernerfeldt
af11d766fc Split out tesselation from Context::end_frame() 2020-11-07 11:44:32 +01:00
Emil Ernerfeldt
e00901e723 Add link to egui_sdl2_gl integration crate to README.md 2020-11-05 20:12:58 +01:00
Emil Ernerfeldt
16a984b71f Add badge for Build Status 2020-10-27 14:50:44 +01:00
Emil Ernerfeldt
e9f0fba9f0 Add badge for dependency status 2020-10-27 14:50:32 +01:00
crumblingstatue
8787eb77cf
Fix crates.io links to backends (#30) 2020-10-25 09:49:37 +01:00
Emil Ernerfeldt
2e80aba068 New example code 2020-10-24 19:45:27 +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
7f8564b27a Expand and clarify project goals 2020-10-18 15:42:49 +02:00
Emil Ernerfeldt
222f534713 Add links to wgpu and winit integrations 2020-10-18 15:42:29 +02:00
Emil Ernerfeldt
12d387d7f5 Replace term "backend" with "integration" 2020-10-18 15:41:52 +02:00
Emil Ernerfeldt
92cfbe643c Add #![forbid(unsafe_code)] and safety badge 2020-10-18 15:40:23 +02:00
Emil Ernerfeldt
8ff0bed259 [slider] Logarithmic sliders with support for zero and infinity
Logarithmic sliders will intelligently help you pick a good range
even if you inlcude zero or infinity. They also support crossing
the zero value, so you can have a slider span -INF to +INF.

The sliders now also supports reversed sliders (large -> small).
2020-10-07 09:59:49 +02:00
Emil Ernerfeldt
b84642374b [docs] improve README.md section about writing your own backends 2020-09-21 19:23:22 +02:00
Emil Ernerfeldt
c6f7534a8b README.md: add a "Why Egui?" section
Includes a comparison with imgui-rs
2020-09-11 11:38:45 +02:00
Emil Ernerfeldt
7093de0ff2 [docs] clean up README.md 2020-09-09 15:19:30 +02:00
Emil Ernerfeldt
0755a95c76 Update README.md 2020-08-28 16:24:20 +02:00
Emil Ernerfeldt
73cea29f7d [docs] Improve README.md and documentation 2020-08-21 18:53:43 +02:00
Emil Ernerfeldt
ad9783a33d Update links to point to https://github.com/emilk/egui
because I renamed the github repository from "emigui" to "egui"
2020-08-10 19:38:46 +02:00
Francois-Guillaume Ribreau
37057d8334
fix 404 link 2020-08-04 09:37:06 +02:00
Emil Ernerfeldt
8dced5896c rename egui_wasm to egui_web 2020-07-17 12:55:07 +02:00
Jasper Bekkers
c0d4feeca8
Add badges 2020-06-05 14:20:43 +02:00
Emil Ernerfeldt
fd5ab736bb Rename from "Emigui" to "Egui"
Shorter to type (especially in code).
2020-05-30 10:22:35 +02:00
Emil Ernerfeldt
71154edf9b Add a fractal clock example to showcase painting performance 2020-05-11 20:21:24 +02:00
Emil Ernerfeldt
3860807e29 Use premultiplied alpha for all colors + improve painting of thin lines 2020-05-11 17:57:11 +02:00
Emil Ernerfeldt
6ad74ccaf5
Merge pull request #2 from not-fl3/patch-1
Mention miniquad backend in readme
2020-05-07 17:35:57 +02:00
Emil Ernerfeldt
bfbb669d02 Store/restore emigui memory state (window positions, sizes etc) 2020-05-02 11:37:12 +02:00
Fedor Logachev
ff55b9b8e8
Mention miniquad backend in readme 2020-04-30 23:16:45 -05:00
Emil Ernerfeldt
14db237b1d Basic text input support 2020-04-29 21:25:49 +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
7fc2500973 Update link to example code 2020-04-12 12:22:51 +02:00
Emil Ernerfeldt
e06a4db7bc New font: Comfortaa 2019-03-16 13:37:29 +01:00
Emil Ernerfeldt
e1652bef77 Rename example app to example_wasm 2019-03-16 12:55:42 +01:00
Emil Ernerfeldt
01862d07ae Add native glium backend 2019-03-12 22:59:55 +01:00
Emil Ernerfeldt
733df46a0a Update README.md 2019-03-12 08:54:17 +01:00