Commit Graph

171 Commits

Author SHA1 Message Date
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