`include_image!` now accepts expressions (#4521)
Closes https://github.com/emilk/egui/issues/4510
This commit is contained in:
parent
262a8bcf98
commit
7035aa4e53
|
|
@ -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)),
|
||||
|
|
|
|||
Loading…
Reference in New Issue