Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: vladbat00/bevy_egui
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v0.20.3
Choose a base ref
...
head repository: vladbat00/bevy_egui
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v0.21.0
Choose a head ref
  • 8 commits
  • 12 files changed
  • 7 contributors

Commits on Jul 10, 2023

  1. Update to bevy 0.11 (#188)

    * update to bevy main
    
    * fix compilation with bevy 10f5c920
    
    * cargo.toml points to official bevy crate
    
    * cargo fmt
    
    * fix compiling on wasm
    
    * cargo fmt nightly
    
    * fix doc link
    Vrixyz authored Jul 10, 2023

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    22bf74a View commit details
  2. Update GitHub Actions CI (#183)

    The following updates are performed:
    * update actions/cache to v3
    * update actions/checkout to v3
    * replace unmaintained actions-rs/toolchain by dtolnay/rust-toolchain
    * replace unmaintained actions-rs/cargo by direct invocation of cargo
    striezel authored Jul 10, 2023

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    ecd0ab0 View commit details
  3. Gui touch event (#180)

    * add touch event
    
    * Fixed touch bug
    
    * Added clearing of touch events, changed winit patch, updated ui example
    
    * Fix a missing newline
    
    ---------
    
    Co-authored-by: thiolliere <gui.thiolliere@gmail.com>
    Co-authored-by: mvlabat <mvlabat@gmail.com>
    3 people authored Jul 10, 2023
    Copy the full SHA
    4baa19f View commit details
  4. Update egui requirement from 0.21.0 to 0.22.0 (#184)

    Updates the requirements on [egui](https://github.com/emilk/egui) to permit the latest version.
    - [Release notes](https://github.com/emilk/egui/releases)
    - [Changelog](https://github.com/emilk/egui/blob/master/CHANGELOG.md)
    - [Commits](emilk/egui@0.21.0...0.22.0)
    
    ---
    updated-dependencies:
    - dependency-name: egui
      dependency-type: direct:production
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    dependabot[bot] authored Jul 10, 2023
    Copy the full SHA
    37224e5 View commit details
  5. Copy the full SHA
    ff38e01 View commit details
  6. Copy the full SHA
    f7e8c42 View commit details
  7. Bump to 0.21

    vladbat00 committed Jul 10, 2023
    Copy the full SHA
    29ede3f View commit details
  8. Satisfy my OCD

    vladbat00 committed Jul 10, 2023
    Copy the full SHA
    670f3d7 View commit details
Showing with 352 additions and 197 deletions.
  1. +31 −57 .github/workflows/check.yml
  2. +38 −25 CHANGELOG.md
  3. +11 −4 Cargo.toml
  4. +5 −4 README.md
  5. +4 −4 examples/render_to_image_widget.rs
  6. +4 −4 examples/side_panel.rs
  7. +2 −2 examples/simple.rs
  8. +11 −7 examples/two_windows.rs
  9. +5 −5 examples/ui.rs
  10. +29 −25 src/egui_node.rs
  11. +116 −49 src/lib.rs
  12. +96 −11 src/systems.rs
88 changes: 31 additions & 57 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
@@ -11,17 +11,12 @@ jobs:
name: Formatter check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@master
with:
profile: minimal
toolchain: nightly
override: true
components: rustfmt
- uses: actions-rs/cargo@v1
with:
command: fmt
args: --all -- --check
- run: cargo fmt --all -- --check

clippy:
name: Clippy check
@@ -30,21 +25,15 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
features: [
'',
'manage_clipboard',
'open_url',
'manage_clipboard,open_url',
]
features:
["", "manage_clipboard", "open_url", "manage_clipboard,open_url"]
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@master
with:
profile: minimal
toolchain: stable
override: true
components: clippy
- uses: actions/cache@v2
- uses: actions/cache@v3
with:
path: |
~/.cargo/registry
@@ -57,33 +46,31 @@ jobs:
- name: Install dependencies
if: runner.os == 'Linux'
run: sudo apt-get update; sudo apt-get install --no-install-recommends libasound2-dev libudev-dev libxcb-render0-dev libxcb-shape0-dev libxcb-xfixes0-dev
- uses: actions-rs/cargo@v1
with:
command: clippy
args: --no-default-features --all-targets --features=${{ matrix.features }} -- -D warnings
- run: cargo clippy --no-default-features --all-targets --features=${{ matrix.features }} -- -D warnings

clippy_wasm32:
name: Clippy check (wasm32)
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
features: [
'immutable_ctx',
'manage_clipboard',
'open_url',
'manage_clipboard,open_url',
]
features:
[
"immutable_ctx",
"manage_clipboard",
"open_url",
"manage_clipboard,open_url",
]
env:
RUSTFLAGS: --cfg=web_sys_unstable_apis
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@master
with:
profile: minimal
toolchain: stable
override: true
components: clippy
target: wasm32-unknown-unknown
- uses: actions/cache@v2
targets: wasm32-unknown-unknown
- uses: actions/cache@v3
with:
path: |
~/.cargo/registry
@@ -93,22 +80,17 @@ jobs:
restore-keys: |
cache-wasm32-cargo-${{ hashFiles('**/Cargo.toml') }}
cache-wasm32-cargo
- uses: actions-rs/cargo@v1
with:
command: clippy
args: --no-default-features --target=wasm32-unknown-unknown --all-targets --features=${{ matrix.features }} -- -D warnings
- run: cargo clippy --no-default-features --target=wasm32-unknown-unknown --all-targets --features=${{ matrix.features }} -- -D warnings

doc:
name: Check documentation
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@master
with:
profile: minimal
toolchain: stable
override: true
- uses: actions/cache@v2
- uses: actions/cache@v3
with:
path: |
~/.cargo/registry
@@ -118,24 +100,19 @@ jobs:
restore-keys: |
cache-doc-cargo-${{ hashFiles('**/Cargo.toml') }}
cache-doc-cargo
- uses: actions-rs/cargo@v1
with:
command: doc
args: --all --features "bevy/x11"
- run: cargo doc --all --features "bevy/x11"
env:
RUSTDOCFLAGS: -D warnings

test:
name: Run tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@master
with:
profile: minimal
toolchain: stable
override: true
- uses: actions/cache@v2
- uses: actions/cache@v3
with:
path: |
~/.cargo/registry
@@ -147,7 +124,4 @@ jobs:
cache-test-cargo
- name: Install dependencies
run: sudo apt-get update; sudo apt-get install --no-install-recommends libasound2-dev libudev-dev libxcb-render0-dev libxcb-shape0-dev libxcb-xfixes0-dev
- uses: actions-rs/cargo@v1
with:
command: test
args: --all
- run: cargo test --all
63 changes: 38 additions & 25 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -5,90 +5,103 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [0.21.0] - 10-Jul-2023

### Changed

- Update Bevy to 0.11 ([#188](https://github.com/mvlabat/bevy_egui/pull/188) by @Vrixyz).
- Update Egui to 0.22 ([#190](https://github.com/mvlabat/bevy_egui/pull/190)).
- Move sampler descriptor into `EguiSettings` ([#179](https://github.com/mvlabat/bevy_egui/pull/179) by @GlummixX).
- Update GitHub Actions CI ([#183](https://github.com/mvlabat/bevy_egui/pull/183) by @striezel).

### Added

- Add touch events support ([#180](https://github.com/mvlabat/bevy_egui/pull/180) by @oscrim).

## [0.20.3] - 21-Apr-2023

### Fixed

- Accept NumpadEnter as Enter ([#171](https://github.com/mvlabat/bevy_egui/pull/171) by @dimvoly)
- Accept NumpadEnter as Enter ([#171](https://github.com/mvlabat/bevy_egui/pull/171) by @dimvoly).

## [0.20.2] - 27-Mar-2023

### Fixed

- Fix incorrect bounds check for set_scissor_rect ([#167](https://github.com/mvlabat/bevy_egui/pull/167) by @Gorialis)
- Fix panic messages for uninitialised contexts
- Fix incorrect bounds check for set_scissor_rect ([#167](https://github.com/mvlabat/bevy_egui/pull/167) by @Gorialis).
- Fix panic messages for uninitialised contexts.

### Changed

- Move `bevy_core_pipeline` to dev-dependencies ([#166](https://github.com/mvlabat/bevy_egui/pull/166) by @jakobhellermann)
- Move `bevy_core_pipeline` to dev-dependencies ([#166](https://github.com/mvlabat/bevy_egui/pull/166) by @jakobhellermann).

## [0.20.1] - 12-Mar-2023

### Fixed

- Fix recreation of `EguiContext` on startup ([#162](https://github.com/mvlabat/bevy_egui/pull/162) by @encounter)
- Set image sampler address modes to `ClampToEdge` ([#158](https://github.com/mvlabat/bevy_egui/pull/158) by @galop1n)
- Fix recreation of `EguiContext` on startup ([#162](https://github.com/mvlabat/bevy_egui/pull/162) by @encounter).
- Set image sampler address modes to `ClampToEdge` ([#158](https://github.com/mvlabat/bevy_egui/pull/158) by @galop1n).

## [0.20.0] - 8-Mar-2023

### Added

- Add `altgr` support for Windows ([#149](https://github.com/mvlabat/bevy_egui/pull/149) by @Vrixyz)
- Add `serde` feature ([#154](https://github.com/mvlabat/bevy_egui/pull/154) by @AlanRace)
- Add `altgr` support for Windows ([#149](https://github.com/mvlabat/bevy_egui/pull/149) by @Vrixyz).
- Add `serde` feature ([#154](https://github.com/mvlabat/bevy_egui/pull/154) by @AlanRace).

### Changed

- Update Bevy to 0.10 ([#159](https://github.com/mvlabat/bevy_egui/pull/159), thanks to @DGriffin91)
- Update Egui to 0.21 ([#152](https://github.com/mvlabat/bevy_egui/pull/152) by @paul-hansen)
- Implement better multi-window support ([#147](https://github.com/mvlabat/bevy_egui/pull/147) by @TheRawMeatball)
- Update Bevy to 0.10 ([#159](https://github.com/mvlabat/bevy_egui/pull/159), thanks to @DGriffin91).
- Update Egui to 0.21 ([#152](https://github.com/mvlabat/bevy_egui/pull/152) by @paul-hansen).
- Implement better multi-window support ([#147](https://github.com/mvlabat/bevy_egui/pull/147) by @TheRawMeatball).

### Fixed

- Pass raw Bevy time to Egui to fix UI animations ([#155](https://github.com/mvlabat/bevy_egui/pull/155) by @jakobhellermann)
- Pass raw Bevy time to Egui to fix UI animations ([#155](https://github.com/mvlabat/bevy_egui/pull/155) by @jakobhellermann).

## [0.19.0] - 15-Jan-2023

### Changed

- Update the `arboard` dependency ([#142](https://github.com/mvlabat/bevy_egui/pull/142) by @jakobhellermann)
- Update the `arboard` dependency ([#142](https://github.com/mvlabat/bevy_egui/pull/142) by @jakobhellermann).

### Fixed

- Fix panics due to missing swapchain textures ([#141](https://github.com/mvlabat/bevy_egui/pull/141) by @connerebbinghaus)
- Fix panics due to missing swapchain textures ([#141](https://github.com/mvlabat/bevy_egui/pull/141) by @connerebbinghaus).

## [0.18.0] - 11-Dec-2022

### Changed

- Update Egui to 0.20 ([#139](https://github.com/mvlabat/bevy_egui/pull/139) by @no-materials)
- Update Egui to 0.20 ([#139](https://github.com/mvlabat/bevy_egui/pull/139) by @no-materials).

## [0.17.1] - 14-Nov-2022

### Fixed

- Fix clearing event readers (missed events warnings)
- Fix clearing event readers (missed events warnings).

## [0.17.0] - 13-Nov-2022

### Changed

- Update to Bevy 0.9 ([#127](https://github.com/mvlabat/bevy_egui/pull/127), [#133](https://github.com/mvlabat/bevy_egui/pull/133), thanks to @terhechte and @jakobhellermann)
- Update to Bevy 0.9 ([#127](https://github.com/mvlabat/bevy_egui/pull/127), [#133](https://github.com/mvlabat/bevy_egui/pull/133), thanks to @terhechte and @jakobhellermann).

### Fixed

- Fix window resizing on Windows ([#128](https://github.com/mvlabat/bevy_egui/pull/128) by @chronicl)
- Fix window resizing on Windows ([#128](https://github.com/mvlabat/bevy_egui/pull/128) by @chronicl).

## [0.16.1] - 18-Sep-2022

### Fixed

- Fix releasing buttons outside a window ([#123](https://github.com/mvlabat/bevy_egui/pull/123), thanks to @TheRawMeatball for flagging the issue in [#121](https://github.com/mvlabat/bevy_egui/pull/121))
- Fix releasing buttons outside a window ([#123](https://github.com/mvlabat/bevy_egui/pull/123), thanks to @TheRawMeatball for flagging the issue in [#121](https://github.com/mvlabat/bevy_egui/pull/121)).

## [0.16.0] - 24-Aug-2022

### Changed

- Update Egui to 0.19
- Update Egui to 0.19.

## [0.15.1] - 13-Aug-2022

@@ -100,11 +113,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Added

- Add a feature that can be disabled to replace default Egui fonts ([#110](https://github.com/mvlabat/bevy_egui/pull/110) by @iTitus)
- Add a feature that can be disabled to replace default Egui fonts ([#110](https://github.com/mvlabat/bevy_egui/pull/110) by @iTitus).

### Changed

- Update Bevy to 0.8 ([#111](https://github.com/mvlabat/bevy_egui/pull/111) by @DGriffin91)
- Update Bevy to 0.8 ([#111](https://github.com/mvlabat/bevy_egui/pull/111) by @DGriffin91).

## [0.14.0] - 1-May-2022

@@ -269,14 +282,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Added

- Better error message for a missing Egui context ([#24](https://github.com/mvlabat/bevy_egui/pull/24) by @jakobhellermann)
- Add `try_ctx_for_window` function ([#20](https://github.com/mvlabat/bevy_egui/pull/20) by @jakobhellermann)
- Better error message for a missing Egui context ([#24](https://github.com/mvlabat/bevy_egui/pull/24) by @jakobhellermann).
- Add `try_ctx_for_window` function ([#20](https://github.com/mvlabat/bevy_egui/pull/20) by @jakobhellermann).

## [0.4.1] - 24-Apr-2021

### Fixed

- Fix crashes related to invalid scissor or window size ([#18](https://github.com/mvlabat/bevy_egui/pull/18))
- Fix crashes related to invalid scissor or window size ([#18](https://github.com/mvlabat/bevy_egui/pull/18)).

## [0.4.0] - 10-Apr-2021

15 changes: 11 additions & 4 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "bevy_egui"
version = "0.20.3"
version = "0.21.0"
authors = ["mvlabat <mvlabat@gmail.com>"]
description = "A plugin for Egui integration into Bevy"
license = "MIT"
@@ -22,8 +22,11 @@ default_fonts = ["egui/default_fonts"]
serde = ["egui/serde"]

[dependencies]
bevy = { version = "0.10", default-features = false, features = ["bevy_render", "bevy_asset"] }
egui = { version = "0.21.0", default-features = false, features = ["bytemuck"] }
bevy = { version = "0.11", default-features = false, features = [
"bevy_render",
"bevy_asset",
] }
egui = { version = "0.22.0", default-features = false, features = ["bytemuck"] }
webbrowser = { version = "0.8.2", optional = true }

[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
@@ -33,9 +36,13 @@ thread_local = { version = "1.1.0", optional = true }
[dev-dependencies]
once_cell = "1.16.0"
version-sync = "0.9.4"
bevy = { version = "0.10", default-features = false, features = [
bevy = { version = "0.11", default-features = false, features = [
"x11",
"png",
"bevy_pbr",
"bevy_core_pipeline",
# TODO: remove the following features after https://github.com/bevyengine/bevy/pull/9073 is released:
"ktx2",
"tonemapping_luts",
"zstd",
] }
9 changes: 5 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -39,8 +39,8 @@ Here's a minimal usage example:
```toml
# Cargo.toml
[dependencies]
bevy = "0.10"
bevy_egui = "0.20"
bevy = "0.11"
bevy_egui = "0.21"
```

```rust
@@ -50,10 +50,10 @@ use bevy_egui::{egui, EguiContexts, EguiPlugin};
fn main() {
App::new()
.add_plugins(DefaultPlugins)
.add_plugin(EguiPlugin)
.add_plugins(EguiPlugin)
// Systems that create Egui widgets should be run during the `CoreSet::Update` set,
// or after the `EguiSet::BeginFrame` system (which belongs to the `CoreSet::PreUpdate` set).
.add_system(ui_example_system)
.add_systems(Update, ui_example_system)
.run();
}

@@ -81,6 +81,7 @@ cargo run --example ui

| bevy | bevy_egui |
|------|-----------|
| 0.11 | 0.21 |
| 0.10 | 0.20 |
| 0.9 | 0.17-0.19 |
| 0.8 | 0.15-0.16 |
Loading