imgui-inspect icon indicating copy to clipboard operation
imgui-inspect copied to clipboard

Q. `enum` support?

Open toyboot4e opened this issue 3 years ago • 1 comments

Is enum not supported yet?

Example:

use imgui_inspect_derive::Inspect;

#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Inspect)]
pub enum ShadowConfig {
    Blur,
    Raw,
    None,
}

cargo build:

error: proc-macro derive panicked
--> crates/grue2d/src/game/cfg.rs:7:51
 |
7 | #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Inspect)]
 |                                                   ^^^^^^^
 |
 = help: message: not implemented

Thank you :)

toyboot4e avatar Apr 18 '21 14:04 toyboot4e

It sounds like a good thing to add. I'm not sure how the UX would work. I'm too busy with other projects to do it myself, but if someone wanted to PR it I'd be happy to take a look. (I would expect enum support to allow setting values within enum variants).

aclysma avatar Apr 18 '21 16:04 aclysma