mirror of
https://github.com/emilk/egui.git
synced 2026-06-26 22:53:14 -04:00
include_image! now accepts expressions (#4521)
Closes https://github.com/emilk/egui/issues/4510
This commit is contained in:
@@ -507,7 +507,7 @@ pub fn warn_if_debug_build(ui: &mut crate::Ui) {
|
||||
/// ```
|
||||
#[macro_export]
|
||||
macro_rules! include_image {
|
||||
($path: literal) => {
|
||||
($path:expr $(,)?) => {
|
||||
$crate::ImageSource::Bytes {
|
||||
uri: ::std::borrow::Cow::Borrowed(concat!("bytes://", $path)),
|
||||
bytes: $crate::load::Bytes::Static(include_bytes!($path)),
|
||||
|
||||
Reference in New Issue
Block a user