Add a bunch of TODOs
This commit is contained in:
parent
cac5352ad7
commit
b89ab7aa3f
3 changed files with 35 additions and 9 deletions
|
@ -2,15 +2,37 @@
|
|||
This is the core library crate Emigui. It is fully platform independent without any backend. You give the Emigui library input each frame (mouse pos etc), and it outputs a triangle mesh for you to paint.
|
||||
|
||||
## TODO:
|
||||
* Widgets:
|
||||
* Movable/resizable windows
|
||||
* Scroll areas (requires scissor tests / clip rects in paint backend)
|
||||
* Menu bar (File, Edit, etc)
|
||||
* One-line text input
|
||||
* Color picker
|
||||
* Style editor
|
||||
* Persist UI state in external storage
|
||||
* Rename Region to something shorter?
|
||||
### Widgets
|
||||
* [x] Movable/resizable windows
|
||||
* [ ] Kinetic windows
|
||||
* [ ] Scroll areas
|
||||
* [ ] Menu bar (File, Edit, etc)
|
||||
* [ ] One-line TextField
|
||||
* [ ] Color picker
|
||||
* [ ] Style editor
|
||||
|
||||
### Animations
|
||||
Add extremely quick animations for some things, maybe 2-3 frames. For instance:
|
||||
* [ ] Animate foldables with clip_rect
|
||||
|
||||
### Clip rects
|
||||
* [x] Separate Region::clip_rect from Region::rect
|
||||
* [x] Use clip rectangles when painting
|
||||
* [ ] Use clip rectangles when interacting
|
||||
|
||||
### Other
|
||||
* [ ] Create Layout so we can greater grid layouts etc
|
||||
* [ ] Persist UI state in external storage
|
||||
* [ ] Build in a profiler which tracks which region in which window takes up CPU.
|
||||
* [ ] Draw as flame graph
|
||||
* [ ] Draw as hotmap
|
||||
|
||||
### Names and structure
|
||||
* [ ] Combine Emigui and Context
|
||||
* [ ] Rename Region to something shorter?
|
||||
* `region: &Region` `region.add(...)` :/
|
||||
* `gui: &Gui` `gui.add(...)` :)
|
||||
* `ui: &Ui` `ui.add(...)` :)
|
||||
|
||||
### Global widget search
|
||||
Ability to do a search for any widget. The search works even for closed windows and foldables. This is implemented like this: while searching, all region are layed out and their add_content functions are run. If none of the contents matches the search, the layout is reverted and nothing is shown. So windows will get temporarily opened and run, but if the search is not a match in the window it is closed again. This means then when searching your whole GUI is being run, which may be a bit slower, but it would be a really awesome feature.
|
||||
|
|
|
@ -10,6 +10,7 @@ struct Stats {
|
|||
}
|
||||
|
||||
/// Encapsulates input, layout and painting for ease of use.
|
||||
/// TODO: merge into Context
|
||||
pub struct Emigui {
|
||||
pub last_input: RawInput,
|
||||
pub ctx: Arc<Context>,
|
||||
|
|
|
@ -5,6 +5,8 @@ use crate::{mesher::Path, widgets::*, *};
|
|||
#[derive(Clone, Copy, Debug)]
|
||||
pub struct WindowState {
|
||||
/// Last known pos/size
|
||||
/// TODO: replace with outer_pos and inner_rect
|
||||
/// so we can change style without content resizing.
|
||||
pub rect: Rect,
|
||||
}
|
||||
|
||||
|
@ -93,6 +95,7 @@ impl Window {
|
|||
state.rect.size() - 2.0 * window_padding,
|
||||
);
|
||||
let mut contents_region = Region::new(ctx.clone(), layer, id, inner_rect);
|
||||
// TODO: handle contents_region.clip_rect while resizing
|
||||
|
||||
// Show top bar:
|
||||
contents_region.add(Label::new(self.title).text_style(TextStyle::Heading));
|
||||
|
|
Loading…
Reference in a new issue