Skip to content

Commit

Permalink
Update egui to 1.16.1
Browse files Browse the repository at this point in the history
  • Loading branch information
Meshiest committed Dec 31, 2021
1 parent 4252ded commit 1f55e72
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
6 changes: 3 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ open_url = ["webbrowser"]
[dependencies]
bevy = { version = "0.5", default-features = false, features = [
"render",
"bevy_winit"
"bevy_winit",
] }
egui = "0.15.0"
egui = "0.16.1"
webbrowser = { version = "0.5.5", optional = true }
winit = { version = "0.24.0", features = ["x11"], default-features = false }

Expand All @@ -38,5 +38,5 @@ version-sync = "0.9.2"
bevy = { version = "0.5", default-features = false, features = [
"bevy_wgpu",
"x11",
"png"
"png",
] }
8 changes: 4 additions & 4 deletions src/egui_node.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ use bevy::{
utils::HashMap,
window::WindowId,
};
use egui::paint::ClippedShape;
use egui::epaint::ClippedShape;
use std::{borrow::Cow, collections::HashSet};

pub struct EguiNode {
Expand Down Expand Up @@ -523,7 +523,7 @@ impl EguiNode {
self.update_texture(render_resource_context, texture, texture_handle);
}

let egui_texture = egui_context.ctx_for_window(self.window_id).texture();
let egui_texture = egui_context.ctx_for_window(self.window_id).font_image();
if self.egui_texture_version != Some(egui_texture.version) {
self.egui_texture_version = Some(egui_texture.version);
if let Some(egui_texture_handle) = self.egui_texture.clone() {
Expand Down Expand Up @@ -561,7 +561,7 @@ impl EguiNode {
texture_assets: &mut Assets<Texture>,
) {
if self.egui_texture.is_none() {
let texture = egui_context.ctx_for_window(self.window_id).texture();
let texture = egui_context.ctx_for_window(self.window_id).font_image();
self.egui_texture = Some(texture_assets.add(as_bevy_texture(&texture)));
self.egui_texture_version = Some(texture.version);

Expand Down Expand Up @@ -769,7 +769,7 @@ fn find_bind_group_by_binding_name(
.cloned()
}

fn as_bevy_texture(egui_texture: &egui::Texture) -> Texture {
fn as_bevy_texture(egui_texture: &egui::FontImage) -> Texture {
let mut pixels = Vec::new();
pixels.reserve(4 * pixels.len());
for &alpha in egui_texture.pixels.iter() {
Expand Down
2 changes: 1 addition & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ pub struct EguiShapes {
/// Pairs of rectangles and paint commands.
///
/// The field gets populated during the [`EguiStage::UiFrameEnd`] stage and reset during `EguiNode::update`.
pub shapes: Vec<egui::paint::ClippedShape>,
pub shapes: Vec<egui::epaint::ClippedShape>,
}

/// Is used for storing Egui output. The actual resource is [`HashMap<WindowId, EguiOutput>`].
Expand Down
2 changes: 1 addition & 1 deletion src/systems.rs
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ pub fn process_input(
}

for egui_input in input_resources.egui_input.values_mut() {
egui_input.raw_input.scroll_delta += delta;
egui_input.raw_input.events.push(egui::Event::Scroll(delta));
}
}

Expand Down

0 comments on commit 1f55e72

Please sign in to comment.