Rename `master` branch to `main` (#7034)
For consistency with other repositories, i.e. so I can write `git checkout main` without worrying which repo I'm browsing.
This commit is contained in:
parent
7216d0e386
commit
d0876a1a60
|
|
@ -10,13 +10,13 @@ assignees: ''
|
||||||
<!--
|
<!--
|
||||||
First look if there is already a similar bug report. If there is, upvote the issue with 👍
|
First look if there is already a similar bug report. If there is, upvote the issue with 👍
|
||||||
|
|
||||||
Please also check if the bug is still present in latest master! Do so by adding the following lines to your Cargo.toml:
|
Please also check if the bug is still present in latest main! Do so by adding the following lines to your Cargo.toml:
|
||||||
|
|
||||||
|
|
||||||
[patch.crates-io]
|
[patch.crates-io]
|
||||||
egui = { git = "https://github.com/emilk/egui", branch = "master" }
|
egui = { git = "https://github.com/emilk/egui", branch = "main" }
|
||||||
# if you're using eframe:
|
# if you're using eframe:
|
||||||
eframe = { git = "https://github.com/emilk/egui", branch = "master" }
|
eframe = { git = "https://github.com/emilk/egui", branch = "main" }
|
||||||
-->
|
-->
|
||||||
|
|
||||||
**Describe the bug**
|
**Describe the bug**
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
<!--
|
<!--
|
||||||
Please read the "Making a PR" section of [`CONTRIBUTING.md`](https://github.com/emilk/egui/blob/master/CONTRIBUTING.md) before opening a Pull Request!
|
Please read the "Making a PR" section of [`CONTRIBUTING.md`](https://github.com/emilk/egui/blob/main/CONTRIBUTING.md) before opening a Pull Request!
|
||||||
|
|
||||||
* Keep your PR:s small and focused.
|
* Keep your PR:s small and focused.
|
||||||
* The PR title is what ends up in the changelog, so make it descriptive!
|
* The PR title is what ends up in the changelog, so make it descriptive!
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,9 @@
|
||||||
name: Deploy web demo
|
name: Deploy web demo
|
||||||
|
|
||||||
on:
|
on:
|
||||||
# We only run this on merges to master
|
# We only run this on merges to main
|
||||||
push:
|
push:
|
||||||
branches: ["master"]
|
branches: ["main"]
|
||||||
# Allows you to run this workflow manually from the Actions tab
|
# Allows you to run this workflow manually from the Actions tab
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
# to only run when you do a new github release, comment out above part and uncomment the below trigger.
|
# to only run when you do a new github release, comment out above part and uncomment the below trigger.
|
||||||
|
|
|
||||||
|
|
@ -25,7 +25,7 @@ jobs:
|
||||||
exclude_pattern=$(printf "|^%s" "${exclude_paths[@]}" | sed 's/^|//')
|
exclude_pattern=$(printf "|^%s" "${exclude_paths[@]}" | sed 's/^|//')
|
||||||
|
|
||||||
if comm -23 <(git ls-files | grep -Ev "$exclude_pattern" | sort) <(git lfs ls-files -n | sort) | grep "\.${ext}$"; then
|
if comm -23 <(git ls-files | grep -Ev "$exclude_pattern" | sort) <(git lfs ls-files -n | sort) | grep "\.${ext}$"; then
|
||||||
echo "Error: Found binary file with extension .$ext not tracked by git LFS. See https://github.com/emilk/egui/blob/master/CONTRIBUTING.md#working-with-git-lfs"
|
echo "Error: Found binary file with extension .$ext not tracked by git LFS. See https://github.com/emilk/egui/blob/main/CONTRIBUTING.md#working-with-git-lfs"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
|
||||||
|
|
@ -108,7 +108,7 @@ In order to pave the path for more complex and customizable styling solutions, w
|
||||||
* Improved support for transform layers ([#5465](https://github.com/emilk/egui/pull/5465), [#5468](https://github.com/emilk/egui/pull/5468), [#5429](https://github.com/emilk/egui/pull/5429))
|
* Improved support for transform layers ([#5465](https://github.com/emilk/egui/pull/5465), [#5468](https://github.com/emilk/egui/pull/5468), [#5429](https://github.com/emilk/egui/pull/5429))
|
||||||
|
|
||||||
#### `egui_kittest`
|
#### `egui_kittest`
|
||||||
This release welcomes a new crate to the family: [egui_kittest](https://github.com/emilk/egui/tree/master/crates/egui_kittest).
|
This release welcomes a new crate to the family: [egui_kittest](https://github.com/emilk/egui/tree/main/crates/egui_kittest).
|
||||||
`egui_kittest` is a testing framework for egui, allowing you to test both automation (simulated clicks and other events),
|
`egui_kittest` is a testing framework for egui, allowing you to test both automation (simulated clicks and other events),
|
||||||
and also do screenshot testing (useful for regression tests).
|
and also do screenshot testing (useful for regression tests).
|
||||||
`egui_kittest` is built using [`kittest`](https://github.com/rerun-io/kittest), which is a general GUI testing framework that aims to work with any Rust GUI (not just egui!).
|
`egui_kittest` is built using [`kittest`](https://github.com/rerun-io/kittest), which is a general GUI testing framework that aims to work with any Rust GUI (not just egui!).
|
||||||
|
|
@ -942,7 +942,7 @@ egui_extras::install_image_loaders(egui_ctx);
|
||||||
## 0.18.0 - 2022-04-30
|
## 0.18.0 - 2022-04-30
|
||||||
|
|
||||||
### ⭐ Added
|
### ⭐ Added
|
||||||
* Added `Shape::Callback` for backend-specific painting, [with an example](https://github.com/emilk/egui/tree/master/examples/custom_3d_glow) ([#1351](https://github.com/emilk/egui/pull/1351)).
|
* Added `Shape::Callback` for backend-specific painting, [with an example](https://github.com/emilk/egui/tree/main/examples/custom_3d_glow) ([#1351](https://github.com/emilk/egui/pull/1351)).
|
||||||
* Added `Frame::canvas` ([#1362](https://github.com/emilk/egui/pull/1362)).
|
* Added `Frame::canvas` ([#1362](https://github.com/emilk/egui/pull/1362)).
|
||||||
* `Context::request_repaint` will now wake up UI thread, if integrations has called `Context::set_request_repaint_callback` ([#1366](https://github.com/emilk/egui/pull/1366)).
|
* `Context::request_repaint` will now wake up UI thread, if integrations has called `Context::set_request_repaint_callback` ([#1366](https://github.com/emilk/egui/pull/1366)).
|
||||||
* Added `Plot::allow_scroll`, `Plot::allow_zoom` no longer affects scrolling ([#1382](https://github.com/emilk/egui/pull/1382)).
|
* Added `Plot::allow_scroll`, `Plot::allow_zoom` no longer affects scrolling ([#1382](https://github.com/emilk/egui/pull/1382)).
|
||||||
|
|
|
||||||
42
README.md
42
README.md
|
|
@ -5,8 +5,8 @@
|
||||||
[](https://docs.rs/egui)
|
[](https://docs.rs/egui)
|
||||||
[](https://github.com/rust-secure-code/safety-dance/)
|
[](https://github.com/rust-secure-code/safety-dance/)
|
||||||
[](https://github.com/emilk/egui/actions/workflows/rust.yml)
|
[](https://github.com/emilk/egui/actions/workflows/rust.yml)
|
||||||
[](https://github.com/emilk/egui/blob/master/LICENSE-MIT)
|
[](https://github.com/emilk/egui/blob/main/LICENSE-MIT)
|
||||||
[](https://github.com/emilk/egui/blob/master/LICENSE-APACHE)
|
[](https://github.com/emilk/egui/blob/main/LICENSE-APACHE)
|
||||||
[](https://discord.gg/JFcEma9bJq)
|
[](https://discord.gg/JFcEma9bJq)
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -27,7 +27,7 @@ egui aims to be the easiest-to-use Rust GUI library, and the simplest way to mak
|
||||||
|
|
||||||
egui can be used anywhere you can draw textured triangles, which means you can easily integrate it into your game engine of choice.
|
egui can be used anywhere you can draw textured triangles, which means you can easily integrate it into your game engine of choice.
|
||||||
|
|
||||||
[`eframe`](https://github.com/emilk/egui/tree/master/crates/eframe) is the official egui framework, which supports writing apps for Web, Linux, Mac, Windows, and Android.
|
[`eframe`](https://github.com/emilk/egui/tree/main/crates/eframe) is the official egui framework, which supports writing apps for Web, Linux, Mac, Windows, and Android.
|
||||||
|
|
||||||
|
|
||||||
## Example
|
## Example
|
||||||
|
|
@ -68,19 +68,19 @@ ui.image(egui::include_image!("ferris.png"));
|
||||||
|
|
||||||
## Quick start
|
## Quick start
|
||||||
|
|
||||||
There are simple examples in [the `examples/` folder](https://github.com/emilk/egui/blob/master/examples/). If you want to write a web app, then go to <https://github.com/emilk/eframe_template/> and follow the instructions. The official docs are at <https://docs.rs/egui>. For inspiration and more examples, check out the [the egui web demo](https://www.egui.rs/#demo) and follow the links in it to its source code.
|
There are simple examples in [the `examples/` folder](https://github.com/emilk/egui/blob/main/examples/). If you want to write a web app, then go to <https://github.com/emilk/eframe_template/> and follow the instructions. The official docs are at <https://docs.rs/egui>. For inspiration and more examples, check out the [the egui web demo](https://www.egui.rs/#demo) and follow the links in it to its source code.
|
||||||
|
|
||||||
If you want to integrate egui into an existing engine, go to the [Integrations](#integrations) section.
|
If you want to integrate egui into an existing engine, go to the [Integrations](#integrations) section.
|
||||||
|
|
||||||
If you have questions, use [GitHub Discussions](https://github.com/emilk/egui/discussions). There is also [an egui discord server](https://discord.gg/JFcEma9bJq). If you want to contribute to egui, please read the [Contributing Guidelines](https://github.com/emilk/egui/blob/master/CONTRIBUTING.md).
|
If you have questions, use [GitHub Discussions](https://github.com/emilk/egui/discussions). There is also [an egui discord server](https://discord.gg/JFcEma9bJq). If you want to contribute to egui, please read the [Contributing Guidelines](https://github.com/emilk/egui/blob/main/CONTRIBUTING.md).
|
||||||
|
|
||||||
## Demo
|
## Demo
|
||||||
|
|
||||||
[Click to run egui web demo](https://www.egui.rs/#demo) (works in any browser with Wasm and WebGL support). Uses [`eframe`](https://github.com/emilk/egui/tree/master/crates/eframe).
|
[Click to run egui web demo](https://www.egui.rs/#demo) (works in any browser with Wasm and WebGL support). Uses [`eframe`](https://github.com/emilk/egui/tree/main/crates/eframe).
|
||||||
|
|
||||||
To test the demo app locally, run `cargo run --release -p egui_demo_app`.
|
To test the demo app locally, run `cargo run --release -p egui_demo_app`.
|
||||||
|
|
||||||
The native backend is [`egui_glow`](https://github.com/emilk/egui/tree/master/crates/egui_glow) (using [`glow`](https://crates.io/crates/glow)) and should work out-of-the-box on Mac and Windows, but on Linux you need to first run:
|
The native backend is [`egui_glow`](https://github.com/emilk/egui/tree/main/crates/egui_glow) (using [`glow`](https://crates.io/crates/glow)) and should work out-of-the-box on Mac and Windows, but on Linux you need to first run:
|
||||||
|
|
||||||
`sudo apt-get install -y libclang-dev libgtk-3-dev libxcb-render0-dev libxcb-shape0-dev libxcb-xfixes0-dev libxkbcommon-dev libssl-dev`
|
`sudo apt-get install -y libclang-dev libgtk-3-dev libxcb-render0-dev libxcb-shape0-dev libxcb-xfixes0-dev libxkbcommon-dev libssl-dev`
|
||||||
|
|
||||||
|
|
@ -99,7 +99,7 @@ On Fedora Rawhide you need to run:
|
||||||
* Easy to integrate into any environment
|
* Easy to integrate into any environment
|
||||||
* A simple 2D graphics API for custom painting ([`epaint`](https://docs.rs/epaint)).
|
* A simple 2D graphics API for custom painting ([`epaint`](https://docs.rs/epaint)).
|
||||||
* Pure immediate mode: no callbacks
|
* Pure immediate mode: no callbacks
|
||||||
* Extensible: [easy to write your own widgets for egui](https://github.com/emilk/egui/blob/master/crates/egui_demo_lib/src/demo/toggle_switch.rs)
|
* Extensible: [easy to write your own widgets for egui](https://github.com/emilk/egui/blob/main/crates/egui_demo_lib/src/demo/toggle_switch.rs)
|
||||||
* Modular: You should be able to use small parts of egui and combine them in new ways
|
* Modular: You should be able to use small parts of egui and combine them in new ways
|
||||||
* Safe: there is no `unsafe` code in egui
|
* Safe: there is no `unsafe` code in egui
|
||||||
* Minimal dependencies
|
* Minimal dependencies
|
||||||
|
|
@ -154,9 +154,9 @@ Light Theme:
|
||||||
Heavier dependencies are kept out of `egui`, even as opt-in.
|
Heavier dependencies are kept out of `egui`, even as opt-in.
|
||||||
All code in `egui` is Wasm-friendly (even outside a browser).
|
All code in `egui` is Wasm-friendly (even outside a browser).
|
||||||
|
|
||||||
To load images into `egui` you can use the official [`egui_extras`](https://github.com/emilk/egui/tree/master/crates/egui_extras) crate.
|
To load images into `egui` you can use the official [`egui_extras`](https://github.com/emilk/egui/tree/main/crates/egui_extras) crate.
|
||||||
|
|
||||||
[`eframe`](https://github.com/emilk/egui/tree/master/crates/eframe) on the other hand has a lot of dependencies, including [`winit`](https://crates.io/crates/winit), [`image`](https://crates.io/crates/image), graphics crates, clipboard crates, etc,
|
[`eframe`](https://github.com/emilk/egui/tree/main/crates/eframe) on the other hand has a lot of dependencies, including [`winit`](https://crates.io/crates/winit), [`image`](https://crates.io/crates/image), graphics crates, clipboard crates, etc,
|
||||||
|
|
||||||
## Who is egui for?
|
## Who is egui for?
|
||||||
|
|
||||||
|
|
@ -177,16 +177,16 @@ An integration needs to do the following each frame:
|
||||||
* **Input**: Gather input (mouse, touches, keyboard, screen size, etc) and give it to egui
|
* **Input**: Gather input (mouse, touches, keyboard, screen size, etc) and give it to egui
|
||||||
* Call into the application GUI code
|
* Call into the application GUI code
|
||||||
* **Output**: Handle egui output (cursor changes, paste, texture allocations, …)
|
* **Output**: Handle egui output (cursor changes, paste, texture allocations, …)
|
||||||
* **Painting**: Render the triangle mesh egui produces (see [OpenGL example](https://github.com/emilk/egui/blob/master/crates/egui_glow/src/painter.rs))
|
* **Painting**: Render the triangle mesh egui produces (see [OpenGL example](https://github.com/emilk/egui/blob/main/crates/egui_glow/src/painter.rs))
|
||||||
|
|
||||||
### Official integrations
|
### Official integrations
|
||||||
|
|
||||||
These are the official egui integrations:
|
These are the official egui integrations:
|
||||||
|
|
||||||
* [`eframe`](https://github.com/emilk/egui/tree/master/crates/eframe) for compiling the same app to web/wasm and desktop/native. Uses `egui-winit` and `egui_glow` or `egui-wgpu`
|
* [`eframe`](https://github.com/emilk/egui/tree/main/crates/eframe) for compiling the same app to web/wasm and desktop/native. Uses `egui-winit` and `egui_glow` or `egui-wgpu`
|
||||||
* [`egui_glow`](https://github.com/emilk/egui/tree/master/crates/egui_glow) for rendering egui with [glow](https://github.com/grovesNL/glow) on native and web, and for making native apps
|
* [`egui_glow`](https://github.com/emilk/egui/tree/main/crates/egui_glow) for rendering egui with [glow](https://github.com/grovesNL/glow) on native and web, and for making native apps
|
||||||
* [`egui-wgpu`](https://github.com/emilk/egui/tree/master/crates/egui-wgpu) for [wgpu](https://crates.io/crates/wgpu) (WebGPU API)
|
* [`egui-wgpu`](https://github.com/emilk/egui/tree/main/crates/egui-wgpu) for [wgpu](https://crates.io/crates/wgpu) (WebGPU API)
|
||||||
* [`egui-winit`](https://github.com/emilk/egui/tree/master/crates/egui-winit) for integrating with [winit](https://github.com/rust-windowing/winit)
|
* [`egui-winit`](https://github.com/emilk/egui/tree/main/crates/egui-winit) for integrating with [winit](https://github.com/rust-windowing/winit)
|
||||||
|
|
||||||
### 3rd party integrations
|
### 3rd party integrations
|
||||||
|
|
||||||
|
|
@ -286,7 +286,7 @@ egui includes optional support for [AccessKit](https://accesskit.dev/), which cu
|
||||||
|
|
||||||
The original discussion of accessibility in egui is at <https://github.com/emilk/egui/issues/167>. Now that AccessKit support is merged, providing a strong foundation for future accessibility work, please open new issues on specific accessibility problems.
|
The original discussion of accessibility in egui is at <https://github.com/emilk/egui/issues/167>. Now that AccessKit support is merged, providing a strong foundation for future accessibility work, please open new issues on specific accessibility problems.
|
||||||
|
|
||||||
### What is the difference between [egui](https://docs.rs/egui) and [eframe](https://github.com/emilk/egui/tree/master/crates/eframe)?
|
### What is the difference between [egui](https://docs.rs/egui) and [eframe](https://github.com/emilk/egui/tree/main/crates/eframe)?
|
||||||
|
|
||||||
`egui` is a 2D user interface library for laying out and interacting with buttons, sliders, etc.
|
`egui` is a 2D user interface library for laying out and interacting with buttons, sliders, etc.
|
||||||
`egui` has no idea if it is running on the web or natively, and does not know how to collect input or show things on screen.
|
`egui` has no idea if it is running on the web or natively, and does not know how to collect input or show things on screen.
|
||||||
|
|
@ -303,15 +303,15 @@ If you want to embed 3D into an egui view there are two options:
|
||||||
|
|
||||||
#### `Shape::Callback`
|
#### `Shape::Callback`
|
||||||
Example:
|
Example:
|
||||||
* <https://github.com/emilk/egui/blob/master/examples/custom_3d_glow/src/main.rs>
|
* <https://github.com/emilk/egui/blob/main/examples/custom_3d_glow/src/main.rs>
|
||||||
|
|
||||||
`Shape::Callback` will call your code when egui gets painted, to show anything using whatever the background rendering context is. When using [`eframe`](https://github.com/emilk/egui/tree/master/crates/eframe) this will be [`glow`](https://github.com/grovesNL/glow). Other integrations will give you other rendering contexts, if they support `Shape::Callback` at all.
|
`Shape::Callback` will call your code when egui gets painted, to show anything using whatever the background rendering context is. When using [`eframe`](https://github.com/emilk/egui/tree/main/crates/eframe) this will be [`glow`](https://github.com/grovesNL/glow). Other integrations will give you other rendering contexts, if they support `Shape::Callback` at all.
|
||||||
|
|
||||||
#### Render-to-texture
|
#### Render-to-texture
|
||||||
You can also render your 3D scene to a texture and display it using [`ui.image(…)`](https://docs.rs/egui/latest/egui/struct.Ui.html#method.image). You first need to convert the native texture to an [`egui::TextureId`](https://docs.rs/egui/latest/egui/enum.TextureId.html), and how to do this depends on the integration you use.
|
You can also render your 3D scene to a texture and display it using [`ui.image(…)`](https://docs.rs/egui/latest/egui/struct.Ui.html#method.image). You first need to convert the native texture to an [`egui::TextureId`](https://docs.rs/egui/latest/egui/enum.TextureId.html), and how to do this depends on the integration you use.
|
||||||
|
|
||||||
Examples:
|
Examples:
|
||||||
* Using [`egui-miniquad`]( https://github.com/not-fl3/egui-miniquad): https://github.com/not-fl3/egui-miniquad/blob/master/examples/render_to_egui_image.rs
|
* Using [`egui-miniquad`]( https://github.com/not-fl3/egui-miniquad): https://github.com/not-fl3/egui-miniquad/blob/main/examples/render_to_egui_image.rs
|
||||||
|
|
||||||
|
|
||||||
## Other
|
## Other
|
||||||
|
|
@ -357,7 +357,7 @@ Notable contributions by:
|
||||||
* [@danielkeller](https://github.com/danielkeller): [`Context` refactor](https://github.com/emilk/egui/pull/1050)
|
* [@danielkeller](https://github.com/danielkeller): [`Context` refactor](https://github.com/emilk/egui/pull/1050)
|
||||||
* [@MaximOsipenko](https://github.com/MaximOsipenko): [`Context` lock refactor](https://github.com/emilk/egui/pull/2625)
|
* [@MaximOsipenko](https://github.com/MaximOsipenko): [`Context` lock refactor](https://github.com/emilk/egui/pull/2625)
|
||||||
* [@mwcampbell](https://github.com/mwcampbell): [AccessKit](https://github.com/AccessKit/accesskit) [integration](https://github.com/emilk/egui/pull/2294)
|
* [@mwcampbell](https://github.com/mwcampbell): [AccessKit](https://github.com/AccessKit/accesskit) [integration](https://github.com/emilk/egui/pull/2294)
|
||||||
* [@hasenbanck](https://github.com/hasenbanck), [@s-nie](https://github.com/s-nie), [@Wumpf](https://github.com/Wumpf): [`egui-wgpu`](https://github.com/emilk/egui/tree/master/crates/egui-wgpu)
|
* [@hasenbanck](https://github.com/hasenbanck), [@s-nie](https://github.com/s-nie), [@Wumpf](https://github.com/Wumpf): [`egui-wgpu`](https://github.com/emilk/egui/tree/main/crates/egui-wgpu)
|
||||||
* [@jprochazk](https://github.com/jprochazk): [egui image API](https://github.com/emilk/egui/issues/3291)
|
* [@jprochazk](https://github.com/jprochazk): [egui image API](https://github.com/emilk/egui/issues/3291)
|
||||||
* And [many more](https://github.com/emilk/egui/graphs/contributors?type=a).
|
* And [many more](https://github.com/emilk/egui/graphs/contributors?type=a).
|
||||||
|
|
||||||
|
|
@ -368,7 +368,7 @@ egui is licensed under [MIT](LICENSE-MIT) OR [Apache-2.0](LICENSE-APACHE).
|
||||||
Default fonts:
|
Default fonts:
|
||||||
|
|
||||||
* `emoji-icon-font.ttf`: [Copyright (c) 2014 John Slegers](https://github.com/jslegers/emoji-icon-font) , MIT License
|
* `emoji-icon-font.ttf`: [Copyright (c) 2014 John Slegers](https://github.com/jslegers/emoji-icon-font) , MIT License
|
||||||
* `Hack-Regular.ttf`: <https://github.com/source-foundry/Hack>, [MIT Licence](https://github.com/source-foundry/Hack/blob/master/LICENSE.md)
|
* `Hack-Regular.ttf`: <https://github.com/source-foundry/Hack>, [MIT Licence](https://github.com/source-foundry/Hack/blob/main/LICENSE.md)
|
||||||
* `NotoEmoji-Regular.ttf`: [google.com/get/noto](https://google.com/get/noto), [SIL Open Font License](https://scripts.sil.org/cms/scripts/page.php?site_id=nrsi&id=OFL)
|
* `NotoEmoji-Regular.ttf`: [google.com/get/noto](https://google.com/get/noto), [SIL Open Font License](https://scripts.sil.org/cms/scripts/page.php?site_id=nrsi&id=OFL)
|
||||||
* `Ubuntu-Light.ttf` by [Dalton Maag](http://www.daltonmaag.com/): [Ubuntu font licence](https://ubuntu.com/legal/font-licence)
|
* `Ubuntu-Light.ttf` by [Dalton Maag](http://www.daltonmaag.com/): [Ubuntu font licence](https://ubuntu.com/legal/font-licence)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,7 @@ All crates under the [`crates/`](crates/) folder are published in lock-step, wit
|
||||||
|
|
||||||
The only exception to this are patch releases, where we sometimes only patch a single crate.
|
The only exception to this are patch releases, where we sometimes only patch a single crate.
|
||||||
|
|
||||||
The egui version in egui `master` is always the version of the last published crates. This is so that users can easily patch their egui crates to egui `master` if they want to.
|
The egui version in egui `main` is always the version of the last published crates. This is so that users can easily patch their egui crates to egui `main` if they want to.
|
||||||
|
|
||||||
## Governance
|
## Governance
|
||||||
Releases are generally done by [emilk](https://github.com/emilk/), but the [rerun-io](https://github.com/rerun-io/) organization (where emilk is CTO) also has publish rights to all the crates.
|
Releases are generally done by [emilk](https://github.com/emilk/), but the [rerun-io](https://github.com/rerun-io/) organization (where emilk is CTO) also has publish rights to all the crates.
|
||||||
|
|
@ -53,14 +53,14 @@ We don't update the MSRV in a patch release, unless we really, really need to.
|
||||||
* [ ] bump version numbers in workspace `Cargo.toml`
|
* [ ] bump version numbers in workspace `Cargo.toml`
|
||||||
|
|
||||||
## Actual release
|
## Actual release
|
||||||
I usually do this all on the `master` branch, but doing it in a release branch is also fine, as long as you remember to merge it into `master` later.
|
I usually do this all on the `main` branch, but doing it in a release branch is also fine, as long as you remember to merge it into `main` later.
|
||||||
|
|
||||||
* [ ] Run `typos`
|
* [ ] Run `typos`
|
||||||
* [ ] `git commit -m 'Release 0.x.0 - <release title>'`
|
* [ ] `git commit -m 'Release 0.x.0 - <release title>'`
|
||||||
* [ ] `cargo publish` (see below)
|
* [ ] `cargo publish` (see below)
|
||||||
* [ ] `git tag -a 0.x.0 -m 'Release 0.x.0 - <release title>'`
|
* [ ] `git tag -a 0.x.0 -m 'Release 0.x.0 - <release title>'`
|
||||||
* [ ] `git pull --tags ; git tag -d latest && git tag -a latest -m 'Latest release' && git push --tags origin latest --force ; git push --tags`
|
* [ ] `git pull --tags ; git tag -d latest && git tag -a latest -m 'Latest release' && git push --tags origin latest --force ; git push --tags`
|
||||||
* [ ] merge release PR or push to `master`
|
* [ ] merge release PR or push to `main`
|
||||||
* [ ] check that CI is green
|
* [ ] check that CI is green
|
||||||
* [ ] do a GitHub release: https://github.com/emilk/egui/releases/new
|
* [ ] do a GitHub release: https://github.com/emilk/egui/releases/new
|
||||||
* Follow the format of the last release
|
* Follow the format of the last release
|
||||||
|
|
|
||||||
|
|
@ -5,10 +5,10 @@ authors = ["Emil Ernerfeldt <emil.ernerfeldt@gmail.com>"]
|
||||||
description = "egui framework - write GUI apps that compiles to web and/or natively"
|
description = "egui framework - write GUI apps that compiles to web and/or natively"
|
||||||
edition.workspace = true
|
edition.workspace = true
|
||||||
rust-version.workspace = true
|
rust-version.workspace = true
|
||||||
homepage = "https://github.com/emilk/egui/tree/master/crates/eframe"
|
homepage = "https://github.com/emilk/egui/tree/main/crates/eframe"
|
||||||
license.workspace = true
|
license.workspace = true
|
||||||
readme = "README.md"
|
readme = "README.md"
|
||||||
repository = "https://github.com/emilk/egui/tree/master/crates/eframe"
|
repository = "https://github.com/emilk/egui/tree/main/crates/eframe"
|
||||||
categories = ["gui", "game-development"]
|
categories = ["gui", "game-development"]
|
||||||
keywords = ["egui", "gui", "gamedev"]
|
keywords = ["egui", "gui", "gamedev"]
|
||||||
include = [
|
include = [
|
||||||
|
|
@ -59,7 +59,7 @@ android-native-activity = ["egui-winit/android-native-activity"]
|
||||||
## If you plan on specifying your own fonts you may disable this feature.
|
## If you plan on specifying your own fonts you may disable this feature.
|
||||||
default_fonts = ["egui/default_fonts"]
|
default_fonts = ["egui/default_fonts"]
|
||||||
|
|
||||||
## Use [`glow`](https://github.com/grovesNL/glow) for painting, via [`egui_glow`](https://github.com/emilk/egui/tree/master/crates/egui_glow).
|
## Use [`glow`](https://github.com/grovesNL/glow) for painting, via [`egui_glow`](https://github.com/emilk/egui/tree/main/crates/egui_glow).
|
||||||
glow = ["dep:egui_glow", "dep:glow", "dep:glutin-winit", "dep:glutin"]
|
glow = ["dep:egui_glow", "dep:glow", "dep:glutin-winit", "dep:glutin"]
|
||||||
|
|
||||||
## Enable saving app state to disk.
|
## Enable saving app state to disk.
|
||||||
|
|
@ -90,7 +90,7 @@ web_screen_reader = [
|
||||||
"web-sys/SpeechSynthesisUtterance",
|
"web-sys/SpeechSynthesisUtterance",
|
||||||
]
|
]
|
||||||
|
|
||||||
## Use [`wgpu`](https://docs.rs/wgpu) for painting (via [`egui-wgpu`](https://github.com/emilk/egui/tree/master/crates/egui-wgpu)).
|
## Use [`wgpu`](https://docs.rs/wgpu) for painting (via [`egui-wgpu`](https://github.com/emilk/egui/tree/main/crates/egui-wgpu)).
|
||||||
##
|
##
|
||||||
## This overrides the `glow` feature.
|
## This overrides the `glow` feature.
|
||||||
##
|
##
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,7 @@
|
||||||
|
|
||||||
`eframe` is the official framework library for writing apps using [`egui`](https://github.com/emilk/egui). The app can be compiled both to run natively (for Linux, Mac, Windows, and Android) or as a web app (using [Wasm](https://en.wikipedia.org/wiki/WebAssembly)).
|
`eframe` is the official framework library for writing apps using [`egui`](https://github.com/emilk/egui). The app can be compiled both to run natively (for Linux, Mac, Windows, and Android) or as a web app (using [Wasm](https://en.wikipedia.org/wiki/WebAssembly)).
|
||||||
|
|
||||||
To get started, see the [examples](https://github.com/emilk/egui/tree/master/examples).
|
To get started, see the [examples](https://github.com/emilk/egui/tree/main/examples).
|
||||||
To learn how to set up `eframe` for web and native, go to <https://github.com/emilk/eframe_template/> and follow the instructions there!
|
To learn how to set up `eframe` for web and native, go to <https://github.com/emilk/eframe_template/> and follow the instructions there!
|
||||||
|
|
||||||
There is also a tutorial video at <https://www.youtube.com/watch?v=NtUkr_z7l84>.
|
There is also a tutorial video at <https://www.youtube.com/watch?v=NtUkr_z7l84>.
|
||||||
|
|
@ -16,7 +16,7 @@ For how to use `egui`, see [the egui docs](https://docs.rs/egui).
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
`eframe` uses [`egui_glow`](https://github.com/emilk/egui/tree/master/crates/egui_glow) for rendering, and on native it uses [`egui-winit`](https://github.com/emilk/egui/tree/master/crates/egui-winit).
|
`eframe` uses [`egui_glow`](https://github.com/emilk/egui/tree/main/crates/egui_glow) for rendering, and on native it uses [`egui-winit`](https://github.com/emilk/egui/tree/main/crates/egui-winit).
|
||||||
|
|
||||||
To use on Linux, first run:
|
To use on Linux, first run:
|
||||||
|
|
||||||
|
|
@ -26,12 +26,12 @@ sudo apt-get install libxcb-render0-dev libxcb-shape0-dev libxcb-xfixes0-dev lib
|
||||||
|
|
||||||
You need to either use `edition = "2021"`, or set `resolver = "2"` in the `[workspace]` section of your to-level `Cargo.toml`. See [this link](https://doc.rust-lang.org/edition-guide/rust-2021/default-cargo-resolver.html) for more info.
|
You need to either use `edition = "2021"`, or set `resolver = "2"` in the `[workspace]` section of your to-level `Cargo.toml`. See [this link](https://doc.rust-lang.org/edition-guide/rust-2021/default-cargo-resolver.html) for more info.
|
||||||
|
|
||||||
You can opt-in to the using [`egui-wgpu`](https://github.com/emilk/egui/tree/master/crates/egui-wgpu) for rendering by enabling the `wgpu` feature and setting `NativeOptions::renderer` to `Renderer::Wgpu`.
|
You can opt-in to the using [`egui-wgpu`](https://github.com/emilk/egui/tree/main/crates/egui-wgpu) for rendering by enabling the `wgpu` feature and setting `NativeOptions::renderer` to `Renderer::Wgpu`.
|
||||||
|
|
||||||
## Alternatives
|
## Alternatives
|
||||||
`eframe` is not the only way to write an app using `egui`! You can also try [`egui-miniquad`](https://github.com/not-fl3/egui-miniquad), [`bevy_egui`](https://github.com/mvlabat/bevy_egui), [`egui_sdl2_gl`](https://github.com/ArjunNair/egui_sdl2_gl), and others.
|
`eframe` is not the only way to write an app using `egui`! You can also try [`egui-miniquad`](https://github.com/not-fl3/egui-miniquad), [`bevy_egui`](https://github.com/mvlabat/bevy_egui), [`egui_sdl2_gl`](https://github.com/ArjunNair/egui_sdl2_gl), and others.
|
||||||
|
|
||||||
You can also use `egui_glow` and [`winit`](https://github.com/rust-windowing/winit) to build your own app as demonstrated in <https://github.com/emilk/egui/blob/master/crates/egui_glow/examples/pure_glow.rs>.
|
You can also use `egui_glow` and [`winit`](https://github.com/rust-windowing/winit) to build your own app as demonstrated in <https://github.com/emilk/egui/blob/main/crates/egui_glow/examples/pure_glow.rs>.
|
||||||
|
|
||||||
|
|
||||||
## Limitations when running egui on the web
|
## Limitations when running egui on the web
|
||||||
|
|
|
||||||
|
|
@ -133,7 +133,7 @@ impl CreationContext<'_> {
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
|
|
||||||
/// Implement this trait to write apps that can be compiled for both web/wasm and desktop/native using [`eframe`](https://github.com/emilk/egui/tree/master/crates/eframe).
|
/// Implement this trait to write apps that can be compiled for both web/wasm and desktop/native using [`eframe`](https://github.com/emilk/egui/tree/main/crates/eframe).
|
||||||
pub trait App {
|
pub trait App {
|
||||||
/// Called each time the UI needs repainting, which may be many times per second.
|
/// Called each time the UI needs repainting, which may be many times per second.
|
||||||
///
|
///
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@
|
||||||
//! If you are planning to write an app for web or native,
|
//! If you are planning to write an app for web or native,
|
||||||
//! and want to use [`egui`] for everything, then `eframe` is for you!
|
//! and want to use [`egui`] for everything, then `eframe` is for you!
|
||||||
//!
|
//!
|
||||||
//! To get started, see the [examples](https://github.com/emilk/egui/tree/master/examples).
|
//! To get started, see the [examples](https://github.com/emilk/egui/tree/main/examples).
|
||||||
//! To learn how to set up `eframe` for web and native, go to <https://github.com/emilk/eframe_template/> and follow the instructions there!
|
//! To learn how to set up `eframe` for web and native, go to <https://github.com/emilk/eframe_template/> and follow the instructions there!
|
||||||
//!
|
//!
|
||||||
//! In short, you implement [`App`] (especially [`App::update`]) and then
|
//! In short, you implement [`App`] (especially [`App::update`]) and then
|
||||||
|
|
|
||||||
|
|
@ -9,10 +9,10 @@ authors = [
|
||||||
]
|
]
|
||||||
edition.workspace = true
|
edition.workspace = true
|
||||||
rust-version.workspace = true
|
rust-version.workspace = true
|
||||||
homepage = "https://github.com/emilk/egui/tree/master/crates/egui-wgpu"
|
homepage = "https://github.com/emilk/egui/tree/main/crates/egui-wgpu"
|
||||||
license.workspace = true
|
license.workspace = true
|
||||||
readme = "README.md"
|
readme = "README.md"
|
||||||
repository = "https://github.com/emilk/egui/tree/master/crates/egui-wgpu"
|
repository = "https://github.com/emilk/egui/tree/main/crates/egui-wgpu"
|
||||||
categories = ["gui", "game-development"]
|
categories = ["gui", "game-development"]
|
||||||
keywords = ["wgpu", "egui", "gui", "gamedev"]
|
keywords = ["wgpu", "egui", "gui", "gamedev"]
|
||||||
include = [
|
include = [
|
||||||
|
|
|
||||||
|
|
@ -84,7 +84,7 @@ impl Callback {
|
||||||
///
|
///
|
||||||
/// # Example
|
/// # Example
|
||||||
///
|
///
|
||||||
/// See the [`custom3d_wgpu`](https://github.com/emilk/egui/blob/master/crates/egui_demo_app/src/apps/custom3d_wgpu.rs) demo source for a detailed usage example.
|
/// See the [`custom3d_wgpu`](https://github.com/emilk/egui/blob/main/crates/egui_demo_app/src/apps/custom3d_wgpu.rs) demo source for a detailed usage example.
|
||||||
pub trait CallbackTrait: Send + Sync {
|
pub trait CallbackTrait: Send + Sync {
|
||||||
fn prepare(
|
fn prepare(
|
||||||
&self,
|
&self,
|
||||||
|
|
|
||||||
|
|
@ -5,10 +5,10 @@ authors = ["Emil Ernerfeldt <emil.ernerfeldt@gmail.com>"]
|
||||||
description = "Bindings for using egui with winit"
|
description = "Bindings for using egui with winit"
|
||||||
edition.workspace = true
|
edition.workspace = true
|
||||||
rust-version.workspace = true
|
rust-version.workspace = true
|
||||||
homepage = "https://github.com/emilk/egui/tree/master/crates/egui-winit"
|
homepage = "https://github.com/emilk/egui/tree/main/crates/egui-winit"
|
||||||
license.workspace = true
|
license.workspace = true
|
||||||
readme = "README.md"
|
readme = "README.md"
|
||||||
repository = "https://github.com/emilk/egui/tree/master/crates/egui-winit"
|
repository = "https://github.com/emilk/egui/tree/main/crates/egui-winit"
|
||||||
categories = ["gui", "game-development"]
|
categories = ["gui", "game-development"]
|
||||||
keywords = ["winit", "egui", "gui", "gamedev"]
|
keywords = ["winit", "egui", "gui", "gamedev"]
|
||||||
include = ["../LICENSE-APACHE", "../LICENSE-MIT", "**/*.rs", "Cargo.toml"]
|
include = ["../LICENSE-APACHE", "../LICENSE-MIT", "**/*.rs", "Cargo.toml"]
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
There are no stand-alone egui examples, because egui is not stand-alone!
|
There are no stand-alone egui examples, because egui is not stand-alone!
|
||||||
|
|
||||||
See the top-level [examples](https://github.com/emilk/egui/tree/master/examples/) folder instead.
|
See the top-level [examples](https://github.com/emilk/egui/tree/main/examples/) folder instead.
|
||||||
|
|
||||||
There are also plenty of examples in [the online demo](https://www.egui.rs/#demo). You can find the source code for it at <https://github.com/emilk/egui/tree/master/crates/egui_demo_lib>.
|
There are also plenty of examples in [the online demo](https://www.egui.rs/#demo). You can find the source code for it at <https://github.com/emilk/egui/tree/main/crates/egui_demo_lib>.
|
||||||
|
|
||||||
To learn how to set up `eframe` for web and native, go to <https://github.com/emilk/eframe_template/> and follow the instructions there!
|
To learn how to set up `eframe` for web and native, go to <https://github.com/emilk/eframe_template/> and follow the instructions there!
|
||||||
|
|
|
||||||
|
|
@ -1433,7 +1433,7 @@ impl Context {
|
||||||
/// figured out from the `target_os`.
|
/// figured out from the `target_os`.
|
||||||
///
|
///
|
||||||
/// For web, this can be figured out from the user-agent,
|
/// For web, this can be figured out from the user-agent,
|
||||||
/// and is done so by [`eframe`](https://github.com/emilk/egui/tree/master/crates/eframe).
|
/// and is done so by [`eframe`](https://github.com/emilk/egui/tree/main/crates/eframe).
|
||||||
pub fn os(&self) -> OperatingSystem {
|
pub fn os(&self) -> OperatingSystem {
|
||||||
self.read(|ctx| ctx.os)
|
self.read(|ctx| ctx.os)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,7 @@ use crate::{Context, CursorIcon, Id};
|
||||||
/// - [`crate::Response::dnd_hover_payload`]
|
/// - [`crate::Response::dnd_hover_payload`]
|
||||||
/// - [`crate::Response::dnd_release_payload`]
|
/// - [`crate::Response::dnd_release_payload`]
|
||||||
///
|
///
|
||||||
/// See [this example](https://github.com/emilk/egui/blob/master/crates/egui_demo_lib/src/demo/drag_and_drop.rs).
|
/// See [this example](https://github.com/emilk/egui/blob/main/crates/egui_demo_lib/src/demo/drag_and_drop.rs).
|
||||||
#[doc(alias = "drag and drop")]
|
#[doc(alias = "drag and drop")]
|
||||||
#[derive(Clone, Default)]
|
#[derive(Clone, Default)]
|
||||||
pub struct DragAndDrop {
|
pub struct DragAndDrop {
|
||||||
|
|
|
||||||
|
|
@ -143,7 +143,7 @@
|
||||||
//! }
|
//! }
|
||||||
//! ```
|
//! ```
|
||||||
//!
|
//!
|
||||||
//! For a reference OpenGL renderer, see [the `egui_glow` painter](https://github.com/emilk/egui/blob/master/crates/egui_glow/src/painter.rs).
|
//! For a reference OpenGL renderer, see [the `egui_glow` painter](https://github.com/emilk/egui/blob/main/crates/egui_glow/src/painter.rs).
|
||||||
//!
|
//!
|
||||||
//!
|
//!
|
||||||
//! ### Debugging your renderer
|
//! ### Debugging your renderer
|
||||||
|
|
@ -219,7 +219,7 @@
|
||||||
//! This means it is responsibility of the egui user to store the state (`value`) so that it persists between frames.
|
//! This means it is responsibility of the egui user to store the state (`value`) so that it persists between frames.
|
||||||
//!
|
//!
|
||||||
//! It can be useful to read the code for the toggle switch example widget to get a better understanding
|
//! It can be useful to read the code for the toggle switch example widget to get a better understanding
|
||||||
//! of how egui works: <https://github.com/emilk/egui/blob/master/crates/egui_demo_lib/src/demo/toggle_switch.rs>.
|
//! of how egui works: <https://github.com/emilk/egui/blob/main/crates/egui_demo_lib/src/demo/toggle_switch.rs>.
|
||||||
//!
|
//!
|
||||||
//! Read more about the pros and cons of immediate mode at <https://github.com/emilk/egui#why-immediate-mode>.
|
//! Read more about the pros and cons of immediate mode at <https://github.com/emilk/egui#why-immediate-mode>.
|
||||||
//!
|
//!
|
||||||
|
|
@ -567,7 +567,7 @@ macro_rules! include_image {
|
||||||
///
|
///
|
||||||
/// ```
|
/// ```
|
||||||
/// # egui::__run_test_ui(|ui| {
|
/// # egui::__run_test_ui(|ui| {
|
||||||
/// ui.add(egui::github_link_file_line!("https://github.com/YOUR/PROJECT/blob/master/", "(source code)"));
|
/// ui.add(egui::github_link_file_line!("https://github.com/YOUR/PROJECT/blob/main/", "(source code)"));
|
||||||
/// # });
|
/// # });
|
||||||
/// ```
|
/// ```
|
||||||
#[macro_export]
|
#[macro_export]
|
||||||
|
|
@ -582,7 +582,7 @@ macro_rules! github_link_file_line {
|
||||||
///
|
///
|
||||||
/// ```
|
/// ```
|
||||||
/// # egui::__run_test_ui(|ui| {
|
/// # egui::__run_test_ui(|ui| {
|
||||||
/// ui.add(egui::github_link_file!("https://github.com/YOUR/PROJECT/blob/master/", "(source code)"));
|
/// ui.add(egui::github_link_file!("https://github.com/YOUR/PROJECT/blob/main/", "(source code)"));
|
||||||
/// # });
|
/// # });
|
||||||
/// ```
|
/// ```
|
||||||
#[macro_export]
|
#[macro_export]
|
||||||
|
|
|
||||||
|
|
@ -42,7 +42,7 @@
|
||||||
//! a [`ViewportCommand`] to it using [`Context::send_viewport_cmd`].
|
//! a [`ViewportCommand`] to it using [`Context::send_viewport_cmd`].
|
||||||
//! You can interact with other viewports using [`Context::send_viewport_cmd_to`].
|
//! You can interact with other viewports using [`Context::send_viewport_cmd_to`].
|
||||||
//!
|
//!
|
||||||
//! There is an example in <https://github.com/emilk/egui/tree/master/examples/multiple_viewports/src/main.rs>.
|
//! There is an example in <https://github.com/emilk/egui/tree/main/examples/multiple_viewports/src/main.rs>.
|
||||||
//!
|
//!
|
||||||
//! You can find all available viewports in [`crate::RawInput::viewports`] and the active viewport in
|
//! You can find all available viewports in [`crate::RawInput::viewports`] and the active viewport in
|
||||||
//! [`crate::InputState::viewport`]:
|
//! [`crate::InputState::viewport`]:
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
# egui demo app
|
# egui demo app
|
||||||
This app demonstrates [`egui`](https://github.com/emilk/egui/) and [`eframe`](https://github.com/emilk/egui/tree/master/crates/eframe).
|
This app demonstrates [`egui`](https://github.com/emilk/egui/) and [`eframe`](https://github.com/emilk/egui/tree/main/crates/eframe).
|
||||||
|
|
||||||
View the demo app online at <https://egui.rs>.
|
View the demo app online at <https://egui.rs>.
|
||||||
|
|
||||||
|
|
@ -12,7 +12,7 @@ Run it locally with `cargo run --release -p egui_demo_app`.
|
||||||
./scripts/build_demo_web.sh --open
|
./scripts/build_demo_web.sh --open
|
||||||
```
|
```
|
||||||
|
|
||||||
`egui_demo_app` uses [`egui_demo_lib`](https://github.com/emilk/egui/tree/master/crates/egui_demo_lib).
|
`egui_demo_app` uses [`egui_demo_lib`](https://github.com/emilk/egui/tree/main/crates/egui_demo_lib).
|
||||||
|
|
||||||
|
|
||||||
## Running with `wgpu` backend
|
## Running with `wgpu` backend
|
||||||
|
|
|
||||||
|
|
@ -53,7 +53,7 @@ pub struct HttpApp {
|
||||||
impl Default for HttpApp {
|
impl Default for HttpApp {
|
||||||
fn default() -> Self {
|
fn default() -> Self {
|
||||||
Self {
|
Self {
|
||||||
url: "https://raw.githubusercontent.com/emilk/egui/master/README.md".to_owned(),
|
url: "https://raw.githubusercontent.com/emilk/egui/main/README.md".to_owned(),
|
||||||
promise: Default::default(),
|
promise: Default::default(),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -133,7 +133,7 @@ fn ui_url(ui: &mut egui::Ui, frame: &eframe::Frame, url: &mut String) -> bool {
|
||||||
ui.horizontal(|ui| {
|
ui.horizontal(|ui| {
|
||||||
if ui.button("Source code for this example").clicked() {
|
if ui.button("Source code for this example").clicked() {
|
||||||
*url = format!(
|
*url = format!(
|
||||||
"https://raw.githubusercontent.com/emilk/egui/master/{}",
|
"https://raw.githubusercontent.com/emilk/egui/main/{}",
|
||||||
file!()
|
file!()
|
||||||
);
|
);
|
||||||
trigger_fetch = true;
|
trigger_fetch = true;
|
||||||
|
|
|
||||||
|
|
@ -183,7 +183,7 @@ fn integration_ui(ui: &mut egui::Ui, _frame: &mut eframe::Frame) {
|
||||||
ui.label("egui running inside ");
|
ui.label("egui running inside ");
|
||||||
ui.hyperlink_to(
|
ui.hyperlink_to(
|
||||||
"eframe",
|
"eframe",
|
||||||
"https://github.com/emilk/egui/tree/master/crates/eframe",
|
"https://github.com/emilk/egui/tree/main/crates/eframe",
|
||||||
);
|
);
|
||||||
ui.label(".");
|
ui.label(".");
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -5,10 +5,10 @@ authors = ["Emil Ernerfeldt <emil.ernerfeldt@gmail.com>"]
|
||||||
description = "Example library for egui"
|
description = "Example library for egui"
|
||||||
edition.workspace = true
|
edition.workspace = true
|
||||||
rust-version.workspace = true
|
rust-version.workspace = true
|
||||||
homepage = "https://github.com/emilk/egui/tree/master/crates/egui_demo_lib"
|
homepage = "https://github.com/emilk/egui/tree/main/crates/egui_demo_lib"
|
||||||
license.workspace = true
|
license.workspace = true
|
||||||
readme = "README.md"
|
readme = "README.md"
|
||||||
repository = "https://github.com/emilk/egui/tree/master/crates/egui_demo_lib"
|
repository = "https://github.com/emilk/egui/tree/main/crates/egui_demo_lib"
|
||||||
categories = ["gui", "graphics"]
|
categories = ["gui", "graphics"]
|
||||||
keywords = ["glow", "egui", "gui", "gamedev"]
|
keywords = ["glow", "egui", "gui", "gamedev"]
|
||||||
include = [
|
include = [
|
||||||
|
|
|
||||||
|
|
@ -61,5 +61,5 @@ pub fn password(password: &mut String) -> impl egui::Widget + '_ {
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn url_to_file_source_code() -> String {
|
pub fn url_to_file_source_code() -> String {
|
||||||
format!("https://github.com/emilk/egui/blob/master/{}", file!())
|
format!("https://github.com/emilk/egui/blob/main/{}", file!())
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -121,5 +121,5 @@ pub fn toggle(on: &mut bool) -> impl egui::Widget + '_ {
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn url_to_file_source_code() -> String {
|
pub fn url_to_file_source_code() -> String {
|
||||||
format!("https://github.com/emilk/egui/blob/master/{}", file!())
|
format!("https://github.com/emilk/egui/blob/main/{}", file!())
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -237,7 +237,7 @@ Goals:
|
||||||
2. easy to learn
|
2. easy to learn
|
||||||
3. similar to markdown
|
3. similar to markdown
|
||||||
|
|
||||||
[The reference parser](https://github.com/emilk/egui/blob/master/crates/egui_demo_lib/src/easy_mark/easy_mark_parser.rs) is \~250 lines of code, using only the Rust standard library. The parser uses no look-ahead or recursion.
|
[The reference parser](https://github.com/emilk/egui/blob/main/crates/egui_demo_lib/src/easy_mark/easy_mark_parser.rs) is \~250 lines of code, using only the Rust standard library. The parser uses no look-ahead or recursion.
|
||||||
|
|
||||||
There is never more than one way to accomplish the same thing, and each special character is only used for one thing. For instance `*` is used for *strong* and `-` is used for bullet lists. There is no alternative way to specify the *strong* style or getting a bullet list.
|
There is never more than one way to accomplish the same thing, and each special character is only used for one thing. For instance `*` is used for *strong* and `-` is used for bullet lists. There is no alternative way to specify the *strong* style or getting a bullet list.
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -35,7 +35,7 @@ macro_rules! egui_github_link_file {
|
||||||
};
|
};
|
||||||
($label: expr) => {
|
($label: expr) => {
|
||||||
egui::github_link_file!(
|
egui::github_link_file!(
|
||||||
"https://github.com/emilk/egui/blob/master/",
|
"https://github.com/emilk/egui/blob/main/",
|
||||||
egui::RichText::new($label).small()
|
egui::RichText::new($label).small()
|
||||||
)
|
)
|
||||||
};
|
};
|
||||||
|
|
@ -49,7 +49,7 @@ macro_rules! egui_github_link_file_line {
|
||||||
};
|
};
|
||||||
($label: expr) => {
|
($label: expr) => {
|
||||||
egui::github_link_file_line!(
|
egui::github_link_file_line!(
|
||||||
"https://github.com/emilk/egui/blob/master/",
|
"https://github.com/emilk/egui/blob/main/",
|
||||||
egui::RichText::new($label).small()
|
egui::RichText::new($label).small()
|
||||||
)
|
)
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -5,10 +5,10 @@ authors = ["Emil Ernerfeldt <emil.ernerfeldt@gmail.com>"]
|
||||||
description = "Bindings for using egui natively using the glow library"
|
description = "Bindings for using egui natively using the glow library"
|
||||||
edition.workspace = true
|
edition.workspace = true
|
||||||
rust-version.workspace = true
|
rust-version.workspace = true
|
||||||
homepage = "https://github.com/emilk/egui/tree/master/crates/egui_glow"
|
homepage = "https://github.com/emilk/egui/tree/main/crates/egui_glow"
|
||||||
license.workspace = true
|
license.workspace = true
|
||||||
readme = "README.md"
|
readme = "README.md"
|
||||||
repository = "https://github.com/emilk/egui/tree/master/crates/egui_glow"
|
repository = "https://github.com/emilk/egui/tree/main/crates/egui_glow"
|
||||||
categories = ["gui", "game-development"]
|
categories = ["gui", "game-development"]
|
||||||
keywords = ["glow", "egui", "gui", "gamedev"]
|
keywords = ["glow", "egui", "gui", "gamedev"]
|
||||||
include = [
|
include = [
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,7 @@ This crates provides bindings between [`egui`](https://github.com/emilk/egui) an
|
||||||
* Render egui using glow on both native and web.
|
* Render egui using glow on both native and web.
|
||||||
* Write cross platform native egui apps (with the `winit` feature).
|
* Write cross platform native egui apps (with the `winit` feature).
|
||||||
|
|
||||||
To write web apps using `glow` you can use [`eframe`](https://github.com/emilk/egui/tree/master/crates/eframe) (which uses `egui_glow` for rendering).
|
To write web apps using `glow` you can use [`eframe`](https://github.com/emilk/egui/tree/main/crates/eframe) (which uses `egui_glow` for rendering).
|
||||||
|
|
||||||
To use on Linux, first run:
|
To use on Linux, first run:
|
||||||
|
|
||||||
|
|
@ -17,7 +17,7 @@ To use on Linux, first run:
|
||||||
sudo apt-get install libxcb-render0-dev libxcb-shape0-dev libxcb-xfixes0-dev libxkbcommon-dev libssl-dev
|
sudo apt-get install libxcb-render0-dev libxcb-shape0-dev libxcb-xfixes0-dev libxkbcommon-dev libssl-dev
|
||||||
```
|
```
|
||||||
|
|
||||||
This crate optionally depends on [`egui-winit`](https://github.com/emilk/egui/tree/master/crates/egui-winit).
|
This crate optionally depends on [`egui-winit`](https://github.com/emilk/egui/tree/main/crates/egui-winit).
|
||||||
|
|
||||||
Test the example with:
|
Test the example with:
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -113,7 +113,7 @@ pub struct Painter {
|
||||||
///
|
///
|
||||||
/// # Example
|
/// # Example
|
||||||
///
|
///
|
||||||
/// See the [`custom3d_glow`](https://github.com/emilk/egui/blob/master/crates/egui_demo_app/src/apps/custom3d_wgpu.rs) demo source for a detailed usage example.
|
/// See the [`custom3d_glow`](https://github.com/emilk/egui/blob/main/crates/egui_demo_app/src/apps/custom3d_wgpu.rs) demo source for a detailed usage example.
|
||||||
pub struct CallbackFn {
|
pub struct CallbackFn {
|
||||||
f: Box<dyn Fn(PaintCallbackInfo, &Painter) + Sync + Send>,
|
f: Box<dyn Fn(PaintCallbackInfo, &Painter) + Sync + Send>,
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -132,7 +132,7 @@ impl Display for SnapshotError {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
err => {
|
err => {
|
||||||
write!(f, "Error decoding snapshot: {err:?}\nAt: {path:?}. Make sure git-lfs is setup correctly. Read the instructions here: https://github.com/emilk/egui/blob/master/CONTRIBUTING.md#making-a-pr")
|
write!(f, "Error decoding snapshot: {err:?}\nAt: {path:?}. Make sure git-lfs is setup correctly. Read the instructions here: https://github.com/emilk/egui/blob/main/CONTRIBUTING.md#making-a-pr")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1 +1 @@
|
||||||
`egui_web` used to be a standalone crate, but has now been moved into [`eframe`](https://github.com/emilk/egui/tree/master/crates/eframe).
|
`egui_web` used to be a standalone crate, but has now been moved into [`eframe`](https://github.com/emilk/egui/tree/main/crates/eframe).
|
||||||
|
|
|
||||||
|
|
@ -5,10 +5,10 @@ authors = ["Emil Ernerfeldt <emil.ernerfeldt@gmail.com>"]
|
||||||
description = "Minimal 2D math library for GUI work"
|
description = "Minimal 2D math library for GUI work"
|
||||||
edition.workspace = true
|
edition.workspace = true
|
||||||
rust-version.workspace = true
|
rust-version.workspace = true
|
||||||
homepage = "https://github.com/emilk/egui/tree/master/crates/emath"
|
homepage = "https://github.com/emilk/egui/tree/main/crates/emath"
|
||||||
license.workspace = true
|
license.workspace = true
|
||||||
readme = "README.md"
|
readme = "README.md"
|
||||||
repository = "https://github.com/emilk/egui/tree/master/crates/emath"
|
repository = "https://github.com/emilk/egui/tree/main/crates/emath"
|
||||||
categories = ["mathematics", "gui"]
|
categories = ["mathematics", "gui"]
|
||||||
keywords = ["math", "gui"]
|
keywords = ["math", "gui"]
|
||||||
include = ["../LICENSE-APACHE", "../LICENSE-MIT", "**/*.rs", "Cargo.toml"]
|
include = ["../LICENSE-APACHE", "../LICENSE-MIT", "**/*.rs", "Cargo.toml"]
|
||||||
|
|
|
||||||
|
|
@ -5,10 +5,10 @@ authors = ["Emil Ernerfeldt <emil.ernerfeldt@gmail.com>"]
|
||||||
description = "Minimal 2D graphics library for GUI work"
|
description = "Minimal 2D graphics library for GUI work"
|
||||||
edition.workspace = true
|
edition.workspace = true
|
||||||
rust-version.workspace = true
|
rust-version.workspace = true
|
||||||
homepage = "https://github.com/emilk/egui/tree/master/crates/epaint"
|
homepage = "https://github.com/emilk/egui/tree/main/crates/epaint"
|
||||||
license = "MIT OR Apache-2.0"
|
license = "MIT OR Apache-2.0"
|
||||||
readme = "README.md"
|
readme = "README.md"
|
||||||
repository = "https://github.com/emilk/egui/tree/master/crates/epaint"
|
repository = "https://github.com/emilk/egui/tree/main/crates/epaint"
|
||||||
categories = ["graphics", "gui"]
|
categories = ["graphics", "gui"]
|
||||||
keywords = ["graphics", "gui", "egui"]
|
keywords = ["graphics", "gui", "egui"]
|
||||||
include = [
|
include = [
|
||||||
|
|
|
||||||
|
|
@ -5,10 +5,10 @@ authors = ["Emil Ernerfeldt <emil.ernerfeldt@gmail.com>"]
|
||||||
description = "Default fonts for use in epaint / egui"
|
description = "Default fonts for use in epaint / egui"
|
||||||
edition.workspace = true
|
edition.workspace = true
|
||||||
rust-version.workspace = true
|
rust-version.workspace = true
|
||||||
homepage = "https://github.com/emilk/egui/tree/master/crates/epaint_default_fonts"
|
homepage = "https://github.com/emilk/egui/tree/main/crates/epaint_default_fonts"
|
||||||
license = "(MIT OR Apache-2.0) AND OFL-1.1 AND Ubuntu-font-1.0" # OFL and UFL are from the font files themselves.
|
license = "(MIT OR Apache-2.0) AND OFL-1.1 AND Ubuntu-font-1.0" # OFL and UFL are from the font files themselves.
|
||||||
readme = "README.md"
|
readme = "README.md"
|
||||||
repository = "https://github.com/emilk/egui/tree/master/crates/epaint_default_fonts"
|
repository = "https://github.com/emilk/egui/tree/main/crates/epaint_default_fonts"
|
||||||
categories = ["graphics", "gui"]
|
categories = ["graphics", "gui"]
|
||||||
keywords = ["graphics", "gui", "egui"]
|
keywords = ["graphics", "gui", "egui"]
|
||||||
include = [
|
include = [
|
||||||
|
|
|
||||||
|
|
@ -1,10 +1,10 @@
|
||||||
# `egui` and `eframe` examples
|
# `egui` and `eframe` examples
|
||||||
All the examples in this folder uses [`eframe`](https://github.com/emilk/egui/tree/master/crates/eframe) to set up a window for [`egui`](https://github.com/emilk/egui/). Some examples are specific to `eframe`, but many are applicable to any `egui` integration.
|
All the examples in this folder uses [`eframe`](https://github.com/emilk/egui/tree/main/crates/eframe) to set up a window for [`egui`](https://github.com/emilk/egui/). Some examples are specific to `eframe`, but many are applicable to any `egui` integration.
|
||||||
|
|
||||||
There are a lot more examples at <https://www.egui.rs>, and it has links to the source code of each example.
|
There are a lot more examples at <https://www.egui.rs>, and it has links to the source code of each example.
|
||||||
|
|
||||||
Also check out the official docs at <https://docs.rs/egui> and <https://docs.rs/eframe>.
|
Also check out the official docs at <https://docs.rs/egui> and <https://docs.rs/eframe>.
|
||||||
|
|
||||||
Note that all the examples on `master` are for the latest `master` version of `egui`.
|
Note that all the examples on `main` are for the latest `main` version of `egui`.
|
||||||
|
|
||||||
If you want to look for examples for a specific version of egui, go to that tag, e.g. <https://github.com/emilk/egui/tree/latest/examples>.
|
If you want to look for examples for a specific version of egui, go to that tag, e.g. <https://github.com/emilk/egui/tree/latest/examples>.
|
||||||
|
|
|
||||||
|
|
@ -6,4 +6,4 @@ This folder contains the files required for the egui web demo hosted at <https:/
|
||||||
* Open <http://localhost:8765/index.html>
|
* Open <http://localhost:8765/index.html>
|
||||||
|
|
||||||
## Deploying egui.rs
|
## Deploying egui.rs
|
||||||
Each merge into `master` will trigger a new deploy
|
Each merge into `main` will trigger a new deploy
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue