Crates.io | egui_inspect |
lib.rs | egui_inspect |
version | 0.1.3 |
source | src |
created_at | 2022-02-01 17:52:16.74122 |
updated_at | 2022-02-22 11:50:56.207457 |
description | Easily creating UI to edit and preview data |
homepage | https://github.com/Meisterlama/egui_inspect |
repository | https://github.com/Meisterlama/egui_inspect |
max_upload_size | |
id | 525307 |
size | 10,401 |
This crate is intended to provide some rust helper macros to automatically generate boilerplate code to inspect structures
Its goals are:
There is a EguiInspect
trait which is necessary for a struct to be inspected. This trait is implemented for most base
types, and can be generated for user created types with the macro #[derive(EguiInspect)]
. If every underlying types
implements EguiInspect
, then you will be able to inspect it.
This is a side project, at a very early state, so the API might not be stable yet.
You can inspect struct mutably and non-mutably. There is some customization per fields. There is no possibilities to override field's name yet
To implement this example, you just need to add egui_inspect as dependency to your project, and then, when drawing you
ui with egui, you need to give your &Ui
to the inspect function, no need for additional input .
See example to see a complete integration with the eframe crate