Commit graph

2069 commits

Author SHA1 Message Date
Emil Ernerfeldt
e5ccfedd61 Escape some strings in build_demo_web.sh 2022-04-30 17:18:31 +02:00
Emil Ernerfeldt
462ad5a7f6 egui_demo_app: fall back to dark mode if there is no system preference 2022-04-30 17:18:31 +02:00
Emil Ernerfeldt
3ace620f37 Code cleanup in eframe web backend 2022-04-30 17:18:31 +02:00
Emil Ernerfeldt
9b9c5005d3 CI and check.sh: run cargo doc for all crates 2022-04-30 15:51:46 +02:00
Emil Ernerfeldt
603e5bc5fb Add Rect::lerp 2022-04-30 15:50:12 +02:00
Emil Ernerfeldt
b137f16472 Make members of Response public, but hide documentation
Discourage their direct use, but allow it
2022-04-30 15:49:50 +02:00
Emil Ernerfeldt
c869f67066 Simplify file_dialog example 2022-04-30 15:49:22 +02:00
Emil Ernerfeldt
8a2470b45e example hello_world: remove frame.set_window_size
it doesn't work very well
2022-04-30 15:47:55 +02:00
Emil Ernerfeldt
afd27ca664 Simplify eframe web panic handler code 2022-04-30 15:47:34 +02:00
Emil Ernerfeldt
1983d19614 eframe: fix wrong clear color on native 2022-04-30 15:42:35 +02:00
Emil Ernerfeldt
da2ce58127 egui_demo_app: don't do a transparent native window
It doesn't work great on Mac
2022-04-30 15:42:18 +02:00
Emil Ernerfeldt
e1bcaeebe5 App::clear_color: give egui::Visuals as argument 2022-04-30 15:41:43 +02:00
Emil Ernerfeldt
8303523ccf
Precompute rounded vertices (#1547)
Co-authored-by: Daniel Buch Hansen <boogiewasthere@gmail.com>
2022-04-30 13:14:33 +02:00
Emil Ernerfeldt
3a83a600bb
Add a custom 3D demo using glow to egui_demo_app (#1546) 2022-04-30 12:58:29 +02:00
Emil Ernerfeldt
bb421c7e8a
Remove egui_web and epi (#1545)
* Remove integration name (it is always eframe)

* Remove egui_web crate

* Move egui_web/CHANGELOG.md into eframe/CHANGELOG.md

* Remove all mentions of egui_web

* Remove epi crate and absorb into eframe

* egui_glow: only use puffin on native

* Remove WASM doc from CI (we don't generate it anyways!)

* Remove eframe::epi and improve eframe docs
2022-04-30 10:44:35 +02:00
Emil Ernerfeldt
18d529203a Publish new web demo to fix source links following PR #1540
https://github.com/emilk/egui/pull/1540
2022-04-29 08:23:56 +02:00
Emil Ernerfeldt
ed002acc68
Refactor: move things into eframe (#1542)
* Move all epi-related code from egui_glow into eframe

* Move epi stuff from egui-winit into eframe

* Remove mention of epi in egui

* Remove mention of epi in egui_glium

* Remove trait epi::NativeTexture

* Remove confusing mentions of epi

* Refactor egui_web: break up into smaller files

* Clean up feature flags further, and update changelogs

* Clean up check.sh

* Small cleanup of egui_web/Cargo.toml

* Fix dependencies for pure_glow example

* Fix clippy false positive
2022-04-29 08:17:49 +02:00
Nihaal Sangha
5ea51c3f0b
Fix typo in README (#1533) 2022-04-29 00:36:04 +02:00
Emil Ernerfeldt
881f9b4161 Deprecate `CollapsingHeader::selectable/selected
Better to use the more powerful CollapsingState::show_header
2022-04-28 20:06:55 +02:00
Emil Ernerfeldt
355d70d2b9
Move code from egui_demo_lib to egui_demo_app (#1540)
Also clean up feature names and dependencies
2022-04-28 11:23:34 +02:00
Emil Ernerfeldt
39917bec26
Collapsing header with custom header (#1538)
* Returns openness in CollapsingResponse
* Make CollapsingState a building block for custom collapsing headers
* Add a demo of the custom collapsing header
* Revert to much simpler tree demo
* Add CollapsingState::is_open and CollapsingState::set_open
2022-04-28 11:09:44 +02:00
Emil Ernerfeldt
8e266760e2 Silence warnings about unused profiling macros in egui-winit 2022-04-27 10:15:32 +02:00
Emil Ernerfeldt
1133f3a42b Improve look of color button and show_color slightly 2022-04-27 10:06:42 +02:00
Emil Ernerfeldt
06802cb0a0 Add Rounding::at_least and Rounding::at_most 2022-04-27 10:05:09 +02:00
Emil Ernerfeldt
e3b77e320a Fix broken doclink 2022-04-27 09:59:05 +02:00
Emil Ernerfeldt
2fd20308e5 Add Ui::toggle_value 2022-04-26 21:36:22 +02:00
Emil Ernerfeldt
4d2eb5b71e Don't export macros that should only be pub(crate) 2022-04-25 22:01:32 +02:00
Emil Ernerfeldt
95c0174331 Change canvas frame margin two points 2022-04-25 16:58:24 +02:00
Emil Ernerfeldt
0862712595 Add Vec2::dot 2022-04-25 11:26:54 +02:00
trevyn
888cd9c3eb
Don't paint insertion point if text is immutable (#1523) 2022-04-21 09:19:40 +02:00
Emil Ernerfeldt
c70c72ef61 eframe: make sure we wait for FileStorage to complete the save
Closes https://github.com/emilk/egui/pull/1520
2022-04-20 21:54:31 +02:00
Emil Ernerfeldt
f789159a4a Don't persist Grid sizes
A) there are potentially a lot of Grids, using up a lot of space
(and therefore serialization time).

B) if the code changes, the grid should also change,
and not remember old sizes
2022-04-19 21:28:45 +02:00
Emil Ernerfeldt
558891c146 eframe native: persist app state in background thread
Gives smoother frame rate
2022-04-19 21:26:35 +02:00
Emil Ernerfeldt
1dee439ab1 Added CursorIcons for resizing columns, rows and 8 cardinal directions 2022-04-19 16:56:27 +02:00
trevyn
2932c36238
Add triple-click support (#1512) 2022-04-19 15:14:55 +02:00
Emil Ernerfeldt
4231a5303b Clean up custom plot axis demo 2022-04-19 11:43:22 +02:00
Emil Ernerfeldt
e82ea0c4b4 Plot: estimate bounds for generator functions 2022-04-19 11:43:04 +02:00
Emil Ernerfeldt
cde5f95fc9 code cleanup: replace some for_each with normal for-loops 2022-04-19 11:42:05 +02:00
Jan Haller
e22f6d9a7e
Customize grid spacing in plots (#1180) 2022-04-19 11:35:05 +02:00
Emil Ernerfeldt
676ff047e9 Add Ui::scroll_with_delta, and improve scroll docs 2022-04-19 10:46:24 +02:00
Emil Ernerfeldt
5414e8a7fb Rename Painter::sub_region to Painter::with_clip_rect 2022-04-19 10:00:34 +02:00
Emil Ernerfeldt
2d2022fb72
Add Link widget (#1506)
This looks like a Hyperlink, but doesn't do anything when clicked.
Or rather: it lets the user decide what happens on click.

Closes https://github.com/emilk/egui/issues/1152
2022-04-16 22:55:15 +02:00
Boby
96335d5f45
added epi::Frame::set_window_pos (#1505)
this allows setting the position of window at runtime
2022-04-16 22:27:22 +02:00
Emil Ernerfeldt
2b861f86e8 egui_web: Ignore input of "GroupNext"
Closes https://github.com/emilk/egui/issues/510
2022-04-16 10:38:25 +02:00
bigfarts
2ca72e0bae
Add line breaking rules for Japanese text. Fixes #1497. (#1498)
This allows line breaks after any kana, unless they are immediately followed by a gyōtō kinsoku character, in which case the line may not break at that point.

Also pedantically renamed is_chinese to is_cjk_ideograph as is_chinese will also cause line breaks on Japanese kanji.
2022-04-16 10:36:16 +02:00
Zachary Kohnen
abf340c62a
egui_web: Fix misplaced resize and other event handlers (#1503)
Fix copy-paste error introduced in #1306
2022-04-16 10:08:46 +02:00
Emil Ernerfeldt
2355828d41 Remove epaint::mutex::Arc type alias 2022-04-15 15:18:21 +02:00
Emil Ernerfeldt
5a78213421
Enable depth buffer in WebGL backend (#1499)
This is useful when embedding 3D into eframe using egui::PaintCallback
2022-04-15 12:41:42 +02:00
Emil Ernerfeldt
f3e31391e0 Pass clip rectangle to PaintCallback 2022-04-15 10:31:33 +02:00
Stanisław Jelnicki
2745699bd6
Add Ui::spinner shortcut method (#1494) 2022-04-15 07:39:08 +02:00