mirror of
https://github.com/emilk/egui.git
synced 2026-09-02 06:40:06 -04:00
Deduplicate code found in both egui_glium and egui_glow (#819)
* Move window building to egui-winit * Move icon loading to egui-winit * `use glow::HasContext;` -> `use glow::HasContext as _;` * Move FileStorage into epi behind a feature flag * De-duplicate screen_size_in_pixels and native_pixels_per_point * Move creation of FileStorage to epi * Handle epi app output (window size changes etc) in egui-winit * Move app and memory persistence and autosave logic to egui-winit * fix check.sh * Make the epi backend opt-in for egui_glium and egui_glow * Fix persistence * Add integration name to epi::IntegrationInfo and the demo * Clean up Cargo.toml files and fix making egui_glium optional * fix typo * Make egui_glium compile without the `epi` feature
This commit is contained in:
@@ -23,20 +23,16 @@ all-features = true
|
||||
|
||||
[dependencies]
|
||||
egui = { version = "0.14.0", path = "../egui", default-features = false, features = ["single_threaded"] }
|
||||
egui-winit = { version = "0.14.0", path = "../egui-winit", default-features = false }
|
||||
epi = { version = "0.14.0", path = "../epi" }
|
||||
glium = "0.30"
|
||||
egui-winit = { version = "0.14.0", path = "../egui-winit", default-features = false, features = ["epi"] }
|
||||
epi = { version = "0.14.0", path = "../epi", optional = true }
|
||||
|
||||
# feature "persistence":
|
||||
directories-next = { version = "2", optional = true }
|
||||
ron = { version = "0.6", optional = true }
|
||||
serde = { version = "1", optional = true }
|
||||
glium = "0.30"
|
||||
|
||||
[dev-dependencies]
|
||||
image = { version = "0.23", default-features = false, features = ["png"] }
|
||||
|
||||
[features]
|
||||
default = ["clipboard", "default_fonts", "links"]
|
||||
default = ["clipboard", "default_fonts", "links", "persistence"]
|
||||
|
||||
# enable cut/copy/paste to OS clipboard.
|
||||
# if disabled a clipboard will be simulated so you can still copy/paste within the egui app.
|
||||
@@ -50,12 +46,11 @@ default_fonts = ["egui/default_fonts"]
|
||||
links = ["egui-winit/links"]
|
||||
|
||||
persistence = [
|
||||
"directories-next",
|
||||
"egui-winit/serialize",
|
||||
"egui/persistence",
|
||||
"epi/persistence",
|
||||
"ron",
|
||||
"serde",
|
||||
"egui-winit/persistence",
|
||||
"egui/persistence",
|
||||
"epi", # also implied by the lines below, see https://github.com/rust-lang/cargo/issues/8832
|
||||
"epi/file_storage",
|
||||
"epi/persistence",
|
||||
]
|
||||
|
||||
# experimental support for a screen reader
|
||||
|
||||
Reference in New Issue
Block a user