1
0
mirror of https://github.com/emilk/egui.git synced 2026-06-28 07:23:13 -04:00
Commit Graph

220 Commits

Author SHA1 Message Date
Konkitoman
8e864bdfbc typo: fix typos 2023-08-22 11:08:56 +03:00
Konkitoman
ab59bf8c88 Now viewports will be identified by there id a normal egui::Id
Before viewports was identified by there title
2023-08-22 10:34:43 +03:00
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
2919a325d9 Fix Typo 2023-08-19 19:30:49 +03: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
lucasmerlin
1036cb1f7d Change force to be Option<f32> instead of f32 (#3240) 2023-08-12 13:50:40 +02:00
Emil Ernerfeldt
6633ecce64 Fix wrong detection of OS (#3238)
We had a bunch of `cfg!(windows)` and `cfg!(macos)` which should
have been `cfg!(target_os = "windows")`.

I wonder what the effects of this PR will be fore Windows 😬
2023-08-12 13:50:31 +02:00
Aaron Hill
98087029e0 Update to wgpu 0.17.0 (#3170)
* Bump `wgpu` to 0.17.0
This required bumping wasm-bindgen to 0.2.87
* cargo deny exception for `foreign-types`
* sort deny.toml
* Add fragile-send-sync-non-atomic-wasm feature to wgpu
* cargo deny: ignore children of foreign-types

---------

Co-authored-by: Andreas Reich <r_andreas2@web.de>
Co-authored-by: Emil Ernerfeldt <emil.ernerfeldt@gmail.com>
2023-08-11 17:10:10 +02:00
Konkitoman
d33075388c * Implement changes_between_builders
* Now process_viewport_commands was renamed to process_viewports_commands
* Added process_viewport_commands
* eframe glutin backend uses changes_between_builders
2023-08-11 17:39:14 +03:00
Emil Ernerfeldt
dd417cfc1a eframe: Better restore Window position on Mac when on secondary monitor (#3239) 2023-08-11 16:25:22 +02:00
Emil Ernerfeldt
f78db80840 Update to wasm-bindgen 0.2.87 (#3237)
* Update to wasm-bindgen 0.2.87

Required by the new `wgpu` version

* Catch unknown arguments to build_demo_web.sh
2023-08-11 15:34:16 +02: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
Konkitoman
88a7071e74 Moved create_winit_window_builder from crates/eframe/src/native/run.rs to crates/egui-winit/src/lib.rs 2023-08-10 18:53:43 +03:00
Emil Ernerfeldt
1e885abe08 Gracefully catch error saving state to disk (#3230) 2023-08-10 17:28:21 +02:00
Emil Ernerfeldt
7e035c6dd1 Allow users to opt-out of default winit features (#3228)
* Do not enable winit features by default

* Enable default winit features by default

* Add x11 feature
2023-08-10 17:09:01 +02:00
Konkitoman
9c6044aa7d Change ViewportBuilder how it's working 2023-08-10 16:53:31 +03:00
Emil Ernerfeldt
d568d9f5d0 Lint vertical spacing in the code (#3224)
* Lint vertical spacing in the code

* Add some vertical spacing for readability
2023-08-10 15:26:54 +02:00
jacekpoz
f2a58244c8 fix the title not being used when app_id is not set (#3107)
Co-authored-by: jacekpoz <jacekpoz@cock.li>
2023-08-10 09:50:15 +02: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
Emil Ernerfeldt
92593b70fa Changelogs: document that they are updated upon release (not by users) 2023-08-09 17:12:47 +02:00
Ho Kim
35027d3ebe Fix a document: eframe::start_web (#3026)
In `0.22.0`,  `eframe::start_web` has been replaced with `eframe::WebRunner`, which also installs a nice panic hook (no need for `console_error_panic_hook`).
2023-08-09 16:24:32 +02:00
Stephen M. Coakley
486cff8ac3 Fix panic with persistence without window (#3167)
A window may not always be available and may have already been closed by the time an eframe app is closing. An example of this is Android, where the main activity window may have been stopped or discarded because the app is no longer in the foreground, and then the user decides to close your app without resuming it using the multitasking view.

In this case, skip the window persistence step if it does not exist anymore by the time we are saving the persistence data. Currently eframe will panic with `winit window doesn't exist` instead.
2023-08-09 12:42:43 +02:00
Konkitoman
d45fc14a13 Move viewports stuff to crates/egui/src/viewports.rs 2023-08-07 19:02:18 +03:00
Konkitoman
ee2f2a7986 Fix web demo 2023-08-06 10:31:48 +03:00
Konkitoman
085724b685 wgpu implementation for viewport sync 2023-08-06 10:11:57 +03:00
Konkitoman
860160ed05 Some work on wgpu implementation 2023-08-06 09:21:44 +03:00
Konkitoman
05bf0e124a viewport_sync now processes platform output for GlowWinitApp 2023-08-05 17:46:54 +03:00
Konkitoman
03bc3f4c52 Now viewport_sync will process viewport_commands and will create new viewports if is needed!
Some refactoring now processing viewports_commands is in egui_winit::process_viewport_commands
And creating new windows and cleaning is in GlowWinitApp::process_viewport_builders
2023-08-05 16:11:39 +03:00
Konkitoman
098d94e705 Fix viewports example 2023-08-05 15:34:23 +03:00
Konkitoman
5ca60cad0e Now seting the time of event as the elapsing time from when the app started for sync viewports 2023-08-05 15:27:06 +03:00
Konkitoman
e8027b3c3a Removed viewport_id and parent_viewport_id from eframe::Frame 2023-08-04 09:10:01 +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
c7c9713bf8 create_viewport_sync prep Glutin
WGPU Unimplemented again, use Arc<RwLock<T>> for a lot of things
2023-08-01 17:30:36 +03:00
Konkitoman
1e6c1b55d3 Some work on frontend for making create_viewport_sync possible 2023-08-01 15:19:18 +03:00
Konkitoman
fd1c01cf1f Removed Context::set_current_rendering_viewport
Now we always need to say what viewport we rendering in Context::beagin or Context::run
2023-07-30 20:03:56 +03:00
Konkitoman
bb0b80fb08 Fix some warnings 2023-07-28 18:28:16 +03:00
Konkitoman
c56d09a2e5 Fix WGPU implementation memory leak
Now unused surfaces will be cleared
2023-07-27 18:22:43 +03:00
Konkitoman
769c71a714 WGPU implementation 2023-07-27 18:18:14 +03:00
Konkitoman
0e74cf4ca0 Some work making the native window to look like the egui one, and to work the same 2023-07-27 15:08:21 +03:00
Matt Fellenz
65eecde244 Use cfg attribute (#3113) 2023-07-26 19:07:05 +02:00
jacekpoz
beb2ecf7e4 fix typo in NativeOptions docs (#3108)
Co-authored-by: jacekpoz <jacekpoz@cock.li>
2023-07-26 18:59:49 +02: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
08b3afdc5e Now the window will have the correct size
Now window will not be resizable if is set to false
2023-07-25 12:10:56 +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