mirror of
https://github.com/emilk/egui.git
synced 2026-06-26 22:53:14 -04:00
* rework loading around `Arc<Loaders>` * use `Bytes` instead of splitting api * remove unwraps in `texture_handle` * make `FileLoader` optional under `file` feature * hide http load error stack trace from UI * implement image fit * support more image sources * center spinner if we know size ahead of time * allocate final size for spinner * improve image format guessing * remove `ui.image`, `Image`, add `RawImage` * deprecate `RetainedImage` * `image2` -> `image` * add viewer example * update `examples/image` + remove `svg` and `download_image` exapmles * fix lints and tests * fix doc link * add image controls to `images` example * add more `From` str-like types * add api to forget all images * fix max size * do not scale original size unless necessary * fix doc link * add more docs for `Image` and `RawImage` * make paint_at `pub` * update `ImageButton` to use new `Image` API * fix double rendering * `SizeHint::Original` -> `Scale` + remove `Option` wrapper * Update crates/egui/src/load.rs Co-authored-by: Emil Ernerfeldt <emil.ernerfeldt@gmail.com> * remove special `None` value for `forget` * Update crates/egui/src/load.rs Co-authored-by: Emil Ernerfeldt <emil.ernerfeldt@gmail.com> * add more examples to `ui.image` + add `include_image` macro * Update crates/egui/src/ui.rs Co-authored-by: Emil Ernerfeldt <emil.ernerfeldt@gmail.com> * update `menu_image_button` to use `ImageSource` * `OrderedFloat::get` -> `into_inner` * derive `Eq` on `SizedTexture` * add `id` to loaders + `is_installed` check * move `images` to demo + simplify `images` example * log trace when installing loaders * fix lint * fix doc link * add more documentation * more `egui_extras::loaders` docs * Update examples/images/src/main.rs Co-authored-by: Emil Ernerfeldt <emil.ernerfeldt@gmail.com> * update `images` example screenshots + readme * remove unused `rfd` from `images` example * Update crates/egui_extras/src/loaders/ehttp_loader.rs Co-authored-by: Emil Ernerfeldt <emil.ernerfeldt@gmail.com> * add `must_use` on `Image` and `RawImage` * document `loaders::install` multiple call safety * Update crates/egui_extras/Cargo.toml Co-authored-by: Emil Ernerfeldt <emil.ernerfeldt@gmail.com> * reshuffle `is_loader_installed` * make `include_image` produce `ImageSource` + update docs * update `include_image` docs * remove `None` mentions from loader `forget` * inline `From` texture id + size for `SizedTexture` * add warning about statically known path * change image load error + use in image button * add `.size()` to `Image` * Update crates/egui_demo_app/Cargo.toml Co-authored-by: Emil Ernerfeldt <emil.ernerfeldt@gmail.com> * add explanations to image viewer ui --------- Co-authored-by: Emil Ernerfeldt <emil.ernerfeldt@gmail.com>
93 lines
2.7 KiB
TOML
93 lines
2.7 KiB
TOML
[package]
|
|
name = "egui_extras"
|
|
version = "0.22.0"
|
|
authors = [
|
|
"Dominik Rössler <dominik@freshx.de>",
|
|
"Emil Ernerfeldt <emil.ernerfeldt@gmail.com>",
|
|
"René Rössler <rene@freshx.de>",
|
|
]
|
|
description = "Extra functionality and widgets for the egui GUI library"
|
|
edition = "2021"
|
|
rust-version = "1.70"
|
|
homepage = "https://github.com/emilk/egui"
|
|
license = "MIT OR Apache-2.0"
|
|
readme = "README.md"
|
|
repository = "https://github.com/emilk/egui"
|
|
categories = ["gui", "game-development"]
|
|
keywords = ["gui", "imgui", "immediate", "portable", "gamedev"]
|
|
include = ["../LICENSE-APACHE", "../LICENSE-MIT", "**/*.rs", "Cargo.toml"]
|
|
|
|
[package.metadata.docs.rs]
|
|
all-features = true
|
|
|
|
[lib]
|
|
|
|
|
|
[features]
|
|
default = ["dep:mime_guess"]
|
|
|
|
## Shorthand for enabling the different types of image loaders (`file`, `http`, `image`, `svg`).
|
|
all-loaders = ["svg", "image", "http", "file"]
|
|
|
|
## Enable [`DatePickerButton`] widget.
|
|
datepicker = ["chrono"]
|
|
|
|
## Add support for loading images from `file://` URIs.
|
|
file = ["dep:mime_guess"]
|
|
|
|
## Log warnings using [`log`](https://docs.rs/log) crate.
|
|
log = ["dep:log", "egui/log"]
|
|
|
|
## Add support for loading images via HTTP.
|
|
http = ["dep:ehttp"]
|
|
|
|
## Enable profiling with the [`puffin`](https://docs.rs/puffin) crate.
|
|
##
|
|
## Only enabled on native, because of the low resolution (1ms) of clocks in browsers.
|
|
puffin = ["dep:puffin", "egui/puffin"]
|
|
|
|
## Support loading svg images.
|
|
svg = ["resvg", "tiny-skia", "usvg"]
|
|
|
|
[dependencies]
|
|
egui = { version = "0.22.0", path = "../egui", default-features = false }
|
|
|
|
serde = { version = "1", features = ["derive"] }
|
|
|
|
#! ### Optional dependencies
|
|
|
|
# Date operations needed for datepicker widget
|
|
chrono = { version = "0.4", optional = true, default-features = false, features = [
|
|
"clock",
|
|
"js-sys",
|
|
"std",
|
|
"wasmbind",
|
|
] }
|
|
|
|
## Enable this when generating docs.
|
|
document-features = { version = "0.2", optional = true }
|
|
|
|
## Add support for loading images with the [`image`](https://docs.rs/image) crate.
|
|
##
|
|
## You also need to ALSO opt-in to the image formats you want to support, like so:
|
|
## ```toml
|
|
## image = { version = "0.24", features = ["jpeg", "png"] }
|
|
## ```
|
|
image = { version = "0.24", optional = true, default-features = false }
|
|
|
|
# feature "log"
|
|
log = { version = "0.4", optional = true, features = ["std"] }
|
|
|
|
# file feature
|
|
mime_guess = { version = "2.0.4", optional = true, default-features = false }
|
|
|
|
puffin = { version = "0.16", optional = true }
|
|
|
|
# svg feature
|
|
resvg = { version = "0.28", optional = true, default-features = false }
|
|
tiny-skia = { version = "0.8", optional = true, default-features = false } # must be updated in lock-step with resvg
|
|
usvg = { version = "0.28", optional = true, default-features = false }
|
|
|
|
# http feature
|
|
ehttp = { version = "0.3.0", optional = true, default-features = false }
|