egui/CHANGELOG.md

291 lines
13 KiB
Markdown
Raw Normal View History

# egui changelog
All notable changes to the egui crate will be documented in this file.
2020-12-10 22:52:51 +00:00
NOTE: [`eframe`](eframe/CHANGELOG.md), [`egui_web`](egui_web/CHANGELOG.md) and [`egui_glium`](egui_glium/CHANGELOG.md) has their own changelogs!
2020-12-15 13:26:01 +00:00
## Unreleased
### Added ⭐
* Add anchors to windows and areas so you can put a window in e.g. the top right corner.
* Make labels interactive with `Label::sense(Sense::click())`.
* Add `Response::request_focus` and `Response::surrender_focus`.
2021-04-21 20:01:34 +00:00
* [Pan and zoom plots](https://github.com/emilk/egui/pull/317).
* [Users can now store custom state in `egui::Memory`.](https://github.com/emilk/egui/pull/257).
2021-04-15 08:31:24 +00:00
### Changed 🔧
* Make `Memory::has_focus` public (again).
2021-04-21 20:01:34 +00:00
* `Plot` must now be given a name that is unique within its scope.
2021-04-15 08:31:24 +00:00
### Fixed 🐛
* Fix [defocus-bug on touch screens](https://github.com/emilk/egui/issues/288).
* Fix bug with the layout of wide `DragValue`:s.
## 0.11.0 - 2021-04-05 - Optimization, screen reader & new layout logic
### Added ⭐
* You can now give focus to any clickable widget with tab/shift-tab.
* Use space or enter to click the selected widget.
* Use arrow keys to adjust sliders and `DragValue`s.
* egui will now output events when widgets gain keyboard focus.
* This can be hooked up to a screen reader to aid the visually impaired
* Add the option to restrict the dragging bounds of `Window` and `Area` to a specified area using `drag_bounds(rect)`.
2021-03-27 09:37:31 +00:00
* Add support for small and raised text.
* Add `ui.set_row_height`.
* Add `DebugOptions::show_widgets` to debug layouting by hovering widgets.
2021-03-27 09:37:31 +00:00
* Add `ComboBox` to more easily customize combo boxes.
* Add `Slider::new` and `DragValue::new` to replace old type-specific constructors.
* Add `TextEdit::password` to hide input characters.
2021-03-27 09:37:31 +00:00
### Changed 🔧
* `ui.advance_cursor` is now called `ui.add_space`.
* `kb_focus` is now just called `focus`.
2021-03-27 09:37:31 +00:00
### Fixed 🐛
* Fix some bugs related to centered layouts.
* Fixed secondary-click to open a menu.
* [Fix panic for zero-range sliders and zero-speed drag values](https://github.com/emilk/egui/pull/216).
* Fix false id clash error for wrapping text.
* Fix bug that would close a popup (e.g. the color picker) when clicking inside of it.
2021-03-27 09:37:31 +00:00
### Deprecated ☢️
* Deprectated `combo_box_with_label` in favor of new `ComboBox`.
* Deprectated type-specific constructors for `Slider` and `DragValue` (`Slider::f32`, `DragValue::usize` etc).
2021-02-28 19:01:18 +00:00
## 0.10.0 - 2021-02-28 - Plot and polish
<img src="media/egui-0.10-plot.gif" width="50%">
2021-02-14 20:39:04 +00:00
### Added ⭐
2021-02-20 09:45:19 +00:00
* Add `egui::plot::Plot` to plot some 2D data.
2021-02-20 08:23:38 +00:00
* Add `Ui::hyperlink_to(label, url)`.
* Sliders can now have a value prefix and suffix (e.g. the suffix `"°"` works like a unit).
* `Context::set_pixels_per_point` to control the scale of the UI.
* Add `Response::changed()` to query if e.g. a slider was dragged, text was entered or a checkbox was clicked.
* Add support for all integers in `DragValue` and `Slider` (except 128-bit).
2021-02-14 20:39:04 +00:00
2021-02-20 09:33:33 +00:00
### Changed 🔧
* Improve the positioning of tooltips.
2021-02-20 09:45:19 +00:00
* Only show tooltips if mouse is still.
* `Slider` will now show the value display by default, unless turned off with `.show_value(false)`.
* The `Slider` value is now a `DragValue` which when dragged can pick values outside of the slider range (unless `clamp_to_range` is set).
2021-02-20 09:33:33 +00:00
2021-02-14 20:39:04 +00:00
## 0.9.0 - 2021-02-07 - Light Mode and much more
<img src="media/0.9.0-disabled.gif" width="50%">
2021-02-14 20:39:04 +00:00
### Added ⭐
* Add support for secondary and middle mouse buttons.
2021-01-30 13:48:36 +00:00
* Add `Label` methods for code, strong, strikethrough, underline and italics.
* Add `ui.group(|ui| { … })` to visually group some widgets within a frame.
* Add `Ui` helpers for doing manual layout (`ui.put`, `ui.allocate_ui_at_rect` and more).
* Add `ui.set_enabled(false)` to disable all widgets in a `Ui` (grayed out and non-interactive).
* Add `TextEdit::hint_text` for showing a weak hint text when empty.
* `egui::popup::popup_below_widget`: show a popup area below another widget.
2021-01-25 18:55:08 +00:00
* Add `Slider::clamp_to_range(bool)`: if set, clamp the incoming and outgoing values to the slider range.
* Add: `ui.spacing()`, `ui.spacing_mut()`, `ui.visuals()`, `ui.visuals_mut()`.
2021-02-03 18:38:50 +00:00
* Add: `ctx.set_visuals()`.
* You can now control text wrapping with `Style::wrap`.
2021-02-06 15:54:38 +00:00
* Add `Grid::max_col_width`.
### Changed 🔧
* Text will now wrap at newlines, spaces, dashes, punctuation or in the middle of a words if necessary, in that order of priority.
* Widgets will now always line break at `\n` characters.
2021-02-06 15:54:38 +00:00
* Widgets will now more intelligently choose wether or not to wrap text.
* `mouse` has been renamed `pointer` everywhere (to make it clear it includes touches too).
* Most parts of `Response` are now methods, so `if ui.button("…").clicked {` is now `if ui.button("…").clicked() {`.
* `Response::active` is now gone. You can use `response.dragged()` or `response.clicked()` instead.
* Backend: pointer (mouse/touch) position and buttons are now passed to egui in the event stream.
* `DragValue::range` is now called `clamp_range` and also clamps incoming values.
2021-01-25 20:23:24 +00:00
* Renamed `Triangles` to `Mesh`.
2021-03-28 20:44:03 +00:00
* The tessellator now wraps the clip rectangle and mesh in `struct ClippedMesh(Rect, Mesh)`.
* `Mesh::split_to_u16` now returns a 16-bit indexed `Mesh16`.
### Fixed 🐛
* It is now possible to click widgets even when FPS is very low.
* Tessellator: handle sharp path corners better (switch to bevel instead of miter joints for > 90°).
## 0.8.0 - 2021-01-17 - Grid layout & new visual style
<img src="media/widget_gallery_0.8.0.gif" width="50%">
### Added ⭐
* Added a simple grid layout (`Grid`).
* Added `ui.allocate_at_least` and `ui.allocate_exact_size`.
* Added function `InputState::key_down`.
* Added `Window::current_pos` to position a window.
2021-01-04 14:38:57 +00:00
### Changed 🔧
* New simpler and sleeker look!
2021-01-10 10:43:01 +00:00
* Rename `PaintCmd` to `Shape`.
* Replace tuple `(Rect, Shape)` with tuple-struct `ClippedShape`.
* Rename feature `"serde"` to `"persistence"`.
* Break out the modules `math` and `paint` into separate crates `emath` and `epaint`.
### Fixed 🐛
* Fixed a bug that would sometimes trigger a "Mismatching panels" panic in debug builds.
* `Image` and `ImageButton` will no longer stretch to fill a justified layout.
2021-01-17 09:52:01 +00:00
2021-01-04 14:38:57 +00:00
## 0.7.0 - 2021-01-04
### Added ⭐
* Add `ui.scroll_to_cursor` and `response.scroll_to_me` ([#81](https://github.com/emilk/egui/pull/81) by [lucaspoffo](https://github.com/lucaspoffo)).
* Add `window.id(…)` and `area.id(…)` for overriding the default `Id`.
### Changed 🔧
2021-01-02 16:02:18 +00:00
* Renamed `Srgba` to `Color32`.
* All color contructions now starts with `from_`, e.g. `Color32::from_rgb`.
* Renamed `FontFamily::VariableWidth` to `FontFamily::Proportional`.
2021-01-02 16:02:18 +00:00
* Removed `pixels_per_point` from `FontDefinitions`.
### Fixed 🐛
* `RepaintSignal` now implements `Sync` so it can be sent to a background thread.
* `TextEdit` widgets are now slightly larger to accommodate their frames.
2021-03-27 09:37:31 +00:00
### Deprecated ☢️
* Deprecated `color::srgba`.
2020-12-26 21:43:29 +00:00
## 0.6.0 - 2020-12-26
### Added ⭐
* Turn off `Window` title bars with `window.title_bar(false)`.
* `ImageButton` - `ui.add(ImageButton::new(...))`.
* `ui.vertical_centered` and `ui.vertical_centered_justified`.
2020-12-19 10:14:21 +00:00
* `ui.allocate_painter` helper.
* Mouse-over explanation to duplicate ID warning.
* You can now easily constrain egui to a portion of the screen using `RawInput::screen_rect`.
* You can now control the minimum and maixumum number of decimals to show in a `Slider` or `DragValue`.
2020-12-25 11:22:10 +00:00
* Add `egui::math::Rot2`: rotation helper.
2020-12-26 10:19:39 +00:00
* `Response` now contains the `Id` of the widget it pertains to.
* `ui.allocate_response` that allocates space and checks for interactions.
2020-12-26 21:43:29 +00:00
* Add `response.interact(sense)`, e.g. to check for clicks on labels.
### Changed 🔧
* `ui.allocate_space` now returns an `(Id, Rect)` tuple.
* `Arc<Context>` has been replaced with `CtxRef` everywhere.
* Slight tweak of the default `Style` and font sizes.
* `SidePanel::left` and `TopPanel::top` now takes `impl Hash` as first argument.
* A `Window` may now cover an existing `CentralPanel`.
* `ui.image` now takes `impl Into<Vec2>` as a `size` argument.
2020-12-16 20:22:45 +00:00
* Made some more fields of `RawInput` optional.
* `Slider` and `DragValue` uses fewer decimals by default. See the full precision by hovering over the value.
* `egui::App`: added `fn name(&self)` and `fn clear_color(&self)`.
* Combo boxes has scroll bars when needed.
* Expand `Window` + `Resize` containers to be large enough for last frames content
* `ui.columns`: Columns now defaults to justified top-to-down layouts.
* Rename `Sense::nothing()` to `Sense::hover()`.
2020-12-26 21:43:29 +00:00
* Replaced `parking_lot` dependency with `atomic_refcell` by default.
### Fixed 🐛
* The background for `CentralPanel` will now cover unused space too.
* `ui.columns`: Improve allocated size estimation.
2021-03-27 09:37:31 +00:00
### Deprecated ☢️
* `RawInput::screen_size` - use `RawInput::screen_rect` instead.
* left/centered/right column functions on `Ui`.
2020-12-26 10:19:39 +00:00
* `ui.interact_hover` and `ui.hovered`.
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 20:15:57 +00:00
## 0.5.0 - 2020-12-13
### Added ⭐
2020-12-13 19:00:46 +00:00
* Emoji support: 1216 different emojis that work in any text.
2020-12-12 19:04:32 +00:00
* 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.
2020-12-09 21:27:17 +00:00
* `egui::Layout` now supports justified layouts where contents is _also_ centered, right-aligned, etc.
2020-12-13 19:00:46 +00:00
* `ui.allocate_ui(size, |ui| ...)`: Easily create a child-`Ui` of a given size.
2020-12-09 21:27:17 +00:00
* `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.
2020-12-13 19:19:45 +00:00
* `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 🔧
2020-12-13 19:00:46 +00:00
* 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.
2020-11-30 06:55:00 +00:00
2020-12-10 09:15:25 +00:00
### Removed 🔥
2020-12-13 19:00:46 +00:00
* Removed the `label!` macro.
2020-12-10 09:15:25 +00:00
2020-12-15 13:26:01 +00:00
## 0.4.0 - 2020-11-28
### Added ⭐
2020-11-15 17:14:41 +00:00
* `TextEdit` improvements:
* Much improved text editing, with better navigation and selection.
* Move focus between `TextEdit` widgets with tab and shift-tab.
* Undo edtis in a `TextEdit`.
* You can now check if a `TextEdit` lost keyboard focus with `response.lost_focus`.
2020-11-15 17:14:41 +00:00
* Added `ui.text_edit_singleline` and `ui.text_edit_multiline`.
* You can now debug why your `Ui` is unexpectedly wide with `ui.style_mut().debug.show_expand_width = true;`
### Changed 🔧
* Pressing enter in a single-line `TextEdit` will now surrender keyboard focus for it.
* You must now be explicit when creating a `TextEdit` if you want it to be singeline or multiline.
* Improved automatic `Id` generation, making `Id` clashes less likely.
* egui now requires modifier key state from the integration
2020-11-15 13:21:21 +00:00
* Added, renamed and removed some keys in the `Key` enum.
* Fixed incorrect text wrapping width on radio buttons
### Fixed 🐛
* Fixed bug where a lost widget could still retain keyboard focus.
2020-12-15 13:26:01 +00:00
## 0.3.0 - 2020-11-07
### Added ⭐
* Panels: you can now create panels using `SidePanel`, `TopPanel` and `CentralPanel`.
* You can now override the default egui fonts.
* Add ability to override text color with `visuals.override_text_color`.
* The demo now includes a simple drag-and-drop example.
* The demo app now has a slider to scale all of egui.
### Changed 🔧
* `ui.horizontal(...)` etc returns `Response`.
* Refactored the interface for `egui::app::App`.
* Windows are now constrained to the screen.
* `Context::begin_frame()` no longer returns a `Ui`. Instead put your widgets into a `SidePanel`, `TopPanel`, `CentralPanel`, `Window` or `Area`.
2021-01-10 10:43:01 +00:00
* `Context::end_frame()` now returns shapes that need to be converted to triangles with `Context::tessellate()`.
* Anti-aliasing is now off by default in debug builds.
### Removed 🔥
* You can no longer throw windows.
### Fixed 🐛
* Fix a bug where some regions would slowly grow for non-integral scales (`pixels_per_point`).
2020-12-15 13:26:01 +00:00
## 0.2.0 - 2020-10-10
* Color picker
* Unicode characters in labels (limited by [what the default font supports](https://fonts.google.com/specimen/Comfortaa#glyphs))
2020-09-25 12:43:16 +00:00
* Simple drop-down combo box menu
* Logarithmic sliders
2020-12-28 23:51:27 +00:00
* Optimization: coarse culling in the tessellator
* CHANGED: switch argument order of `ui.checkbox` and `ui.radio`
## 0.1.4 - 2020-09-08
This is when I started the CHANGELOG.md, after almost two years of development. Better late than never.
* Widgets: label, text button, hyperlink, checkbox, radio button, slider, draggable value, text editing
* Layouts: horizontal, vertical, columns
* Text input: very basic, multiline, copy/paste
* Windows: move, resize, name, minimize and close. Automatically sized and positioned.
* Regions: resizing, vertical scrolling, collapsing headers (sections)
* Rendering: Anti-aliased rendering of lines, circles, text and convex polygons.
* Tooltips on hover