Emil Ernerfeldt
c71090473b
glow-vs-web cleanup following https://github.com/emilk/egui/pull/868
3 years ago
triangle drawer
804722a1ba
Make egui_glow painter to work on web ( #868 )
Add WebGL1 and WebGL2 support to glow painter.
Add "glow" feature to egui_web to use the glow painter there.
Make winit an optional part of egui_glow
3 years ago
Emil Ernerfeldt
1dbe608e73
Refactor integrations ( #871 )
* Unify code in egui_glium and egui_glow into egui_winit::EpiIntegration
* Simplify `EguiGlium` interface
* Simplify `EguiGlow` interface
* egui_web refactor: merge `WebBackend` into `AppRunner`
3 years ago
sumibi-yakitori
b1716be745
egui_web: constrain the IME text agent to the canvas ( #830 )
limit the position of the text agent to the height of the client area
3 years ago
Emil Ernerfeldt
eda1d91654
Add culling of the painting for most widgets
This is a good early-out for widgets in `ScrollAreas`, but
also prepares for speeding up the first pass of a possible two-pass
version of egui: https://github.com/emilk/egui/issues/843
3 years ago
5225225
461f380a24
egui-winit: Fix shift key getting stuck with shift:both_capslock X11 option set ( #849 )
Listen for modifiers using ModifiersChanged
3 years ago
Emil Ernerfeldt
09b8269326
Rich text for all widgets ( #855 )
Introduce `RichText` and `WidgetText`
3 years ago
Emil Ernerfeldt
9378cd5c6e
ScrollArea: add methods to control horizontal scroll offset
Closes https://github.com/emilk/egui/issues/864
3 years ago
Linus Behrbohm
b9368aba13
Fix Response::context_menu return type ( #857 )
3 years ago
Emil Ernerfeldt
78dfde40b2
Remove deprecated functions
3 years ago
Emil Ernerfeldt
b551dfec81
fix broken docstring link
3 years ago
Emil Ernerfeldt
081485bcaf
Make it cheaper to clone `Memory` if there are a lot of persisted values
3 years ago
Emil Ernerfeldt
3819ec6fc7
Update "password" demo (storing widget state) after #836 refactor
https://github.com/emilk/egui/pull/836
3 years ago
Emil Ernerfeldt
c7638ca7f5
Add read/write of TextEdit cursor state ( #848 )
* Rename `CursorPair` to `CursorRange`
* Easymark editor: add keyboard shortcuts to toggle bold, italics etc
* Split up TextEdit into separate files
* Add TextEdit::show that returns a rich TextEditOutput object with response, galley and cursor
* Rename text_edit::State to TextEditState
3 years ago
Emil Ernerfeldt
ddd52f47c5
Add tessellation option to toggle rounding text to pixel coordinates
On by default and only there for testing
3 years ago
Emil Ernerfeldt
8e4fd942a9
Refactor memory data ( #836 )
This refactors the widget state storage introduced by @optozorax in https://github.com/emilk/egui/pull/257
* Unify the four buckets (`data`, `data_temp`, `id_data` and `id_data_temp`) into a single `data`.
* Less complexity, and also less chance of error (storing in one bucket, reading from another).
* Store data by `Id` and `TypeId`.
* Users can thus reuse the same `Id` to store many types.
* Uses a simple xor of id and typeid, which is fast and good since both id and typeid are already high-entropy hashes.
* Use different suffixes on the functions to pick if you want the data persisted or not (`get_temp`, `insert_persisted`, etc).
* Writing with one suffix and reading with the other works.
* To store state not bound to a specific `Id` (i.e. only based on type), use the new `Id::null` as the key.
3 years ago
Emil Ernerfeldt
bbe0f6089c
Context-menu: fix right-click edge-case
response.hovered() checks a larger rect which includes the item spacing,
and it always matches the hover effect.
3 years ago
Emil Ernerfeldt
41f77ba7d7
Clean up some of the new context menus
Follow-up to https://github.com/emilk/egui/pull/543
* Add entry to CHANGELOG.md
* Add entry to contributors in README.md
* Improve documentation
* Simplify demo
3 years ago
Linus Behrbohm
46fb9ff09b
Context menus ( #543 )
Main usage: `response.context_menu(…)` and `ui.menu_button`
3 years ago
Emil Ernerfeldt
b31ca7efc9
PR template: remind people to run `cargo fmt` and `cargo clippy`
3 years ago
Emil Ernerfeldt
445488755f
Point contributors to the new egui Discord
3 years ago
Emil Ernerfeldt
c335c56de1
dancing_string demo: handle large `input.time`
casting time to f32 is a bad idea if the time is seconds since epoch
as it is on some integrations.
3 years ago
Emil Ernerfeldt
c090497727
Add 0.15.0 release code editor gif used in CHANGELOG.md
3 years ago
Emil Ernerfeldt
08cc07bb2d
Release 0.15.0 - Syntax highlighting, hscroll, egui-winit and egui_glow
3 years ago
Emil Ernerfeldt
c3f61b67fe
New web demo
3 years ago
Emil Ernerfeldt
316202c33a
egui_web: improve text input on mobile and for IME
3 years ago
Emil Ernerfeldt
9a9b1b8746
On touch screens, prioritize drag-to-scroll over drag-to-select text
On mobile, click first, then edit the text.
Otherwise a lot of areas become difficult to scroll on mobile.
3 years ago
Emil Ernerfeldt
17f0ae22c9
Code example demo: remove extra ScrollArea
3 years ago
Emil Ernerfeldt
da09a5c69c
Fix compilation with "serialize" feature without "persistence" feature
3 years ago
Emil Ernerfeldt
4ace85b780
Fix: '\t' always take up the width of four spaces
3 years ago
Emil Ernerfeldt
96b642a7f5
Improve issue template instructions
3 years ago
Emil Ernerfeldt
7c82111234
Update changelog with credits
Thanks to:
* [AlexApps99](https://github.com/AlexApps99 )
* [baysmith](https://github.com/baysmith )
* [bpostlethwaite](https://github.com/bpostlethwaite )
* [cwfitzgerald](https://github.com/cwfitzgerald )
* [DrOptix](https://github.com/DrOptix )
* [JerzySpendel](https://github.com/JerzySpendel )
* [NiceneNerd](https://github.com/NiceneNerd )
* [parasyte](https://github.com/parasyte )
* [spersson](https://github.com/spersson )
* [Stock84-dev](https://github.com/Stock84-dev )
* [sumibi-yakitori](https://github.com/sumibi-yakitori )
* [t18b219k](https://github.com/t18b219k )
* [TobTobXX](https://github.com/TobTobXX )
* [zu1k](https://github.com/zu1k )
3 years ago
Emil Ernerfeldt
39c6c7e5c9
Small code cleanup
3 years ago
Emil Ernerfeldt
a3ba85dbb3
Improve docs
3 years ago
Emil Ernerfeldt
4194a83a5e
Update ron 0.6 -> 0.7
3 years ago
Emil Ernerfeldt
5301043a77
cargo update
3 years ago
Emil Ernerfeldt
6185ee8ce4
Demo: add button to reset the demo
3 years ago
Emil Ernerfeldt
5d463b2af7
Remove serde_json from egui dev-dependencies
3 years ago
Caleb Smith
79d1ede496
Add `Frame::set_window_title()` ( #828 )
* Add `Frame::set_window_title()`
* Changelog and fmt for `Frame::set_window_title()`
Co-authored-by: Caleb Smith <caleb@myrvmail.com>
3 years ago
Emil Ernerfeldt
26c6cea117
Credit notable contributors
@n2 @optozorax @quadruple-output @EmbersArc @AsmPrgmC3 @AlexApps99
Chosen for their substantial contributions
3 years ago
sumibi-yakitori
19766bfe4c
Fix when a string containing CRLF is pasted from the clipboard ( #826 )
3 years ago
Emil Ernerfeldt
2a9037cd90
Clean up epaint mutex code
3 years ago
Emil Ernerfeldt
dd50cba9a7
Optimize debug builds
3 years ago
Emil Ernerfeldt
d97a369c44
End statements with semicolon (clippy::semicolon_if_nothing_returned)
3 years ago
Emil Ernerfeldt
ab3be8aca3
Use for-loop instead of Iterator::for_each
3 years ago
Emil Ernerfeldt
40445c450c
use map_or and map_or_else
3 years ago
Emil Ernerfeldt
a0cd41755e
Add more clippy lints
3 years ago
Emil Ernerfeldt
087c6695bb
Handle having no fonts (missing "default_fonts" feature) without a crash
3 years ago
Emil Ernerfeldt
19a2a57f80
Rename and clean-up the "pure" glium and glow examples
3 years ago
Emil Ernerfeldt
dd5d41d04e
Improve backend panel in demo
3 years ago