Skip to content

Commit

Permalink
Merge pull request #45 from LU15W1R7H/main
Browse files Browse the repository at this point in the history
upgrade egui v0.15
  • Loading branch information
vladbat00 authored Nov 27, 2021
2 parents 0f30ebd + 35670de commit 5ab0500
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 5 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,10 @@ jobs:
restore-keys: |
cache-wasm32-cargo-${{ hashFiles('**/Cargo.toml') }}
cache-wasm32-cargo
- uses: actions-rs/cargo@v1
with:
command: update
args: -p tracing-wasm --precise 0.2.0
- uses: actions-rs/cargo@v1
with:
command: clippy
Expand Down
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ bevy = { version = "0.5", default-features = false, features = [
"render",
"bevy_winit"
] }
egui = "0.14.0"
egui = "0.15.0"
webbrowser = { version = "0.5.5", optional = true }
winit = { version = "0.24.0", features = ["x11"], default-features = false }

Expand Down
4 changes: 2 additions & 2 deletions examples/two_windows.rs
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,7 @@ fn ui_first_window(
mut shared_ui_state: ResMut<SharedUiState>,
) {
egui::Window::new("First Window")
.scroll(true)
.vscroll(true)
.show(egui_context.ctx(), |ui| {
ui.horizontal(|ui| {
ui.label("Write something: ");
Expand All @@ -306,7 +306,7 @@ fn ui_second_window(
mut ui_state: Local<UiState>,
mut shared_ui_state: ResMut<SharedUiState>,
) {
egui::Window::new("Second Window").scroll(true).show(
egui::Window::new("Second Window").vscroll(true).show(
egui_context.ctx_for_window(second_window.id),
|ui| {
ui.horizontal(|ui| {
Expand Down
4 changes: 2 additions & 2 deletions examples/ui.rs
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ fn ui_example(
});

egui::Window::new("Window")
.scroll(true)
.vscroll(true)
.show(egui_ctx.ctx(), |ui| {
ui.label("Windows can be moved by dragging them.");
ui.label("They are automatically sized based on contents.");
Expand Down Expand Up @@ -190,7 +190,7 @@ impl Painting {

pub fn ui_content(&mut self, ui: &mut egui::Ui) {
let (response, painter) =
ui.allocate_painter(ui.available_size_before_wrap_finite(), egui::Sense::drag());
ui.allocate_painter(ui.available_size_before_wrap(), egui::Sense::drag());
let rect = response.rect;

if self.lines.is_empty() {
Expand Down

0 comments on commit 5ab0500

Please sign in to comment.