Commit graph

267 commits

Author SHA1 Message Date
Emil Ernerfeldt
b5c8f034e7
Add web location info to egui_web/epi (#1258)
This adds all parts of the web "location" (URL) to frame.info().web_info, included a HashMap of the query parameters, percent-decoded and ready to go.

This lets you easily pass key-value pairs to your eframe web app.
2022-02-17 16:46:43 +01:00
Yusuf Bera Ertan
1ebb5ccabf
Don't install console panic hook and tracing wasm subscriber in egui_web (#1230)
Do so in egui_demo_app instead
2022-02-10 15:44:41 +01:00
Emil Ernerfeldt
defc400c21
Add an example of how to display an SVG image in egui (#1228) 2022-02-09 08:12:12 +01:00
Emil Ernerfeldt
603ec82a5e
cargo deny: clarify MPL-2.0 license and use un-patched ureq again (#1222)
See https://github.com/algesten/ureq/issues/478#issuecomment-1031029647
2022-02-07 10:38:08 +01:00
Emil Ernerfeldt
ace2ac00da Update to tts 0.20.2 which resolves copy-left license issue
See https://github.com/ndarilek/tts-rs/pull/21
2022-02-05 17:53:37 +01:00
Emil Ernerfeldt
712d8c9a2b
Run cargo deny in CI (#1205)
* Run cargo deny in CI
* Use patched fork of ureq to avoid copy-left license
* Use patched fork of tts to avoid LGPL license

More:
* https://github.com/ndarilek/tts-rs/pull/21
* https://github.com/algesten/ureq/pull/479
2022-02-04 22:08:15 +01:00
Emil Ernerfeldt
1b623fdd34 Update rfd 0.6 -> 0.7 2022-02-04 13:31:06 +01:00
Emil Ernerfeldt
47038c631e Update image 0.23 -> 0.24 2022-02-04 13:31:06 +01:00
Emil Ernerfeldt
8dfa6ce2f0 Update tts 0.19 -> 0.20 2022-02-04 13:18:03 +01:00
Emil Ernerfeldt
3999e5b373 cargo update
Updating crates.io index
    Removing anyhow v1.0.52
    Updating atk-sys v0.14.0 -> v0.15.1
    Updating backtrace v0.3.63 -> v0.3.64
    Updating cairo-sys-rs v0.14.9 -> v0.15.1
    Updating cfg-expr v0.8.1 -> v0.9.1
    Updating clang-sys v1.3.0 -> v1.3.1
    Updating crc32fast v1.3.0 -> v1.3.1
    Updating enum-map v2.0.0 -> v2.0.1
    Updating enum-map-derive v0.7.0 -> v0.8.0
    Updating gdk-pixbuf-sys v0.14.0 -> v0.15.1
    Updating gdk-sys v0.14.0 -> v0.15.1
    Updating gio-sys v0.14.0 -> v0.15.4
    Updating glib-sys v0.14.0 -> v0.15.4
    Updating gobject-sys v0.14.0 -> v0.15.1
    Updating gtk-sys v0.14.0 -> v0.15.3
    Updating heck v0.3.3 -> v0.4.0
    Updating js-sys v0.3.55 -> v0.3.56
    Updating libc v0.2.116 -> v0.2.117
    Updating lock_api v0.4.5 -> v0.4.6
    Updating mint v0.5.8 -> v0.5.9
    Updating nix v0.22.0 -> v0.22.3
      Adding num_threads v0.1.3
    Updating pango-sys v0.14.0 -> v0.15.1
    Updating quote v1.0.14 -> v1.0.15
    Updating rfd v0.6.3 -> v0.6.4
    Updating serde v1.0.133 -> v1.0.136
    Updating serde_derive v1.0.133 -> v1.0.136
    Updating serde_json v1.0.75 -> v1.0.78
    Removing strum v0.21.0
    Removing strum_macros v0.21.1
    Updating syn v1.0.85 -> v1.0.86
    Updating system-deps v3.2.0 -> v6.0.1
    Updating time v0.3.5 -> v0.3.7
    Updating tracing v0.1.29 -> v0.1.30
    Updating tracing-attributes v0.1.18 -> v0.1.19
    Updating tracing-core v0.1.21 -> v0.1.22
    Removing unicode-segmentation v1.8.0
      Adding valuable v0.1.0
    Updating version-compare v0.0.11 -> v0.1.0
    Updating wasm-bindgen-futures v0.4.28 -> v0.4.29
    Updating web-sys v0.3.55 -> v0.3.56
    Updating which v4.2.2 -> v4.2.4
      Adding windows v0.30.0
      Adding windows_aarch64_msvc v0.30.0
      Adding windows_i686_gnu v0.30.0
      Adding windows_i686_msvc v0.30.0
      Adding windows_x86_64_gnu v0.30.0
      Adding windows_x86_64_msvc v0.30.0
    Updating zbus v2.1.0 -> v2.1.1
    Updating zbus_macros v2.1.0 -> v2.1.1
2022-02-04 13:17:58 +01:00
Emil Ernerfeldt
c3be566574
egui-winit: Automatically detect and apply dark or light mode (#1045) 2022-02-02 17:09:36 +01:00
Emil Ernerfeldt
c6ac1827f6
Use tracing crate for logging (#1192)
* egui_web: use tracing crate
* egui_glow: use tracing crate
* Log at the debug level
* egui_demo_app: enable tracing to log to stdout
* Use tracing in egui-winit
* Add opt-in tracing support to egui
2022-02-01 12:27:39 +01:00
Emil Ernerfeldt
ef81a52951 egui_web: log panics using console.error 2022-01-31 19:14:50 +01:00
Jay Oster
ffa1b6bd43
egui-winit: re-enable window transparency (#1126)
`winit` 0.26.1 fixes the crash on Windows 11
2022-01-17 14:32:16 +01:00
Emil Ernerfeldt
b2c8cd0867 Simplify http demo and add new download_image eframe demo 2022-01-15 20:34:03 +01:00
Emil Ernerfeldt
66d80e2519
Texture loading in egui (#1110)
* Move texture allocation into epaint/egui proper
* Add TextureHandle
* egui_glow: cast using bytemuck instead of unsafe code
* Optimize glium painter
* Optimize WebGL
* Add example of loading an image from file
2022-01-15 13:59:52 +01:00
Lampsitter
d31f7d6522
Faster dashed line generation (#1027)
* Faster dashed lines generation

* Add dashed_line benchmark
2022-01-06 10:44:53 +01:00
Niklas Korz
01015ac94c
Use instant crate in egui-winit for WebAssembly support (#1023)
* Replace `std::time::Instant` with wasm-compatible `instant::Instant`

* Change version requirement for instant to be compatible to winit

* Enable wasm-bindgen feature for instant

* Update lockfile

* Update changelog

* sort dependencies

Co-authored-by: Emil Ernerfeldt <emil.ernerfeldt@gmail.com>
2022-01-03 22:13:53 +01:00
Emil Ernerfeldt
b5c119ef19
0.16.1 patch release: Add back CtxRef::begin_frame/end_frame (#1019)
`begin_frame`, `end_frame` is more convenient when using egui in a game engine. In particular, 0.16.0 was incompatible with https://github.com/mvlabat/bevy_egui>.
2021-12-31 11:45:57 +01:00
Emil Ernerfeldt
0146c7e7fc Release 0.16.0 - Context menus and rich text 2021-12-29 12:07:05 +01:00
Emil Ernerfeldt
037ca5f9cd update tts 0.17 -> 0.19 2021-12-29 10:56:16 +01:00
Emil Ernerfeldt
ffd28252ab cargo update 2021-12-29 10:49:40 +01:00
Jay Oster
dd99f68e82
Update winit to 0.26 (#930)
Also update glium, glutin and rfd
2021-12-20 22:44:53 +01:00
Emil Ernerfeldt
c71090473b glow-vs-web cleanup following https://github.com/emilk/egui/pull/868 2021-11-03 19:35:20 +01:00
Emil Ernerfeldt
08cc07bb2d Release 0.15.0 - Syntax highlighting, hscroll, egui-winit and egui_glow 2021-10-24 16:15:07 +02:00
Emil Ernerfeldt
4194a83a5e Update ron 0.6 -> 0.7 2021-10-23 05:53:58 +02:00
Emil Ernerfeldt
5301043a77 cargo update 2021-10-23 05:51:56 +02:00
Emil Ernerfeldt
5d463b2af7 Remove serde_json from egui dev-dependencies 2021-10-23 04:47:17 +02:00
Emil Ernerfeldt
8178d23d19
Deduplicate code found in both egui_glium and egui_glow (#819)
* Move window building to egui-winit

* Move icon loading to egui-winit

* `use glow::HasContext;` -> `use glow::HasContext as _;`

* Move FileStorage into epi behind a feature flag

* De-duplicate screen_size_in_pixels and native_pixels_per_point

* Move creation of FileStorage to epi

* Handle epi app output (window size changes etc) in egui-winit

* Move app and memory persistence and autosave logic to egui-winit

* fix check.sh

* Make the epi backend opt-in for egui_glium and egui_glow

* Fix persistence

* Add integration name to epi::IntegrationInfo and the demo

* Clean up Cargo.toml files and fix making egui_glium optional

* fix typo

* Make egui_glium compile without the `epi` feature
2021-10-19 21:40:55 +02:00
Emil Ernerfeldt
844dd9d7a4 Remove "seconds_since_midnight" from epi/eframe. Use chrono instead
chrono works both natively and on web.

Related: https://github.com/emilk/egui/issues/212
2021-10-19 15:37:20 +02:00
Emil Ernerfeldt
cdd4dccf5f
Add egui_glow as an opt-in backend to eframe (#817)
* Make egui_glow and opt-in backend for eframe

* Add egui_glow to Cargo.toml and to CI

* Reference egui_glow where egui_glium is mentioned

* Remove path-patches from root Cargo.toml

* Add instructions on how to enable the glow backend of eframe
2021-10-19 15:32:23 +02:00
Emil Ernerfeldt
22a3a75eb5 Optimization: replace HashSet uses with AHashSet 2021-10-09 14:15:45 +02:00
Stock84
cd2227814f
Implement bytemuck behind a feature (#775) 2021-10-07 22:30:15 +02:00
Emil Ernerfeldt
a1bf5aff47 Add Memory::caches for caching things from one frame to the next 2021-10-06 17:54:45 +02:00
Emil Ernerfeldt
f0868c2f07 Code editor demo: nice syntax highlighting with customizable theme 2021-10-01 21:29:33 +02:00
Emil Ernerfeldt
e2bdd40985 Move WindowSettings from egui_glium to egui-winit 2021-09-30 19:18:51 +02:00
Emil Ernerfeldt
3e1db880dc
Revert change to winit event loop in egui_glium (#756)
* Revert change to winit event loop in egui_glium

This reverts https://github.com/emilk/egui/pull/631

Fixes https://github.com/emilk/egui/issues/755

* Add example of file dialogs and file drag-and-drop

* fix ci
2021-09-30 18:53:41 +02:00
Emil Ernerfeldt
e2fa13ed2a cargo update 2021-09-28 20:46:28 +02:00
Emil Ernerfeldt
1b36863248
Split out new crate egui-winit from egui_glium (#735) 2021-09-28 17:33:28 +02:00
triangle drawer
203d571c8b
Add api for accessing backend texture via epi (#695)
* Define NativeTexture trait for offscreen rendering
add demo for NativeTexture trait

* write changelog

* add comment for native texture example

* formatting

* add license of Rust logo

* NativeTexture trait method rename
remove duplicate function with native texture
remove rust logo

* deprecated notice for register_glium_texture,register_webgl_texture

* collect deprecated notice
2021-09-05 11:00:45 +02:00
Emil Ernerfeldt
6902151a96 Add example of loading and showing an image with eframe/egui
Closes https://github.com/emilk/egui/pull/700
2021-09-04 17:44:01 +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
9598596bdc
Replace all http code in epi/eframe/egui_glium/egui_web with ehttp (#697)
I've extracted all the http request code and turned it
into its own crate at <https://github.com/emilk/ehttp>.

There was never a reason for the HTTP request library to be part of
`eframe`. Much better to have it as its own crate!
2021-09-03 21:04:43 +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
Emil Ernerfeldt
776770cdcd
Publish 0.14.2 (#670)
* Fix window resize bug introduced in `0.14.1`.

* tweak plot demo layout to allow more narrow window

* Release 0.14.2 - Window resize fix
2021-08-28 12:19:35 +02:00
Emil Ernerfeldt
2ce99f3a12 Release 0.14.1 - Bug fixes and better web blending 2021-08-28 11:04:39 +02:00
Emil Ernerfeldt
cb566fc295 Release 0.14.0 - Ui panels and bug fixes 2021-08-24 16:47:10 +02:00
sigaloid
12fd4906de
Update dependencies and pass all clippy's (#636)
* Cargo update

https://pastebin.com/raw/KWNuJD9u

* Cargo clippy +nightly

* Remove deprecated clippy

* Fix unbalanced backtick (now passes cargo {+nightly,} clippy)
2021-08-20 22:31:20 +02:00
mental
eefc56c213
fix and pin web-sys breakage in Navigator::clipboard (#608) 2021-08-15 16:55:33 +02:00
Emil Ernerfeldt
52e3663958 Release egui 0.13.1: Plot fixes 2021-06-28 11:05:27 +02:00
Emil Ernerfeldt
ccecad88b1 egui_glium and eframe 0.13.1: fix http feature and docs 2021-06-24 20:36:36 +02:00
Emil Ernerfeldt
d807451348 Release 0.13.0 - Better panels, plots and new visual style 2021-06-24 20:00:06 +02:00
Emil Ernerfeldt
eb6c293774 Update crates glium, tts, and run cargo update 2021-06-24 17:51:39 +02:00
Emil Ernerfeldt
1363ac4a24 demo: in font book, ask font what characters are supported
This replaces manual lists with a call to ab_glypgh::Font::codepoint_ids
plus names from the unicode_names2 crate.
2021-06-24 17:35:56 +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
6e7e88ba80
Use old 1.51 toolchain instead of bleeding edge (#505)
* Use old 1.51 toolchain instead of bleeding edge

1.52 and 1.53 has problems with incremental compilation,
so some people chose to stay on 1.51 for now.

So let's make sure egui supports 1.51 for a while!

* Update to cint 0.2.2 to get rust 1.51.0 compatability
2021-06-23 09:16:39 +02:00
Violeta Hernández
66095b69a7
Disable default features of ord-float (#440)
* Might fix #439

* `cargo update`

If the page builds, then this did fix it.
2021-05-27 20:25:30 +02:00
Gray Olson
c0929014bf
Add support for cint (conversions to and from color types) (#393)
* implement cint for color types under feature flag

* upgrade to cint 0.2, remove from default features

* upgrade to cint 0.2.1, add a couple more from/into implementations

* changelog entry

* fix typo in changelog

* sort dependency

* fmt
2021-05-20 20:09:52 +02:00
Emil Ernerfeldt
50a2ed0a14 Update wasm-bindgen to 0.2.74 2021-05-12 19:40:15 +02:00
Emil Ernerfeldt
8f8ba16696 Release 0.12.0 - Multitouch, user memory, window pivots, and improved plots 2021-05-10 18:27:39 +02:00
Emil Ernerfeldt
7747a1f171 Update tts 0.15 -> 0.16 2021-05-09 14:42:14 +02:00
Emil Ernerfeldt
c476ddb57c cargo update 2021-05-09 14:37:56 +02:00
Luis Wirth
87bc26fb5a
implement mint conversions (#352)
* Implement mint conversions

Implement conversions for [mint](https://docs.rs/mint) (math interoperability standard types).

- `impl {From, Into}<mint::Point2> for Pos2`
- `impl {From, Into}<mint::Vector2> for Vec2`

* Forward `mint` feature: egui -> epaint -> emath
2021-05-08 08:17:01 +02:00
ilya sheprut
186362a4b8
Arbitrary data in Memory using Any, fix #255 (#257)
* init work

* implement deferred deserialization

* many improvements
* rename `DataElement` -> `AnyMapElement`
* make `data` in `Memory` as public field of type with public interface
* make interface more rich
* transform most unwraps to proper error handling
* make `AnyMap` store by `TypeId`, so now individual type can be counted and reset

* improve storing TypeId between different rust versions

* rewrite system widgets to use AnyMap

* refactor everything
* replace `serde_json` -> `ron`
* move `any_map` to module
* separate `AnyMap` into `AnyMapId` and `serializable::AnyMapId` in order to not require `serde` traits in methods
* add `AnyMap` and `serializable::AnyMap` that stores elements just by type, without `Id`
* write documentation
* change tooltips and color picker to use `Memory::data_temp`

* fix bugs and docs

* Apply suggestions from code review

Co-authored-by: Emil Ernerfeldt <emil.ernerfeldt@gmail.com>

* rename `AnyMap` → `TypeMap`

* rename `AnyMapId` → `AnyMap`, add generic <Key> to it

* rename files `id_map` → `any_map`

* move out usages from `serializable` mod

* rename `ToDeserialize` → `Serialized`

* fix bug with counting

* add tests, and...
* rename `reset` → `remove`
* add function `remove_by_type`
* format code

* improve code
* make identical interface for serialized and simple maps
* make serialized maps serialized fully, without features by moving this into `Memory` struct with `#[cfg(feature = "persistence")]` under fields
* move `serialized::TypeId` into `AnyMapElement` struct

* fix pipeline and add one more test

* update docs

Co-authored-by: Emil Ernerfeldt <emil.ernerfeldt@gmail.com>
2021-04-12 21:53:32 +02:00
Emil Ernerfeldt
d544c3dd8b Release 0.11.0 - Optimization, screen reader & new layout logic 2021-04-05 14:49:06 +02:00
Emil Ernerfeldt
77014c7c75 cargo update 2021-04-05 14:23:42 +02:00
Emil Ernerfeldt
7792ee0422 Update tts from 0.14 -> 0.15 (screen reader feature) 2021-04-05 14:23:42 +02:00
Emil Ernerfeldt
aba2108159 Replace JSON with RON for persistence (epi/eframe/glium/web) 2021-04-05 14:23:42 +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
8e7d4ff4fd Upgrade wasm-bindgen 0.2.71 -> 0.2.72 2021-03-25 16:30:09 +01:00
Jay Oster
269bcdfce3
Replace clipboard with copypasta (#221)
- Fixes #146
2021-03-10 11:16:45 +01:00
Emil Ernerfeldt
44cd304cdf Add experimental screen_reader feature
Part of https://github.com/emilk/egui/issues/167
2021-03-08 20:58:01 +01:00
Emil Ernerfeldt
fb2db4940e Release 0.10.0 - Plot and polish 2021-02-28 20:11:37 +01:00
Emil Ernerfeldt
a9a49f19ca cargo update 2021-02-28 19:13:05 +01:00
Emil Ernerfeldt
b61db038f2 Release 0.9.0 - light mode, right clicks and more 2021-02-07 17:06:51 +01:00
Emil Ernerfeldt
d9472035d7 Update ahash 0.6.3 -> 0.7.0 2021-02-07 17:04:03 +01:00
Emil Ernerfeldt
7641807665 cargo update 2021-02-07 17:04:03 +01:00
Emil Ernerfeldt
29bb7c9f9d egui_demo_lib 0.8.1: export ColorTest 2021-01-19 17:13:29 +01:00
Emil Ernerfeldt
37a3fe7f76 Release 0.8.0 - Grid layout & new visual style 2021-01-17 15:28:52 +01:00
Emil Ernerfeldt
a229f581b9 cargo update 2021-01-17 15:01:25 +01:00
Emil Ernerfeldt
26d576f510 Break out mod paint into new crate epaint 2021-01-10 15:42:46 +01:00
Emil Ernerfeldt
a0b0f36d29 Move egui/math into new crate emath 2021-01-10 11:37:47 +01:00
Emil Ernerfeldt
d0d22ea09b Release 0.7.0 2021-01-04 15:52:29 +01:00
Emil Ernerfeldt
1bcf35d774 Update ureq to 2.0 2021-01-04 15:52:29 +01:00
Emil Ernerfeldt
5a15e573ea cargo update 2021-01-04 15:52:29 +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
2b2b9d5d28 cargo update 2021-01-02 16:18:43 +01:00
Emil Ernerfeldt
defad4ed51 Merge example_web into egui_demo_lib 2021-01-01 17:11:05 +01:00
Emil Ernerfeldt
9db1b8dbf9 Add http fetch to eframe and implement it in egui_glium using ureq 2020-12-30 20:56:50 +01:00
Emil Ernerfeldt
6d9cdafbc9 Rename egui_demo to egui_demo_app to avoid confusion with egui_demo_lib 2020-12-29 17:54:52 +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
6953dc7d5d Split out the Egui demo code to new crate egui_demo_lib 2020-12-29 13:40:11 +01:00
Emil Ernerfeldt
07e96ca17f Add syntax highlighting in egui web fetch example 2020-12-28 19:55:03 +01:00
Emil Ernerfeldt
dca7f85f21 Release Egui 0.6.0 2020-12-26 22:43:29 +01:00
Emil Ernerfeldt
085485b2f9 cargo update 2020-12-26 22:39:17 +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
d0f6954900 Combine demo_glium and demo_web into one egui_demo crate 2020-12-19 21:38:44 +01:00
Emil Ernerfeldt
8f034d391d [egui_glium] Your app state will auto-save to a good directory
Directory found with https://docs.rs/directories-next/2.0.0/directories_next/struct.ProjectDirs.html#method.data_dir
2020-12-19 21:06:59 +01:00
Emil Ernerfeldt
2fe1e99218 Remove example_glium
Look at https://github.com/emilk/egui_template instead
2020-12-19 19:25:55 +01:00
Emil Ernerfeldt
484e218e54 cargo update 2020-12-16 15:37:37 +01:00
Emil Ernerfeldt
8528d8c5f7 Update parking_lot_core
Required turning on features = ["wasm-bindgen"] in egui_web
2020-12-16 15:36:58 +01:00
Emil Ernerfeldt
f9fc1e8a23 update js-sys, wasm-bindgen and wasm-bindgen-futures 2020-12-16 11:46:54 +01:00
Emil Ernerfeldt
cfd18fd782 update serde_json 2020-12-16 11:39:51 +01:00
Emil Ernerfeldt
67785c173b update glium to 0.29 2020-12-16 11:38:36 +01:00
Emil Ernerfeldt
1453357800 update serde 2020-12-16 11:37:06 +01:00
Emil Ernerfeldt
f565535eca update ahash to 0.6.2 2020-12-16 11:36:56 +01:00
Emil Ernerfeldt
403e2dfe5f Release Egui 0.5.0
## 0.5.0 - 2020-12-13

### Added 

* Emoji support: 1216 different emojis that work in any text.
  * The Demo app comes with a Font Book to explore the available glyphs.
* `ui.horizontal_wrapped(|ui| ...)`: Add widgets on a row but wrap at `max_size`.
* `ui.horizontal_wrapped_for_text`: Like `ui.horizontal_wrapped`, but with spacing made for embedding text.
* `ui.horizontal_for_text`: Like `ui.horizontal`, but with spacing made for embedding text.
* `egui::Layout` now supports justified layouts where contents is _also_ centered, right-aligned, etc.
* `ui.allocate_ui(size, |ui| ...)`: Easily create a child-`Ui` of a given size.
* `SelectableLabel` (`ui.selectable_label` and `ui.selectable_value`): A text-button that can be selected.
* `ui.small_button`: A smaller button that looks good embedded in text.
* `ui.drag_angle_tau`: For those who want to specify angles as fractions of τ (a full turn).
* Add `Resize::id_source` and `ScrollArea::id_source` to let the user avoid Id clashes.

### Changed 🔧

* New default font: [Ubuntu-Light](https://fonts.google.com/specimen/Ubuntu).
* Make it simpler to override fonts in `FontDefinitions`.
* Remove minimum button width.
* Refactor `egui::Layout` substantially, changing its interface.
* Calling `on_hover_text`/`on_hover_ui` multiple times will stack tooltips underneath the previous ones.
* Text wrapping on labels, buttons, checkboxes and radio buttons is now based on the layout.

### Removed 🔥

* Removed the `label!` macro.
2020-12-13 21:15:57 +01:00
Emil Ernerfeldt
49b0b06739 Revert "cargo update"
This reverts commit 174c938d18.

This is because some dependency stopped wasm-bindgen with the following message:

    error: cannot import from modules (`env`) with `--no-modules`

and I don't want to spend the rest of the evening figuring out why
2020-12-13 20:25:40 +01:00
Emil Ernerfeldt
174c938d18 cargo update 2020-12-12 20:42:33 +01:00
Emil Ernerfeldt
a7e7826d2c Release 0.4.0 of egui, egui_web and egui_glium 2020-11-28 13:47:00 +01:00
Emil Ernerfeldt
ac03242ec3 cargo update 2020-11-28 12:50:18 +01:00
Emil Ernerfeldt
8e6c8ce50e Update ahash to 0.6 2020-11-28 11:05:55 +01:00
Emil Ernerfeldt
0c9bdb8ae8 cargo update 2020-11-20 12:29:23 +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
0cb3bb791b Add example_web app 2020-11-17 23:24:14 +01:00
Emil Ernerfeldt
7651e2f15b egui_web: Implement copy, cut and paste 2020-11-15 21:20:38 +01:00
Emil Ernerfeldt
b6dcae4651 Update versions to 0.3.0 2020-11-07 14:47:22 +01:00
Emil Ernerfeldt
f46aa92eba Revert to aHash 0.4 again to allow Egui to be used inside of wasmtime 2020-11-07 14:35:42 +01:00
Emil Ernerfeldt
901a6920be cargo update 2020-11-06 09:34:57 +01:00
Emil Ernerfeldt
8393d1df47 Upgrade ahash from 0.4 to 0.5 2020-11-06 09:33:36 +01:00
Sam Samai
a79aaa76a4
Downgrade ahash for wasm build (#35)
Seems like getrandom doesn't see wasm32-unknown-unknown as a valid target.
Dropping ahash, which has the getrandom dependency, to version 0.4.6 fixes this for now.
2020-10-29 11:48:39 +01:00
Emil Ernerfeldt
a4ce2afcd8 Update dependencies 2020-10-27 14:40:48 +01:00
Emil Ernerfeldt
a0b8f83846 cargo update 2020-10-10 14:01:03 +02:00
Emil Ernerfeldt
42b433a204 [release] bump version numbers to 0.2.0 2020-10-10 14:00:07 +02:00
Emil Ernerfeldt
dbbe1cf063 Update to glium 0.28 2020-10-08 16:23:47 +02:00
Emil Ernerfeldt
3444666806 cargo update 2020-10-08 16:19:33 +02:00
Emil Ernerfeldt
b9a3240ca3 Bump Egui version to 0.1.4 2020-09-08 09:47:42 +02:00
Emil Ernerfeldt
ef5eb4a465 cargo update 2020-09-08 09:27:20 +02:00
Emil Ernerfeldt
2c96cbfa9c [dependencies] turn off optional ahash features to reduce dependencies 2020-09-03 23:04:19 +02:00
Emil Ernerfeldt
843074eb7d cargo update 2020-08-30 08:22:35 +02:00
Emil Ernerfeldt
b58142ba15 Update versions to 0.1.3 2020-08-09 17:30:12 +02:00
Emil Ernerfeldt
eb713ac514 [build] use path dependencies in all Cargo.toml 2020-07-30 12:14:51 +02:00
Emil Ernerfeldt
554e6e7120 [app] unify web and glium demo app 2020-07-23 19:04:23 +02:00
Emil Ernerfeldt
61cdec8fca [refactor] rename 'example' to 'demo', and add simple example_glium 2020-07-23 12:18:19 +02:00
Emil Ernerfeldt
4e52a960e5 [glium] refactor and simplify glium example code 2020-07-22 12:10:14 +02:00
Emil Ernerfeldt
9b9cd01c5c [glium] update to latest glium with EventLoop and vsync 2020-07-22 00:36:17 +02:00
Emil Ernerfeldt
dfa4d52a94 [web] move all reusable web code into egui_web 2020-07-18 18:35:17 +02:00
Emil Ernerfeldt
1a4c399e41 [web] port all remaining JS code to Rust 2020-07-18 18:00:05 +02:00
Emil Ernerfeldt
8dced5896c rename egui_wasm to egui_web 2020-07-17 12:55:07 +02:00
Emil Ernerfeldt
c204922a3a update some crates 2020-07-17 09:45:28 +02:00
Emil Ernerfeldt
2dea2ee668 update Cargo.lock to 0.1.2 2020-06-10 17:11:44 +02:00
Emil Ernerfeldt
d0f5181197 [window] make resizing a bit smoother 2020-06-03 21:14:47 +02:00
Emil Ernerfeldt
b80baf4039 [egui] make serde an optional dependency 2020-05-30 11:04:40 +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
96e6f1f3fc [optimize] switch to ahash for ids and most maps and sets 2020-05-24 11:36:24 +02:00
Emil Ernerfeldt
ae6080405c Remove 'Web' from GuiInput 2020-05-21 12:04:42 +02:00
Emil Ernerfeldt
d5d6c48974 cargo update 2020-05-20 21:36:16 +02:00
Emil Ernerfeldt
7a9fb94029 Add a benchmark 2020-05-20 21:21:25 +02:00
Emil Ernerfeldt
71154edf9b Add a fractal clock example to showcase painting performance 2020-05-11 20:21:24 +02:00