Commit Graph

2695 Commits

Author SHA1 Message Date
Konkitoman 622814d8ed Now show_tooltip_area_dyn and was_tooltip_open_last_frame was reverted to be like before! 2023-08-11 18:30:45 +03:00
Konkitoman 74e50044b5 Added maximize_button, mimimize_button and hittest on ViewportBuilder
!!! hittest is not working because of winit !!!
2023-08-11 18:19:57 +03:00
Konkitoman 6201caf00b Now `was_tooltip_open_last_frame uses ViewportBuilder::empty 2023-08-11 17:43:17 +03: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
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
Konkitoman 0e7803bf61 Add all winit runtime window attributes as viewport commands in ViewportCommand 2023-08-10 18:47:48 +03:00
Konkitoman 9c6044aa7d Change ViewportBuilder how it's working 2023-08-10 16:53:31 +03:00
Konkitoman 70a5772f8d Now tooltip popup will open in a native window if he can, this is for making letting more problem to show to fix them! 2023-08-10 14:21:57 +03:00
Konkitoman 48646ef521 Update viewports example, and added documentation for Window::default_embedded 2023-08-09 20:16:35 +03:00
Konkitoman 20b3e16f4b Add some documentation 2023-08-09 19:35:17 +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 0198b6ae45 Context and Memory now clears unused viewport data 2023-08-08 17:36:50 +03:00
Konkitoman 3ab6ee1116 Fix window interaction, when a sync embedded=false window was shown other embedded windows will not work! 2023-08-08 17:28:28 +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 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 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 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 fbcb26827c More cleanup 2023-08-04 10:45:52 +03:00
Konkitoman 172be33b40 More cleaning 2023-08-04 10:27:22 +03:00
Konkitoman 6a7d162d40 Reverted the demos back 2023-08-04 10:18:24 +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 9e1e0a55a5 Fix interactions for sync viewport 2023-08-03 19:00:26 +03:00
Konkitoman 70b9d8f1c5 Making the Window::show to be sync 2023-08-02 21:29:24 +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 b75fe9bbc4 Now Context will say what viewport_id and parent_viewport_id when calling render_sync to the backend 2023-08-01 15:26:33 +03:00
Konkitoman 1e6c1b55d3 Some work on frontend for making create_viewport_sync possible 2023-08-01 15:19:18 +03:00
Konkitoman e6e1463062 Now the redraw hack introduced in "Some hacky fixes" is no more needed!
This fixes other problems that was caused by that hack!
2023-07-30 22:11:49 +03:00
Konkitoman 63f4b486e3 This compained with b8e8d09 fixes every thing about interaction per viewport 2023-07-30 22:05:48 +03:00
Konkitoman 43ba09531b Fix window draging 2023-07-30 21:49:08 +03:00
Konkitoman b8e8d095c8 Sets Areas per viewport
I don't really know why but fixes when other window is rendering to take focus from the main one, but apparently if the main window is rendering can take focus from other windows
2023-07-30 21:34:15 +03:00
Konkitoman 4b4414955a Now Memory::interaction is stored per viewport in Memory::interactions
This will allow in the future drag and drop betwen windows
Fixes if a an other window is rendered will forgot what was draging, this was very annoying
2023-07-30 21:07:07 +03:00
Konkitoman cf05c3fa75 Now InputState is stored per viewport!
This fixes input collisions between viewports
2023-07-30 20:35:21 +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 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