Emil Ernerfeldt
0942a2aa3b
[epaint] Tessellator: handle sharp path corners better
...
Switch to bevel joints instead of miter joints for > 90° corners
2021-02-04 18:46:36 +01:00
Emil Ernerfeldt
0f37b009d6
Add TextEdit::hint_text for showing a weak hint text when empty
2021-02-03 21:06:50 +01:00
Emil Ernerfeldt
af3195f086
Add ctx.set_visuals()
2021-02-03 19:38:50 +01:00
Emil Ernerfeldt
829455b347
Add ui.group(|ui| { … })
to visually group some widgets within a frame
2021-02-03 00:25:07 +01:00
Emil Ernerfeldt
ca886ea998
Add ui.visuals() as short for ui.style().visuals
2021-02-03 00:20:39 +01:00
Emil Ernerfeldt
01fca2f31c
Add Ui::spacing() and Ui::spacing_mut() as shortcuts
2021-02-01 16:56:29 +01:00
Emil Ernerfeldt
b647592a5a
Wrap text at dashes, punctuations or anywhere if necessary
...
Closes https://github.com/emilk/egui/issues/55
Supersedes https://github.com/emilk/egui/pull/104
2021-01-31 15:57:19 +01:00
Emil Ernerfeldt
c50190a7e8
Add fake italics (tilt text)
2021-01-30 15:55:40 +01:00
Emil Ernerfeldt
d249ed86ba
Add Label
methods for code, strong, strikethrough and underline
2021-01-30 15:51:19 +01:00
Emil Ernerfeldt
2a10747843
Mesh::split_to_u16 now returns a 16-bit indexed Mesh16
2021-01-25 22:06:06 +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
6d57a24f35
Add Slider::clamp_to_range(bool)
2021-01-25 19:55:08 +01:00
Emil Ernerfeldt
2219e135fa
Rename DragValue::range to clamp_range and also clamp incoming values
2021-01-25 19:45:59 +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
3bec7c4f68
add popup_below_widget to show a popup area below another widget
...
Closes https://github.com/emilk/egui/issues/122
2021-01-20 23:10:56 +01:00
Emil Ernerfeldt
37a3fe7f76
Release 0.8.0 - Grid layout & new visual style
2021-01-17 15:28:52 +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
1f2aebc25a
Improve documentation
2021-01-17 12:24:13 +01:00
Emil Ernerfeldt
8598c365a1
[epaint] Replace tuple (Rect, Shape) with tuple-struct ClippedShape
2021-01-17 01:40:14 +01:00
Emil Ernerfeldt
620e43d483
New sleeker visual style
...
Remove a lot of borders, remove transparency, simplify and unify.
2021-01-15 22:23:08 +01:00
Emil Ernerfeldt
795906bb24
Add Window::current_pos to position a winodw
2021-01-13 23:19:36 +01:00
Emil Ernerfeldt
e9f8e5d6a3
Update changelog with InputState::key_down
2021-01-13 22:08:35 +01:00
Emil Ernerfeldt
0b10fa5c29
Grid layout and widget gallery ( #106 )
...
* Wrap Layout and Region into a new struct Placer
* [egui] Add a simple grid layout
* Refactor CollapsingHeader code (simplify header painting)
* Fix: allow putting a CollapsingHeader inside of a grid layout
* [demo] Add a widget gallery
Closes https://github.com/emilk/egui/issues/88
* Add optional striped grid background
2021-01-11 20:58:36 +01:00
Emil Ernerfeldt
d344c9d9a3
Image and ImageButton will no longer stretch to fill a justified layout
2021-01-11 18:14:34 +01:00
Emil Ernerfeldt
26d576f510
Break out mod paint into new crate epaint
2021-01-10 15:42:46 +01:00
Emil Ernerfeldt
fb2317c993
Rename PaintCmd
to Shape
2021-01-10 11:43:01 +01:00
Emil Ernerfeldt
a0b0f36d29
Move egui/math into new crate emath
2021-01-10 11:37:47 +01:00
Emil Ernerfeldt
e079ac5b46
Center window titles
2021-01-10 10:43:47 +01:00
Emil Ernerfeldt
987c7ddf98
Make size and alignment of emoji-icon-font match the rest of the fonts
...
This is done via a hack (for now).
2021-01-10 10:43:27 +01:00
Emil Ernerfeldt
e413e5e3e9
Fix precision issue in panel space allocation debug sanity check
...
Closes https://github.com/emilk/egui/issues/99
2021-01-07 18:31:19 +01:00
Emil Ernerfeldt
b4871e2aef
Add ui.allocate_at_least and ui.allocate_exact_size
2021-01-06 11:03:29 +01:00
Emil Ernerfeldt
d0d22ea09b
Release 0.7.0
2021-01-04 15:52:29 +01:00
Emil Ernerfeldt
10a23d18e1
Support additive colors in color picker
2021-01-03 18:16:12 +01:00
Emil Ernerfeldt
5c8df6925d
TextEdit widgets are now slightly larger to accommodate their frames
...
Fixes https://github.com/emilk/egui/issues/89
2021-01-03 16:22:10 +01:00
Emil Ernerfeldt
25b8a8ebfd
Add window.id(…) and area.id(…) for overriding the default Id
2021-01-03 00:12:15 +01:00
Emil Ernerfeldt
64dd186daf
Deprecate color::srgba function. Use Color32::from_rgb etc instead.
2021-01-02 17:06:26 +01:00
Emil Ernerfeldt
73f3d8cf46
Rename Srgba to Color32
2021-01-02 17:02:18 +01:00
Emil Ernerfeldt
4e3251c300
Improve ecosystem documentation and add changelogs for epi and eframe
2021-01-02 11:59:20 +01:00
Emil Ernerfeldt
d7e03cb186
Add changelog for new manual scrolling additions
...
https://github.com/emilk/egui/pull/81
2020-12-29 12:20:29 +01:00
Emil Ernerfeldt
d38b16f1ea
Learn how to spell to "tessellation"
2020-12-29 12:18:41 +01:00
Emil Ernerfeldt
69ffa9be35
Remove pixels_per_point
from FontDefinitions
2020-12-27 23:09:51 +01:00
Emil Ernerfeldt
847f67c835
Rename FontFamily::VariableWidth to FontFamily::Proportional
2020-12-27 14:19:20 +01:00
Emil Ernerfeldt
958fc2753a
RepaintSignal now implements Sync so it can be sent to another thread
...
Fixes https://github.com/emilk/egui/issues/82
2020-12-27 10:49:26 +01:00
Emil Ernerfeldt
dca7f85f21
Release Egui 0.6.0
2020-12-26 22:43:29 +01:00
Emil Ernerfeldt
db3fdbe6d3
Add response.interact(sense), e.g. to check for clicks on labels
2020-12-26 22:05:56 +01:00
Emil Ernerfeldt
58fcf0f2a1
Changed: ui.allocate_painter returns a Response
2020-12-26 19:50:18 +01:00
Emil Ernerfeldt
48dfcde65f
Add ui.allocate_response(…): allocate space and check for interactions
2020-12-26 19:14:13 +01:00
Emil Ernerfeldt
66ae0ed7b9
Add Id to Response
2020-12-26 11:28:55 +01:00
Emil Ernerfeldt
a2ab35bab8
Rename Sense::nothing()
to Sense::hover()
2020-12-26 02:09:32 +01:00
Emil Ernerfeldt
b65e6327ab
ui.allocate_space now returns an (Id, Rect) tuple
2020-12-26 01:38:26 +01:00
Emil Ernerfeldt
cd7abb457f
Expand Window + Resize areas to be large enough for last frames content
2020-12-25 15:41:18 +01:00
Emil Ernerfeldt
997cd4b279
ui.columns: Improve allocated size estimation + justified layous
...
Closes https://github.com/emilk/egui/issues/76
2020-12-25 15:34:33 +01:00
Emil Ernerfeldt
38e36fd806
Combo boxes has a scroll area
...
Closes https://github.com/emilk/egui/issues/75
2020-12-25 13:18:47 +01:00
Emil Ernerfeldt
36c15c4e41
Add egui::math::Rot2 rotation helper
2020-12-25 12:27:34 +01:00
Emil Ernerfeldt
01c65b0dcb
Replace Arc<Context> with struct CtxRef
2020-12-19 14:48:04 +01:00
Emil Ernerfeldt
ce0ea74c9f
Fix: The background of CentralPanel will now cover unused space too
2020-12-19 11:17:21 +01:00
Emil Ernerfeldt
ea10add1cb
Deprecate left/centered/right column functions in Ui
2020-12-19 11:14:59 +01:00
Emil Ernerfeldt
1e1bfa4dc7
Add ui.allocate_painter helper
2020-12-19 11:14:21 +01:00
Emil Ernerfeldt
58f36eb6ef
A Window
may now cover an existing CentralPanel
2020-12-18 23:45:33 +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
b0e17638df
trait App now has fn name() for specifying egui_glium window title
2020-12-18 22:30:59 +01:00
Emil Ernerfeldt
d022765a3c
Improve decimal logic for Slider and DragValue
...
* You can now control the minimum and maixumum number of decimals to show in a `Slider` or `DragValue`.
* `Slider` and `DragValue` uses fewer decimals by default. See the full precision by hovering over the value.
2020-12-18 10:21:00 +01:00
Emil Ernerfeldt
d6d9c4828e
Turn off Window
title bars with window.title_bar(false)
...
You can still resize and move them assuming there is some area that
does not steal the drag input. In particular, if a scroll area covers
the window than dragging the window contents will scroll, not move it.
Closes https://github.com/emilk/egui/issues/66
2020-12-16 23:48:23 +01:00
Emil Ernerfeldt
8af83bf93f
Slight tweak of the default Style
and font sizes
2020-12-16 21:56:24 +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
91e5295db2
Add mouse-over explanation to duplicate ID warning
2020-12-16 20:29:46 +01:00
Emil Ernerfeldt
0e0beece44
SidePanel::left and TopPanel::top now takes impl Hash
instead of Id
2020-12-15 15:13:12 +01:00
Emil Ernerfeldt
18ebac116f
Add widget ImageButton
2020-12-15 14:52:24 +01:00
Emil Ernerfeldt
b508f931c2
Add ui.vertical_centered and ui.vertical_centered_justified
2020-12-15 14:51:23 +01:00
Emil Ernerfeldt
273d466f19
Nicer spacing in changelogs
2020-12-15 14:51:23 +01:00
Emil Ernerfeldt
7710308e09
ui.image
now takes impl Into<Vec2>
as a size
argument
2020-12-15 14:50:24 +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
f387b097cd
Add ui.drag_angle_tau
2020-12-13 20:19:45 +01:00
Emil Ernerfeldt
517b34509b
Clean up CHANGELOG.md
2020-12-13 20:00:46 +01:00
Emil Ernerfeldt
b7d1584f44
Simplify how fonts are defined in FontDefinitions
2020-12-13 19:29:02 +01:00
Emil Ernerfeldt
5880c95158
ui.horizontal_for_text: Size and spacing made for text
2020-12-13 18:14:18 +01:00
Emil Ernerfeldt
b15bd76596
Pick default multiline on Labels based on layout and if text contains \n
2020-12-13 13:57:17 +01:00
Emil Ernerfeldt
273212a63c
on_hover_text/ui many times will stack tooltips beneath the previous
2020-12-13 13:14:58 +01:00
Emil Ernerfeldt
35e8a3b4ca
Update CHANGELOG.md and TODO.md
2020-12-12 20:04:32 +01:00
Emil Ernerfeldt
b0d0d5dd55
[button] Remove minimum button width
2020-12-12 19:31:32 +01:00
Emil Ernerfeldt
8c82eb1970
Add CHANGELOG.md for egui_glium
2020-12-10 23:52:51 +01:00
Emil Ernerfeldt
042125c8e4
Update CHANGELOG.md
2020-12-10 23:24:48 +01:00
Emil Ernerfeldt
6e8d5c87a0
Add Resize::id_source and ScrollArea::id_source
2020-12-10 10:28:30 +01:00
Emil Ernerfeldt
6de93cb0ec
Remove the label! macro
2020-12-10 10:15:25 +01:00
Emil Ernerfeldt
428e2373e5
Change default font to Ubuntu-Light
2020-11-30 07:55:00 +01:00
Emil Ernerfeldt
4ecb7d14ca
New widget: SelectableLabel
: a text-button that can be selected
...
Also available via `ui.selectable_label` and `ui.selectable_value`
2020-11-30 07:17:03 +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
aab1b351ab
Fixed incorrect text wrapping width on radio buttons
2020-11-23 20:01:13 +01:00
Emil Ernerfeldt
e2c3bd429f
Update CHANGELOG.md
2020-11-15 18:14:41 +01:00
Emil Ernerfeldt
fe0d159324
Support Cmd+A ^W ^U ^K and shift-click
2020-11-15 14:21:21 +01:00
Emil Ernerfeldt
c4ed507d63
Add modifier keys and implement moving cursors one word at a time
2020-11-14 21:01:21 +01:00
Emil Ernerfeldt
03eb9151c4
Improve automatic Id generation to make Id clashes less likely
2020-11-14 18:20:56 +01:00
Emil Ernerfeldt
0340e2e6de
TextEdit: You must explicitly choose singleline or multiline.
...
Multiline TextEdit now has a default height of 4 rows.
Added `ui.text_edit_singleline` and `ui.text_edit_multiline`.
2020-11-13 11:22:00 +01:00
Emil Ernerfeldt
d2b5730784
Check if TextEdit lost keyboard focus with response.lost_kb_focus
2020-11-09 18:42:54 +01:00
Emil Ernerfeldt
e55b59256e
Press enter in single line TextEdit
to surrender keyboard focus
2020-11-09 18:40:23 +01:00
Emil Ernerfeldt
796def4bcb
Fixed bug where a lost widget could still retain keyboard focus.
2020-11-09 13:19:22 +01:00
Emil Ernerfeldt
3af741e85a
Update CHANGELOG.md with new 0.3.0 release
2020-11-07 14:58:40 +01:00
Emil Ernerfeldt
4b8a65268c
Turn off anti-aliasing in debug builds by default
2020-11-07 14:06:14 +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
4b549a773e
Replace ctx.background_ui with CentralPanel
2020-10-24 18:37:20 +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
211d70b4f3
[window] Remove ability to throw windows
2020-10-23 15:16:04 +02:00
Emil Ernerfeldt
35b949a2d8
Refactor panels into proper containers
2020-10-21 22:10:55 +02:00
Emil Ernerfeldt
8b51ae5dea
Panels: Added Context::panel_left and panel_top
...
Context will keep track of the avilable space left after panels.
Windows will be constrained to that available space.
So add panels first, THEN add windows.
2020-10-21 18:26:28 +02:00
Emil Ernerfeldt
46ce9a4f3d
[windows] Constrain windows to screen
2020-10-21 16:24:36 +02:00
Emil Ernerfeldt
b8642b4db4
Do less rounding of positions to pixel boundaries
...
Fixes https://github.com/emilk/egui/issues/27
2020-10-18 14:47:12 +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
42b433a204
[release] bump version numbers to 0.2.0
2020-10-10 14:00:07 +02:00
Emil Ernerfeldt
5c469551df
Switch argument order of ui.checkbox
and ui.radio
...
`bool, text` is the more logical order, as it
* matches the visuals: `[x] text`
* puts the important part first
* more natually allows us to extend to checkboxes without a text
2020-10-10 12:49:02 +02:00
Emil Ernerfeldt
b01690c7b8
[culling] coarse culling of text lines, circles and boxes
2020-10-10 12:25:01 +02:00
Emil Ernerfeldt
9f6301e121
Add logarithmic sliders to CHANGELOG.md
2020-10-08 22:24:42 +02:00
Emil Ernerfeldt
22fffc1793
[widgets] combo box (drop down menu)
2020-09-25 15:30:16 +02:00
Emil Ernerfeldt
bb367752cf
[text] support non-latin characters by dynamically adding them to atlas
2020-09-09 14:33:30 +02:00