-
Notifications
You must be signed in to change notification settings - Fork 262
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* update to use bevy main * make example initially work * Fix build error from missing add_systems_to_schedule * depend on bevy 0.10 * Merge the main branch * make egui::Context a component * remove unnecessary node edge to ui_pass_driver * fix issue with nodes being added every frame * make EguiRenderOutputContainer a component * make EguiInput a component * make EguiOutput a component * make EguiRenderOutput a component directly * make WindowSize a component * Refine egui context access * Update the documentation, fix Windows, refactor * Tesselate shapes outside render systems * Remove the redundant cleaning of paint jobs * Introduce EguiContexts system param to cut boilerplate, fix docs * Update the simple example in README and lib.rs docs --------- Co-authored-by: DGriffin91 <[email protected]> Co-authored-by: Johan Klokkhammer Helsing <[email protected]> Co-authored-by: Griffin <[email protected]>
- Loading branch information
1 parent
0f99ee0
commit bb41bbc
Showing
11 changed files
with
550 additions
and
564 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,18 @@ | ||
use bevy::prelude::*; | ||
use bevy_egui::{egui, EguiContext, EguiPlugin}; | ||
use bevy_egui::{egui, EguiContexts, EguiPlugin}; | ||
|
||
fn main() { | ||
App::new() | ||
.add_plugins(DefaultPlugins) | ||
.add_plugin(EguiPlugin) | ||
// Systems that create Egui widgets should be run during the `CoreStage::Update` stage, | ||
// or after the `EguiSystem::BeginFrame` system (which belongs to the `CoreStage::PreUpdate` stage). | ||
// 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) | ||
.run(); | ||
} | ||
|
||
fn ui_example_system(mut egui_context: ResMut<EguiContext>) { | ||
egui::Window::new("Hello").show(egui_context.ctx_mut(), |ui| { | ||
fn ui_example_system(mut contexts: EguiContexts) { | ||
egui::Window::new("Hello").show(contexts.ctx_mut(), |ui| { | ||
ui.label("world"); | ||
}); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.