Update egui to 0.32
This commit is contained in:
1081
Cargo.lock
generated
1081
Cargo.lock
generated
File diff suppressed because it is too large
Load Diff
14
Cargo.toml
14
Cargo.toml
@ -12,16 +12,16 @@ targets = ["x86_64-unknown-linux-gnu", "wasm32-unknown-unknown"]
|
|||||||
pinenote = []
|
pinenote = []
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
egui = "0.31"
|
egui = "0.32"
|
||||||
egui_extras = { version = "0.31", features = ["svg"] }
|
egui_extras = { version = "0.32", features = ["svg"] }
|
||||||
eframe = { version = "0.31", default-features = false, features = [
|
egui_glow = "0.32"
|
||||||
|
eframe = { version = "0.32", default-features = false, features = [
|
||||||
"glow", # alt: "wgpu".
|
"glow", # alt: "wgpu".
|
||||||
"persistence",
|
"persistence",
|
||||||
"wayland",
|
"wayland",
|
||||||
] }
|
] }
|
||||||
log = "0.4.27"
|
log = "0.4.27"
|
||||||
serde = { version = "1.0.219", features = ["derive"] }
|
serde = { version = "1.0.219", features = ["derive"] }
|
||||||
egui_glow = "0.31.1"
|
|
||||||
rfd = { version = "0.15.3", default-features = false, features = ["gtk3"] }
|
rfd = { version = "0.15.3", default-features = false, features = ["gtk3"] }
|
||||||
rand = "0.9.1"
|
rand = "0.9.1"
|
||||||
eyre = "0.6.12"
|
eyre = "0.6.12"
|
||||||
@ -42,13 +42,11 @@ wasm-bindgen-futures = "0.4.50"
|
|||||||
web-sys = "0.3.77"
|
web-sys = "0.3.77"
|
||||||
|
|
||||||
[patch.crates-io]
|
[patch.crates-io]
|
||||||
egui = { git = "https://github.com/emilk/egui", rev = "f2ce6424f3a32f47308fb9871d540c01377b2cd9" }
|
# egui = { path = "../egui/crates/egui" }
|
||||||
eframe = { git = "https://github.com/emilk/egui", rev = "f2ce6424f3a32f47308fb9871d540c01377b2cd9" }
|
# eframe = { path = "../egui/crates/eframe" }
|
||||||
|
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
insta = { version = "1.43.1", features = ["yaml"] }
|
insta = { version = "1.43.1", features = ["yaml"] }
|
||||||
# egui = { path = "../egui/crates/egui" }
|
|
||||||
# eframe = { path = "../egui/crates/eframe" }
|
|
||||||
|
|
||||||
[profile.release]
|
[profile.release]
|
||||||
opt-level = 2 # fast and small wasm
|
opt-level = 2 # fast and small wasm
|
||||||
|
|||||||
@ -292,7 +292,7 @@ impl eframe::App for App {
|
|||||||
});
|
});
|
||||||
|
|
||||||
egui::TopBottomPanel::top("top_panel").show(ctx, |ui| {
|
egui::TopBottomPanel::top("top_panel").show(ctx, |ui| {
|
||||||
egui::containers::menu::Bar::new().ui(ui, |ui| {
|
egui::MenuBar::new().ui(ui, |ui| {
|
||||||
// NOTE: no File->Quit on web pages!
|
// NOTE: no File->Quit on web pages!
|
||||||
ui.menu_button("Menu ⚙", |ui| {
|
ui.menu_button("Menu ⚙", |ui| {
|
||||||
ui.label(RichText::new("Action").weak());
|
ui.label(RichText::new("Action").weak());
|
||||||
|
|||||||
@ -454,7 +454,7 @@ fn spawn_file_watcher(p: &Path) -> Inner {
|
|||||||
let file = File::open(&path)?;
|
let file = File::open(&path)?;
|
||||||
let mtime = file_mtime(&file)?;
|
let mtime = file_mtime(&file)?;
|
||||||
|
|
||||||
let _ = events_tx.send(FileEvent::NewFileMTime(mtime.into()));
|
let _ = events_tx.send(FileEvent::NewFileMTime(mtime));
|
||||||
|
|
||||||
Ok(())
|
Ok(())
|
||||||
});
|
});
|
||||||
|
|||||||
@ -42,7 +42,7 @@ impl Tile {
|
|||||||
|
|
||||||
Self {
|
Self {
|
||||||
bounding_box,
|
bounding_box,
|
||||||
image: ColorImage::new([CHUNK_SIZE, CHUNK_SIZE], Color32::TRANSPARENT),
|
image: ColorImage::filled([CHUNK_SIZE, CHUNK_SIZE], Color32::TRANSPARENT),
|
||||||
texture: None,
|
texture: None,
|
||||||
texture_is_dirty: false,
|
texture_is_dirty: false,
|
||||||
}
|
}
|
||||||
|
|||||||
@ -22,7 +22,7 @@ pub fn rasterize<'a, Blend: BlendFn>(
|
|||||||
point_to_pixel: TSTransform,
|
point_to_pixel: TSTransform,
|
||||||
triangles: impl Iterator<Item = [&'a Vertex; 3]>,
|
triangles: impl Iterator<Item = [&'a Vertex; 3]>,
|
||||||
) -> ColorImage {
|
) -> ColorImage {
|
||||||
let mut image = ColorImage::new([width, height], Color32::TRANSPARENT);
|
let mut image = ColorImage::filled([width, height], Color32::TRANSPARENT);
|
||||||
rasterize_onto::<Blend>(&mut image, point_to_pixel, triangles);
|
rasterize_onto::<Blend>(&mut image, point_to_pixel, triangles);
|
||||||
image
|
image
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user