egui: an easy-to-use immediate mode GUI in Rust that runs on both web and native
egui is an easy-to-use immediate mode GUI for Rust that runs on both web and native.
Try it now: https://www.egui.rs/
egui development is sponsored by Rerun, a startup building an SDK for visualizing streams of multimodal data.
TextEdit
#4272
Response::interact_rect
for Area/Window
#4273
Response::clicked_elsewhere
takes clip rect into account #4274
ScrollArea
#4309 (thanks @lucasmerlin!)unwrap()
#4285
egui is an easy-to-use immediate mode GUI for Rust that runs on both web and native.
Try it now: https://www.egui.rs/
egui development is sponsored by Rerun, a startup building an SDK for visualizing streams of multimodal data.
InputState::any_touches
and add InputState::has_touch_screen
#4247
Context::repaint_causes
returning no causes #4248
zoom_with_keyboard
is false #4262
Area
or Window
#4258
#hash
in the URL changes #4261
zoom_factor
#4260 (thanks @justusdieckmann!)egui is an easy-to-use immediate mode GUI for Rust that runs on both web and native.
Try it now: https://www.egui.rs/
egui development is sponsored by Rerun, a startup building an SDK for visualizing streams of multimodal data.
The hit test logic (what is the user clicking on?) has been completely rewritten, and should now be much more accurate and helpful.
The hit test and interaction logic is run at the start of the frame, using the widgets rects from the previous frame, but the latest mouse coordinates.
It enabled getting a Response
for a widget before creating it using Context::read_response
.
This will in the future unlock more powerful widget styling options.
The new hit test also allows clicking slightly outside a button and still hit it, improving the support for touch screens.
The menus have also been improved so that they both act and feel better, with no change in API. Included in this is much nicer looking shadows, supporting an offset.
Response::clicked*
and Response::dragged*
may lock the Context
, so don't call it from a Context
-locking closure.Response::clicked_by
will no longer be true if clicked with keyboard. Use Response::clicked
instead.Memory::focus
has been renamed Memory::focused
Area::new
now takes an Id
by argument #4115
clicked_by
#4192
Area::sense
and improve hit-testing of buttons in menus #4234
Shadow
with offset, spread, and blur #4232
Options::debug_paint_interactive_widgets
#4018
Ui::set_opacity
#3965 (thanks @YgorSouza!)Response::paint_debug_info()
to make it easy to visualize a widget's id and state #4056 (thanks @abey79!)ColorImage::from_gray_iter
#3536 (thanks @wangxiaochuTHU!)ProgressBar
and Spinner
#4139 (thanks @DataTriny!)const fn
for Margin
, Rounding
and Shadow
#4080 (thanks @0Qwel!)Area
an id distinct from the id of what was clicked #4114
epaint
: Added Shape::{scale,translate}
wrappers #4090 (thanks @varphone!)Window
can now be resizable in only one direction #4155
EllipseShape
#4122 (thanks @TheTacBanana!)HeaderResponse
#4200 (thanks @Zeenobit!)TextEdit
: Change margin
property to egui::Margin
type #3993 (thanks @bu5hm4nn!)ui.dnd_drop_zone()
now returns InnerResponse
. #4079 (thanks @sowbug!)Ui
#4074
ui.scroll_to_cursor
etc #4119
egui::Window
from becoming larger than viewport #4199 (thanks @rustbasic!)Window
title bar #3995 (thanks @varphone!)on_disabled_hover_ui
respect tooltip_delay
#4012 (thanks @YgorSouza!)TextEdit
being too short whenever there is horizontal margin #4005 (thanks @gweisert!)Response::interact
and Ui:interact_with_hovered
#4013
Response.interact_pointer_pos
is Some
on click and drag released #4014
Window
Frame
s #4009 (thanks @varphone!)Window
frame with a wide border or large rounding #4032 (thanks @varphone!)ScrollArea
bugs: leaking scroll target and broken animation to target offset #4174 (thanks @abey79!)Context::parent_viewport_id
#4190 (thanks @rustbasic!)RepaintCause::new
#4146 (thanks @valsteen!)App::raw_input_hook
allows for the manipulation or filtering of raw input events #4008 (thanks @varphone!)winuser
feature to winapi
to fix unresolved import #4037 (thanks @varphone!)get_proc_address
in CreationContext #4145 (thanks @Chaojimengnan!)webgpu
feature by default to wgpu #4124 (thanks @ctaggart!)request_animation_frame
when destroying web runner #4169 (thanks @jprochazk!)Location::query_map
: support repeated key #4183
egui is an easy-to-use immediate mode GUI for Rust that runs on both web and native.
Try it the only demo: https://www.egui.rs/
Window
title bar incorrect handling spacing #3995 (thanks @varphone!)on_disabled_hover_ui
respect tooltip_delay
#4012 (thanks @YgorSouza!)TextEdit
being too short whenever there is horizontal margin #4005 (thanks @gweisert!)Response::interact
and Ui:interact_with_hovered
#4013
Response.interact_pointer_pos
is Some
on click and drag released #4014
Window
Frame
s #4009 (thanks @varphone!)egui is an easy-to-use immediate mode GUI for Rust that runs on both web and native.
Try it now: https://www.egui.rs/
response.hovered
to false when dragging another widget #3860
InputState::scroll_delta
has been replaced by InputState::raw_scroll_delta
and InputState::smooth_scroll_delta
#3884
Response.dragged
, drag_started
and clicked
#3888
Response
and Memory
#3876 (thanks @abey79!)ComboBox
: add builder method for height #3001 (thanks @hinto-janai!)?
, /
, |
#3820
Response::contains_pointer
#3859
Align2::anchor_size
#3863
Context::debug_text
#3864
Context::on_begin_frame
and on_end_frame
#3886
Frame
API to allow picking color until after adding content #3889
TextShape
#3916 (thanks @StratusFearMe21!)Context::repaint_causes
: file:line
of what caused a repaint #3949
TextureOptions::wrap_mode
#3954 (thanks @CodedNil!)Spacing::menu_width
#3973
Response.context_menu
now returns the response of the context menu, if open #3904 (thanks @AufarZakiev!)TextEdit
or Label
will select text to begin/end #3858
stable_dt
#3832
Response::is_pointer_button_down_on
is now false the frame the button is released #3833 (thanks @rustbasic!)request_repaint_after
every frame causing immediate repaint #3978
Id
so that Option<Id>
is the same size as Id
#3932
rayon
feature #3934
wgpu
to 0.19 #3824
wgpu
#3875
cpu_usage
timing #3913
ViewportInfo::maximized
and minimized
up-to-date on Windows #3831 (thanks @rustbasic!)IconData::default()
without crashing #3842
WgpuConfiguration::desired_maximum_frame_latency
#3874
App::update
on minimized windows #3877 (thanks @rustbasic!)Try it out with version string 0.26.0-alpha.1
Full diff at https://github.com/emilk/egui/compare/0.25.0..HEAD
ComboBox
: add builder method for height #3001 (thanks @hinto-janai!)?
, /
, |
#3820
stable_dt
#3832
Response::is_pointer_button_down_on
is now false the frame the button is released #3833 (thanks @rustbasic!)TextEdit
or Label
will select text to begin/end #3858
Response::contains_pointer
#3859
response.hovered
to false when dragging another widget #3860
Align2::anchor_size
#3863
Context::debug_text
#3864
Response
and Memory
#3876 (thanks @abey79!)Context::on_begin_frame
and on_end_frame
. #3886
Response.dragged
, drag_started
and clicked
#3888
Frame
API to allow picking color until after adding content #3889
Response.context_menu
now returns the response of the context menu, if open #3904 (thanks @AufarZakiev!)TextShape
#3916 (thanks @StratusFearMe21!)Id
so that Option<Id>
is the same size as Id
#3932
ViewportInfo::maximized
and minimized
up-to-date on Windows #3831 (thanks @rustbasic!)IconData::default()
without crashing #3842
WgpuConfiguration::desired_maximum_frame_latency
#3874
egui-wgpu
: turn off the default features of wgpu
#3875
App::update
on minimized windows #3877 (thanks @rustbasic!)cpu_usage
timing #3913
egui_plot::PlotMemory
public #3871
x11
and wayland
features to egui-wgpu and egui_glow #3909 (thanks @YgorSouza!)WgpuConfiguration::desired_maximum_frame_latency
#3874
wgpu
#3875
x11
and wayland
features to egui-wgpu and egui_glow #3909 (thanks @YgorSouza!)egui_winit
: Allow getting the clipboard
and allow_ime
state #3724 (thanks @tosti007!)Align2::anchor_size
#3863
TextShape
#3916 (thanks @StratusFearMe21!)egui is an easy-to-use immediate mode GUI for Rust that runs on both web and native.
Try it now: https://www.egui.rs/
Key::PlusEquals
with Key::Plus
and Key::Equals
#3769
WidgetTextGalley
, WidgetTextJob
, RichText::into_text_job
, WidgetText::into_text_job
#3727
TextBuffer::replace
to replace_with
#3751
Color32::PLACEHOLDER
with widget fallback color #3727
Key
s for Cut
Copy
Paste
[
]
,
\
:
.
;
+
=
#3725 #3373 #3649 #3769 (thanks @MarijnS95 and @mkrueger!)Key::from_name
, Key::ALL
#3649
Event::Key::physical_key
#3649
Color32::from_hex
and Color32::to_hex
#3570 #3777 (thanks @YgorSouza!)DragValue
s for RGB(A) in the color picker #2734 (thanks @IVAN-MK7!)TextEditState
undoer #3479 (thanks @LoganDark!)ScrollArea
: Add option to always scroll the only enabled direction #3710 (thanks @untbu!)Grid
now follows style.visuals.striped
if not explicitly overwritten #3723 (thanks @Wcubed!)Window
, controlled by Visuals.window_highlight_topmost
#3515 (thanks @GuillaumeSchmid!)serde
Serialize
and Deserialize
for KeyboardShortcut
#3694 (thanks @zeozeozeo!)Window
positioning bug when bad pivot
is stored in app data #3721 (thanks @abey79!)Clone
for Fonts
#3737
ResizeDirection::East
#3749 (thanks @dbuch!)CompositionEnd
without a CompositionStart
#3768 (thanks @FrankLeeC!)DragValue
when it looses focus #3776
Area
s now ignore mouse input outside their bounds #3039 (thanks @fleabitdev!)pixels_per_point
, not matter how small #3698 (thanks @StarStarJ!)Cmd +
) on non-English keyboards #3769
egui is an easy-to-use immediate mode GUI for Rust that runs on both web and native.
Try it now: https://www.egui.rs/
x11
feature on Linux #3643
glow
backend: clear framebuffer color before calling App::update
#3665
egui is an easy-to-use immediate mode GUI for Rust that runs on both web and native
Try it now: https://www.egui.rs/
You can now spawn multiple native windows on supported backends (e.g. eframe
), using the new viewport
API (#3172).
You can easily zoom any egui app using Cmd+Plus, Cmd+Minus or Cmd+0, just like in a browser (#3608).
Scrollbars are now hidden by default until you hover the ScrollArea
(#3539).
zoom_factor
#3608
Undoer
#3478 (thanks @LoganDark!)egui::Vec2b
#3543
Window
size & other size helpers #3537 (thanks @arduano!)RawInput::viewports
contains a list of all viewports. Access the current one with ctx.input(|i| i.viewport())
ImageButton
#3531 (thanks @chriscate!)constraint_to
-> constrain_to
#3438 (thanks @rinde!)#[inline]
to all builder-pattern functions #3557
egui::gui_zoom::zoom_with_keyboard_shortcuts
is gone, replaced with Options::zoom_with_keyboard
, which is true
by defaultSpacing::scroll_bar_X
has been moved to Spacing::scroll_bar.X
Context::set_pixels_per_point
now calls Context::set_zoom_level
, and it may make sense for you to call that directly insteadeframe
, check out the breaking changes in the eframe
changelog
There are several changes relevant to integrations.
crate::RawInput::viewports
with information about all active viewportsContext::set_request_repaint_callback
now points to which viewport should be repaintedContext::run
now returns a list of ViewportOutput
in FullOutput
which should result in their own independent windowsContext::set_immediate_viewport_renderer
for setting up the immediate viewport integrationContext::set_embed_viewports(false)
, or all new viewports will be embedded (the default behavior)