1
0
mirror of https://github.com/emilk/egui.git synced 2026-06-26 22:53:14 -04:00
Files
egui/crates/egui_extras
Francis Tseng 8f370ca7a2 Add arbitrary request headers to EhttpLoader (#8121)
* Closes <https://github.com/emilk/egui/issues/4491>
* [x] I have followed the instructions in the PR template

Lets you create an `EhttpLoader` with arbitrary headers like so:

```rust
cc.egui_ctx.add_bytes_loader(std::sync::Arc::new(
    egui_extras::loaders::http_loader::EhttpLoader::default().with_headers(&[
        ("User-Agent", "foo"),
    ])
));
```

I'm not sure if there are any problems with installing a second
`EhttpLoader` (in addition to the one installed by default when using
`egui_extras::install_image_loaders(&cc.egui_ctx)`. But I wasn't
sure how else to pass in configuration options to
`install_image_loaders`.
2026-05-26 13:18:02 +02:00
..
2024-05-13 13:35:15 +02:00

egui_extras

Latest version Documentation unsafe forbidden MIT Apache

This is a crate that adds some features on top top of egui. This crate is for experimental features, and features that require big dependencies that do not belong in egui.

Images

One thing egui_extras is commonly used for is to install image loaders for egui:

egui_extras = { version = "*", features = ["all_loaders"] }
image = { version = "0.25", features = ["jpeg", "png"] } # Add the types you want support for
egui_extras::install_image_loaders(egui_ctx);