Commit graph

1736 commits

Author SHA1 Message Date
René Rössler
4f6f871f29 change lifetimes so that 'a is always the lifetime of Ui 2022-01-07 17:14:52 +01:00
René Rössler
a944208b19 add some comments, rework lifetimes of table row 2022-01-07 17:13:37 +01:00
René Rössler
e373961e21 Merge remote-tracking branch 'egui/master' into dynamic-grid 2022-01-07 13:23:06 +01:00
Justin Jaffray
4fe5fa6c59
egui_glow: Add function to set the texture filter (#1041)
* Allow setting the scale filter for `glow` backend

This commit adds a `set_scale_filter` method to the `glow` painter so that
textures can be set to scale using nearest-neighbour scaling rather than
linear. This is useful for pixel art.

I wasn't entirely sure what kind of API you want for this kind of change so I
went with what seemed least intrusive, I don't mind doing something more
holistic if this isn't what you had in mind.

* Rename scale_filter -> texture_filter

* Store the TextureFilter directly

* PR link in changelog

* Use inter-doc links

Co-authored-by: Emil Ernerfeldt <emil.ernerfeldt@gmail.com>
2022-01-06 17:09:53 +01:00
Lampsitter
b0ea4dc0b5
Fix context menu styling (#1043) 2022-01-06 12:17:12 +01:00
Emil Ernerfeldt
7863f44111 Add demo of advanced TextEdit usage 2022-01-06 11:53:23 +01:00
Lampsitter
d31f7d6522
Faster dashed line generation (#1027)
* Faster dashed lines generation

* Add dashed_line benchmark
2022-01-06 10:44:53 +01:00
René Rössler
767357c468 Merge remote-tracking branch 'egui/master' into dynamic-grid 2022-01-04 12:28:13 +01:00
Emil Ernerfeldt
79cfdaa1f9 Better docs and spelling fixes 2022-01-03 23:58:06 +01:00
Niklas Korz
01015ac94c
Use instant crate in egui-winit for WebAssembly support (#1023)
* Replace `std::time::Instant` with wasm-compatible `instant::Instant`

* Change version requirement for instant to be compatible to winit

* Enable wasm-bindgen feature for instant

* Update lockfile

* Update changelog

* sort dependencies

Co-authored-by: Emil Ernerfeldt <emil.ernerfeldt@gmail.com>
2022-01-03 22:13:53 +01:00
Emil Ernerfeldt
b1fd6a44e8
Switch to using glow as the default renderer both on native and the web (#1020)
* Switch to using glow as the default renderer both on native and the web
* Simplify code to find WebGL context for glow
* egui_web: make webgl an opt-in feature
* Stop using deprecated WEBGL_debug_renderer_info
2021-12-31 15:17:55 +01:00
LordMZTE
8da592c6ab
Add Spinner widget (#1013)
* add spinner widget

* implement requested changes to spinner

- removed enabled field
- cleaned up math
- improved docs

* improve spinner docs & make spinner in demo always active
2021-12-31 14:32:48 +01:00
Emil Ernerfeldt
b5c119ef19
0.16.1 patch release: Add back CtxRef::begin_frame/end_frame (#1019)
`begin_frame`, `end_frame` is more convenient when using egui in a game engine. In particular, 0.16.0 was incompatible with https://github.com/mvlabat/bevy_egui>.
2021-12-31 11:45:57 +01:00
Emil Ernerfeldt
b00edfe97f Remove keyboard focus from a widget if something else is dragged
Closes https://github.com/emilk/egui/issues/618
2021-12-30 23:24:29 +01:00
Emil Ernerfeldt
753d709d3d
Hide console on windows for all examples in release builds (#1008) 2021-12-30 22:43:53 +01:00
Emil Ernerfeldt
4ef21380a2 Add Ui::add_visible and Ui::add_visible_ui
Also rename `Ui::visible` to `Ui::is_visible`.
2021-12-30 22:39:41 +01:00
Emil Ernerfeldt
db110b1690 Remove deprecated functions 2021-12-30 22:37:58 +01:00
Timo
21fe9316d5
Adding missing package for fedora (#1018)
libxcb-devel
2021-12-30 21:52:05 +01:00
Emil Ernerfeldt
0960f38552 Add inter-linking between different forms of documentations and examples 2021-12-29 21:44:48 +01:00
Emil Ernerfeldt
f779e8a346 Add an eframe example of how to install a custom font 2021-12-29 21:43:37 +01:00
Emil Ernerfeldt
0146c7e7fc Release 0.16.0 - Context menus and rich text 2021-12-29 12:07:05 +01:00
Emil Ernerfeldt
77869c21ea Publish new web demo 2021-12-29 12:06:25 +01:00
Emil Ernerfeldt
037ca5f9cd update tts 0.17 -> 0.19 2021-12-29 10:56:16 +01:00
Emil Ernerfeldt
ffd28252ab cargo update 2021-12-29 10:49:40 +01:00
Emil Ernerfeldt
84399cde83 Small tweaks to documentation and demo 2021-12-29 10:49:22 +01:00
Emil Ernerfeldt
d0a47bf8e8 setup_web.sh: don't force-install wasm-bindgen-cli 2021-12-28 21:30:36 +01:00
Emil Ernerfeldt
190c85a40f Rename Texture to FontImage 2021-12-28 21:19:24 +01:00
Emil Ernerfeldt
d775eb3733 Fix wrong label on the feature request PR template 2021-12-28 17:34:27 +01:00
Emil Ernerfeldt
68fca09df9 Improve documentation 2021-12-28 17:34:27 +01:00
Emil Ernerfeldt
00f965de87 Add Context::animate_bool_with_time
Closes https://github.com/emilk/egui/discussions/984
2021-12-28 17:34:27 +01:00
Rasmus Brönnegård
811b974003
Fix typo "the close" -> "this close" in style.rs (#887) 2021-12-28 16:42:22 +01:00
Emil Ernerfeldt
5b9a349c26 Clean up glow painter destroy code 2021-12-28 14:24:59 +01:00
Emil Ernerfeldt
beb2ea2ef6 Add favicon.ico - a single "e" for "egui", using the Ubuntu-Light font 2021-12-28 14:14:49 +01:00
Emil Ernerfeldt
c412fd4a9c Add loading animation while waiting for wasm to load
Closes https://github.com/emilk/egui/issues/1009
2021-12-28 14:13:51 +01:00
Emil Ernerfeldt
cda4c8ba13 Minor cleanup following https://github.com/emilk/egui/pull/999 2021-12-28 13:22:01 +01:00
Emil Ernerfeldt
f919b0cc05 Clean up context menu documentation 2021-12-28 13:09:14 +01:00
Emil Ernerfeldt
369ce95bbd
Add CollapsingHeader::open to control if it is open or collapsed (#1006)
Closes https://github.com/emilk/egui/issues/978
2021-12-28 10:45:32 +01:00
Emil Ernerfeldt
2684929a5d Make Memory::lock_focus public
closes https://github.com/emilk/egui/issues/993
2021-12-28 10:08:28 +01:00
Emil Ernerfeldt
c63996179b README.md: add link to discussion of begin/end calls vs closures 2021-12-28 10:05:19 +01:00
Emil Ernerfeldt
b88bec9ca3 Document that CtxRef is generational and shouldn't be stored
Related to https://github.com/emilk/egui/issues/1005
2021-12-28 10:05:10 +01:00
Emil Ernerfeldt
b7441eeee7
Make epi::Frame cloneable so you can allocate textures in other threads (#999)
Closes https://github.com/emilk/egui/issues/673

Also adds `epi::Image`
2021-12-26 21:21:28 +01:00
Emil Ernerfeldt
647e020824 file_dialogs example: remove macos exemption
this got fixed in the latest winit upgrade
2021-12-26 18:13:29 +01:00
Emil Ernerfeldt
d5efa4bbca 1.56 fix: missing_crate_level_docs -> rusdoc::missing_crate_level_docs 2021-12-26 09:56:14 +01:00
Emil Ernerfeldt
c60d17b91b
Set MSRV to 1.56.0 and use rust edition 2021 (#998) 2021-12-25 19:32:25 +01:00
Emil Ernerfeldt
ee00214511 Add a badge and link to the official discord server
Closes https://github.com/emilk/egui/pull/990
2021-12-25 16:56:24 +01:00
Ivgeni "Iv" Segal
26885c20d0
Add ability to customize the display of hover plot labels (#934)
* Add ability to customize the display of hover plot labels

* Ergonomic enhancement to plot hover label function

* Use Option instead of empty string for custom hover label name arg

* Revert "Use Option instead of empty string for custom hover label name arg"

This reverts commit 296caebb74b7ee993fbff97187791180d16708af.

Co-authored-by: Ivgeni Segal <ivgeni.segal@tovutiteam.com>
2021-12-25 16:29:29 +01:00
Victor Sergienko
d05379902c
#972: ScrollArea::stick_to_bottom() has no effect if ScrollArea is not initialized. (#973) 2021-12-25 16:29:11 +01:00
Aevyrie
c69fe941af
Reverse horizontal scrolling on windows (#966)
* Reverse horizontal scrolling on windows

* Add link to winit issue

Co-authored-by: Emil Ernerfeldt <emil.ernerfeldt@gmail.com>
2021-12-20 23:00:38 +01:00
Jay Oster
dd99f68e82
Update winit to 0.26 (#930)
Also update glium, glutin and rfd
2021-12-20 22:44:53 +01:00
kud1ing
214d2b5d4f
Changlog: mention menu::menu(ui, ...) => ui.menu_button(...) (#956) 2021-12-19 21:17:02 +01:00