4 releases
| 0.1.3 | Sep 23, 2021 |
|---|---|
| 0.1.2 | Sep 22, 2021 |
| 0.1.1 | Sep 20, 2021 |
| 0.1.0 | Sep 20, 2021 |
#28 in #inspector
Used in xdl
10KB
238 lines
ImGUI runtime inspector
use igri::Inspect;
#[derive(Inspect)]
pub struct MyCoolStruct<T> {
xs: Vec<T>,
}
enum support
Default enum inspector is implemented as a tag selector + variant field inspectors. On the tag
change, the inspected value is replaced with the target variant with default values. If any of the
variant field does not satisfy the Default trait, the Inspect trait derivation fails.
dummy feature
We want to disable developer UI on release build. Enable dummy feature flag to turn off
#[derive(Inspect)] expansion.
Be sure to opt out other calls to
igri, too!
Limitations
Inspect is a foreign trait from your code, which can only be implemented for types in your own
crate. So types upstream framework types do not implement Inspect.
igri lets you tweak values via imgui, but it doesn't let you propagate the change (so for
example, your game view is not synced to changes made with igri).
ImGUI runtime inspector
igri is a runtime inspector powered by imgui-rs
use igri::Inspect;
#[derive(Inspect)]
pub struct MyCoolStruct<T> {
xs: Vec<T>,
}
dummy feature
We want to disable developer UI on release build. Enable dummy feature flag to turn off #[derive(Inspect)] expansion.
Be sure to out put other calls to
igri, too!
Dependencies
~15MB
~291K SLoC