Skip to content

Commit

Permalink
feat: egui 0.29 support
Browse files Browse the repository at this point in the history
  • Loading branch information
PPakalns committed Oct 3, 2024
1 parent e15257f commit 3e19237
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 1 deletion.
1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ exclude = ["assets/", "src/themes.rs.tera"]
egui26 = { version = "0.26", package = "egui", default-features = false, optional = true }
egui27 = { version = "0.27", package = "egui", default-features = false, optional = true }
egui28 = { version = "0.28", package = "egui", default-features = false, optional = true }
egui29 = { version = "0.29", package = "egui", default-features = false, optional = true }

[dev-dependencies]
eframe = "0.26"
Expand Down
9 changes: 8 additions & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,12 @@
//! ```
//!

#[cfg(not(any(feature = "egui26", feature = "egui27", feature = "egui28")))]
#[cfg(not(any(
feature = "egui26",
feature = "egui27",
feature = "egui28",
feature = "egui29"
)))]
compile_error!("at least one egui version must be enabled");

#[cfg(feature = "egui26")]
Expand All @@ -39,6 +44,8 @@ use egui26 as egui;
use egui27 as egui;
#[cfg(feature = "egui28")]
use egui28 as egui;
#[cfg(feature = "egui29")]
use egui29 as egui;

use egui::{epaint, style};

Expand Down
1 change: 1 addition & 0 deletions src/themes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -146,3 +146,4 @@ pub const MOCHA: Theme = Theme {
mantle: Color32::from_rgb(24, 24, 37),
crust: Color32::from_rgb(17, 17, 27),
};

0 comments on commit 3e19237

Please sign in to comment.