1
0
mirror of https://github.com/emilk/egui.git synced 2026-06-27 07:03:14 -04:00
Commit Graph

125 Commits

Author SHA1 Message Date
Konkitoman
013f01dbcb * Now: is_desktop can only be set at the creation with egui::Context::new insted of default!
* Removed: egui::Context::is_desktop, egui::Context::set_desktop
* Added: egui::Context::force_embedding, egui::Context::set_force_embedding
2023-08-22 09:39:41 +03:00
Konkitoman
bc04696842 Merge branch 'master' of https://github.com/emilk/egui into multiples_viewports 2023-08-17 21:59:11 +03:00
Emil Ernerfeldt
3c4223c6b1 Support images with rounded corners (#3257)
* Add `Rect::ZERO`

* Add `Rounding::ZERO`

* Add `RectShape::new`

* Add `Image::rounding` to support images with rounded corners
2023-08-15 09:29:30 +02:00
Konkitoman
18575d5931 Fix all warnings 2023-08-15 04:04:52 +03:00
Konkitoman
191ee82c3e Merge branch 'master' of https://github.com/emilk/egui into multiples_viewports 2023-08-15 02:17:12 +03:00
Konkitoman
08f207a0a8 Fix some warnings 2023-08-14 17:59:26 +03:00
Konkitoman
4bbdab1788 Now in screen_rect min is the viewport position and max is the viewport size 2023-08-12 20:36:41 +03:00
Emil Ernerfeldt
08fb447fb5 Increase MSRV to 1.67 (#3234)
* Bump MSRV to 1.67

* clippy fixes

* cargo clippy: inline format args

* Add `clippy::uninlined_format_args` to cranky lints

* Fix clippy on wasm

* More clippy fixes
2023-08-11 13:54:02 +02:00
hacknus
871041c4e7 Added an example to save plot to image (#2769)
* implement save_plot

* fix for check.sh

* clippy

* add save_plot to Cargo.lock

* adapted for PR #2676 (removes unsafe code)

* add some comments

* implemented the comments from emilk

* update comments in code

* rustfmt

* remove picked_path

* add more comments

* removed unused import

* use `inner.response.rect` as the plot position

* remove plot_location from MyApp members

* sort entries

* Update examples/save_plot/src/main.rs

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

* use env_logger instead of tracing subscriber

* use env_logger instead of tracing subscriber and combine if let

---------

Co-authored-by: Emil Ernerfeldt <emil.ernerfeldt@gmail.com>
2023-08-10 12:35:11 +02:00
Konkitoman
48646ef521 Update viewports example, and added documentation for Window::default_embedded 2023-08-09 20:16:35 +03:00
Konkitoman
a88a5cdf83 Fix some warnings 2023-08-09 19:15:35 +03:00
Konkitoman
86ef11c521 Now viewport_id always will be in a ViewportId you cannot create a ViewportId you can only get the main one everywere or get the current viewport id with Context::get_viewport_id 2023-08-09 18:33:59 +03:00
Konkitoman
1a7c4700fd Now embedded is stored on window, and fix crash when we set a window size to 0 2023-08-08 21:18:03 +03:00
Konkitoman
c68908a6a8 Add embedd button on window is only a button with character - or ^ 2023-08-08 17:19:54 +03:00
Konkitoman
d45fc14a13 Move viewports stuff to crates/egui/src/viewports.rs 2023-08-07 19:02:18 +03:00
Konkitoman
860160ed05 Some work on wgpu implementation 2023-08-06 09:21:44 +03:00
Konkitoman
7ee80da98c Fix Test3 allways was fallowing the cursour 2023-08-05 17:36:09 +03:00
Konkitoman
e64f335dcc More restoring 2023-08-05 17:32:16 +03:00
Konkitoman
098d94e705 Fix viewports example 2023-08-05 15:34:23 +03:00
Konkitoman
172be33b40 More cleaning 2023-08-04 10:27:22 +03:00
Konkitoman
e8027b3c3a Removed viewport_id and parent_viewport_id from eframe::Frame 2023-08-04 09:10:01 +03:00
Konkitoman
d1b00b6fdc Add Window::show_async!
A refactoring of crates/egui/src/containers/window.rs is needed
2023-08-03 20:13:04 +03:00
Konkitoman
1448c5047f Remove viewport_id and parent_viewport_id from Window::show arguments because can be accessed from Context::get_viewport_id and Context::get_parent_viewport_id 2023-08-03 19:53:17 +03:00
Konkitoman
7f791f4bf9 Add Window::embedded 2023-08-03 19:39:51 +03:00
Konkitoman
2057993f54 Some more work now stuff is rendered corectly 2023-08-02 20:49:41 +03:00
Konkitoman
141421547b Fix: a sync viewport cannot render itself he needs his parent to be rendered now when sync viewport needs a redraw that redraw will be redirected to his parent 2023-08-02 19:58:12 +03:00
Konkitoman
34fea8a0e5 Some more work on making possible to render viewport_sync in glutin
Context::current_rendering_viewport was replaced by Context::get_viewport_id
Added Context::get_parent_viewport_id
Changed Context::run to need parent_viewport_id
Changed Context::beagin to need parent_viewport_id
Added ImplContext::frame_stack
Some work on making posibile to render multiples frames at the same time
A lot of more things in glutin backend is not Arc<RwLock<T>>
2023-08-02 17:14:31 +03:00
Konkitoman
1f5d17cfcc Some hacky fixes 2023-07-29 21:32:57 +03:00
Konkitoman
bb0b80fb08 Fix some warnings 2023-07-28 18:28:16 +03:00
Konkitoman
769c71a714 WGPU implementation 2023-07-27 18:18:14 +03:00
Konkitoman
46e85856b9 Update example for debuging purposes
There is a bug that some how makes the windows to be liked!
Winit events look fine but some thing i think is happening with area id or some thing
2023-07-27 15:32:26 +03:00
Konkitoman
cb09e630a2 Add a new example and change how embedding is stored 2023-07-25 16:40:03 +03:00
Konkitoman
2131f251fc Update example and now the viewport will always render if can create a native window will be embedded 2023-07-25 12:43:34 +03:00
Konkitoman
19d1fecb99 Now we can drag any viewport but only the viewport that is focused will be draged because if not on x11 the input will be taken until the application is killed 2023-07-25 11:53:10 +03:00
Konkitoman
93a7c018d7 Now App::update will be responsabile for what viewport will be drawned and its content
A big refactoring was needed
2023-07-25 10:54:31 +03:00
Konkitoman
199d4e53cd Fixed example 2023-07-24 16:49:09 +03:00
Konkitoman
f4a196cddc Now a WindowEvent::CloseRequested is received will be sent to egui_winit::State in RawInput
Now when we press the close button from a native window if the window has a open variabile connected the window will be closed
2023-07-24 16:15:34 +03:00
Konkitoman
4d883b8217 Fix mouse input
Now on Context.create_viewport in the render function will we have viewport_id and parent_viewport_id
New problem if a windows is fucused and we interact with other window the first event will be send to the last window that was focused
2023-07-24 14:24:30 +03:00
Konkitoman
3a1d9f2e21 A lot of changes:
Now the Viewport render function is passed to the backend
I was needed to update the demo because now Window::show() needs a Fn before was a FnOnce
I changed from FnOnce to Fn because we want the window to be rendered separately from the main window
That means now the variabiles that we are moving to window need to be Rc or Arc!
This is making harder to use `Window`!
I'am waiting for more ideas!
In eframe now any Window has a property render that stores the current window render function, if has not function App::update will be called insted!
New problems in any other window excluding the main window we have no mouse input, i don't know why!
Now every window has embedded to false by default, for testing purposes!
2023-07-23 19:38:02 +03:00
Konkitoman
ea2dcd8cb5 Rename every thing that i was implemented for multiples windows to Viewport 2023-07-23 12:47:36 +03:00
Konkitoman
2b13572220 Now every window has egui-winit, but a big problem is that a window don't render if the window frame number is bigger the the current frame, this is a spaculation because i don't know if a window stores the current frame i don't know what happens because new window render from the first time but the egui-ctx don't want to render the new window
is like i have tow egui-ctx
2023-07-21 22:00:22 +03:00
Konkitoman
23bb315468 Now a window will not render other window content 2023-07-19 14:01:12 +03:00
Konkitoman
1d52990306 Update temporery example 2023-07-19 11:25:52 +03:00
Konkitoman
cd48e2b1ad Added now window can be toggled embeded or not 2023-07-19 10:57:13 +03:00
Konkitoman
28d5c6e62c Now window will be destroyed if is not rendered 2023-07-18 17:52:55 +03:00
Konkitoman
8f475ef8d8 Is creating a window 2023-07-18 16:50:41 +03:00
Konkitoman
c91de8a871 Some more work for multiples windows support 2023-07-18 15:29:56 +03:00
Emil Ernerfeldt
083d61fccd Update to puffin 0.16 (#3144) 2023-07-10 12:29:01 +02:00
Emil Ernerfeldt
cccdfd246e Cleanup ahead of release 2023-05-23 19:53:32 +02:00
Emil Ernerfeldt
b2281c46e4 Update example screenshots 2023-05-23 13:38:02 +02:00