Konkitoman
f30bf519ee
Merge branch 'master' of https://github.com/emilk/egui into multiples_viewports
2023-09-05 12:19:02 +03:00
Emil Ernerfeldt
46ea72abe4
Add control of line height and letter spacing ( #3302 )
...
* Add `TextFormat::extra_letter_spacing`
* Add control of line height
* Add to text layout demo
* Move the text layout demo to its own window in the demo app
* Fix doclink
* Better document points vs pixels
* Better documentation and code cleanup
2023-09-05 10:45:11 +02:00
Barugon
cf163cc954
Add scroll_area::State::velocity ( #3300 )
...
* Implement `has_momentum`
* Add doc comment
* Call it `has_velocity`
* Implement `velocity` method
---------
Co-authored-by: Emil Ernerfeldt <emil.ernerfeldt@gmail.com >
2023-09-05 10:44:23 +02:00
Barugon
1b8e8cb38e
eframe::Frame::info returns a reference (#3301 )
...
* Get a reference to `IntegrationInfo`
* Add doc comment
* Change `info` to return a reference
* Clone integration info
* Remove `&`
* Clone integration info in another place
2023-09-05 10:43:39 +02:00
Emil Ernerfeldt
e3362dafac
CI: Update to actions/checkout@v4 ( #3304 )
2023-09-05 10:18:38 +02:00
Emil Ernerfeldt
8c84bbfde4
Prune old egui memory data when reaching some limit ( #3299 )
...
* Add generations to serialized state
* Make IdTypeMap into a field struct
* Less code duplication
* Implement garbage collection during serialization
* Add unit-test
* Add docstring
* Build fix
* another fix
2023-09-04 21:46:57 +02:00
Konkitoman
12eeda0a3f
Merge branch 'master' of https://github.com/emilk/egui into multiples_viewports
2023-09-04 16:45:12 +03:00
Emil Ernerfeldt
9e86bb8d6a
Add opt-in puffin feature to egui ( #3298 )
...
* Add opt-in `puffin` feature to egui
* fix web build
* Fix web for realz
2023-09-04 15:01:22 +02:00
Konkitoman
7c4a85ebda
Now in ViewportBuilder, InputState, RawInput: viewport_inner_pos, viewport_outer_pos, viewport_inner_size, viewport_outer_size are stored as inner_pos, outer_pos, inner_size, outer_pos and Now every (i32, i32) is stored as egui::Pos2
...
Addes some documentation
2023-09-04 14:23:21 +03:00
Konkitoman
4a9e087e92
Merge branch 'master' of https://github.com/emilk/egui into multiples_viewports
2023-09-04 13:39:08 +03:00
Barugon
72adf3bde3
Remove unnecessary code ( #2860 )
2023-09-04 11:43:24 +02:00
v-kat
59235ff01c
Changing menu_image_button to use ImageButton builder ( #3288 )
...
Co-authored-by: Ivy <fake@email.com >
2023-09-04 11:12:43 +02:00
Emil Ernerfeldt
5f742b9aba
Improve documentation of eframe, especially for wasm32 ( #3295 )
...
* Improve documentation of `eframe`, especially for wasm32
* remove dead code
* fix
2023-09-04 09:55:47 +02:00
Emil Ernerfeldt
209cbeb030
Replace instant with web_time ( #3296 )
2023-09-04 09:37:35 +02:00
Konkitoman
4eb32c6ccf
Simplify
2023-09-01 12:09:01 +03:00
Konkitoman
661120dc1d
Simplify
2023-09-01 11:52:00 +03:00
Konkitoman
52a63cabf9
Make viewports example simpler
2023-09-01 11:17:54 +03:00
Konkitoman
78a0ae879e
This PR has a smaller scope, and this are some reverts
...
Will no longer change egui::Window!
2023-08-31 19:37:01 +03:00
Konkitoman
c10a4cd79a
Fix: First frame of Context::create_viewport_sync was always skiped because we didn't have a window to draw on!
...
Changes: Now Context::create_viewport_sync returns T, before was Option<T>
2023-08-31 17:07:39 +03:00
Konkitoman
6618a47c20
Merge branch 'master' of https://github.com/emilk/egui into multiples_viewports
2023-08-30 15:03:28 +03:00
Timon
ea15987ad4
Change focused widget with arrow keys ( #3272 )
...
* Allow widget focus change with keyboard arrows
* remove set id function
* docs
* Emilk feedback round 1
* Fix compile error
* undo example
* Move out functions from range to memory.rs
* remove contains range
* Use docstrings
* code cleanup
* Improve candidate logic
* More tweaks
* Less `pub`
---------
Co-authored-by: Emil Ernerfeldt <emil.ernerfeldt@gmail.com >
2023-08-30 10:28:21 +02:00
Emil Ernerfeldt
70bfc7e09f
Add eframe::storage_dir ( #3286 )
...
* Add `eframe::storage_dir`
Now you can easily tell where eframe stores its state
* egui_plot: work even without the `serde` featur flag
2023-08-29 15:22:07 +02:00
Emil Ernerfeldt
a59eda7a27
egui-winit: Recognize numpad enter/plus/minus ( #3285 )
...
Numpad enter should work the same as the normal return key.
Numpad plus/minus should now work for scaling ui
(together with cmd/ctrl)
2023-08-29 14:04:12 +02:00
Konkitoman
51011d1bbd
Fix: sync viewport was not updating on windows
...
Changes: no more manual calls to winit:🪟 :Window::request_redraw, in glow or wgpu
2023-08-29 11:01:19 +03:00
Konkitoman
a21cb80f56
Merge branch 'master' of https://github.com/emilk/egui into multiples_viewports
2023-08-29 10:00:14 +03:00
Emil Ernerfeldt
7b169ec13d
Break out plotting to own crate egui_plot ( #3282 )
...
This replaces `egui::plot` with the new crate `egui_plot`
2023-08-27 17:22:49 +02:00
Sven Niederberger
87f12d782e
Allow setting the progress bar height ( #3183 )
...
* allow setting the progress bar height
* changelog entry
* remove the changelog entry
2023-08-27 14:28:55 +02:00
Sven Niederberger
c722b7fd46
Plot items: Image rotation and size in plot coordinates, polygon fill color ( #3182 )
...
* plot item improvements
* update changelog
* fix links
* revert changes to the changelog
* clean up merge
2023-08-27 14:28:10 +02:00
Konkitoman
e5a97d14ad
Add some documentation
2023-08-25 12:20:55 +03:00
Konkitoman
4d01644b33
* Fix example hello_world_par
...
* Added warning for glow eframe when creating `Context::create_viewport_sync` in other thread, or cannot be rendered!
* Fix clippy warning
2023-08-25 11:22:18 +03:00
Emil Ernerfeldt
b6f46b000b
Some clippy fixes from 1.72.0
2023-08-25 07:44:25 +02:00
Konkitoman
b0287e96e5
Fix some stuf in egui::Window
2023-08-24 09:46:46 +03:00
Konkitoman
6c91562c7b
Now viewport pos and size are stored in InputState::{viewport_inner_pos, viewport_outer_pos, viewport_inner_size, viewport_outer_size}
...
This fixes a lot of problems
2023-08-24 09:14:48 +03:00
Konkitoman
9c73c2f4b1
Revert "Now in screen_rect min is the viewport position and max is the viewport size"
...
This reverts commit 4bbdab1788 .
2023-08-24 07:55:56 +03:00
Konkitoman
c9faa78e5b
Make the window position and size to not get set when the window is mimimized
...
And now Memory::new_pixels_per_point is not taken because all viewports need to have the same dpi
2023-08-24 07:45:42 +03:00
Antoine Beyeler
627e1b3d50
Add exception for RUSTSEC-2023-0052 to deny.toml ( #3274 )
2023-08-23 15:22:41 +02:00
Antoine Beyeler
2c5fc5a0a5
Added mime field to DroppedFiles ( #3273 )
2023-08-23 15:13:47 +02:00
Konkitoman
3b41253442
This should make the viewport to redraw normaly in windows
2023-08-23 14:31:37 +03:00
Konkitoman
3cf9c1c4b1
Make example more complex
2023-08-23 08:11:31 +03:00
Konkitoman
dadcd508c9
Fix deadlock when creating a viewport sync in a viewport sync
...
But will not affect anything because the viewport builders will processed when the async viewport will end
2023-08-23 07:18:16 +03:00
Konkitoman
189e34e3d2
Fix flickering for Context::create_viewport_sync but now will return a Option<T>
2023-08-23 06:20:31 +03:00
Konkitoman
3f8fe1db3a
Merge branch 'master' of https://github.com/emilk/egui into multiples_viewports
2023-08-23 06:10:34 +03:00
Emil Ernerfeldt
ec506c0a43
Use the minus character instead of "dash" ( #3271 )
...
* Use the minus character instead of "dash"
See https://github.com/rerun-io/rerun/issues/3053
* docstring
* fix
2023-08-22 15:35:27 +02:00
David M. Lary
32a63da580
Added Context::is_context_menu_open() ( #3267 )
...
I encountered a case where I needed to know if an egui context menu was
open, even if the mouse cursor was not in an egui area (full details in
discord). I found that every resource I needed to detect that the menu
was open was either private, or pub(crate). While it is possible to
wrap the `Response::context_menu()` in code to do state-tracking, it
becomes necessary to duplicate that code in every place you use a
context menu.
In this commit, I add `Context::is_context_menu_open()`. Named similarly
to `Context::is_pointer_over_area()`, this method will return true if
any context menu is open. This is possible because the context menu
uses a temp var with a fixed Id to store its state. This method just
fetches the state, and interrogates it to see if there is a menu
present.
One helper method, `BarState::has_root()`, was added as all the fields
needed to perform the check were private to the `menu` module.
I've also updated the Context Menu demo to show the result of
`is_context_menu_open()` to verify the code functions as expected.
2023-08-22 15:35:15 +02:00
lucasmerlin
461328f54d
Fix iOS support in eframe ( #3241 )
...
* Fix the app only taking up half the screen size on iPad
* Fix request_repaint not working on iOS
* Always use run_and_exit on iOS since run_and_return is not supported by winit on iOS right now.
* Fix typo
* Fix eframe glow on ios
* Handle more cases
2023-08-22 14:35:18 +02:00
Konkitoman
d90db12e88
Fix: window not redrawing when moving
2023-08-22 11:33:38 +03:00
Konkitoman
7aefba60df
Fix windows and android errors
2023-08-22 11:20:34 +03:00
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
2949874287
Update egui::Context::create_viewport documentation and update viewports example
2023-08-22 10:22:21 +03:00