egui/emigui/README.md

62 lines
2.4 KiB
Markdown
Raw Normal View History

# GUI implementation
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:
2020-04-21 08:27:53 +00:00
### Widgets
2020-04-21 14:50:56 +00:00
* [x] Label
* [x] Button
* [x] Checkbox
* [x] Radiobutton
* [x] Horizontal slider
* [ ] Vertical slider
* [x] Collapsing header region
2020-04-21 14:50:56 +00:00
* [x] Tooltip
2020-04-21 08:27:53 +00:00
* [x] Movable/resizable windows
* [ ] Kinetic windows
* [ ] Scroll areas
2020-04-22 15:38:36 +00:00
* [x] Vertical scrolling
* [ ] Horizontal scrolling
2020-04-22 18:01:49 +00:00
* [x] Scroll-wheel input
2020-04-22 15:38:36 +00:00
* [x] Drag background to scroll
* [ ] Kinetic scrolling
2020-04-23 17:15:17 +00:00
* [x] Add support for clicking links
2020-04-21 08:27:53 +00:00
* [ ] Menu bar (File, Edit, etc)
* [ ] One-line TextField
2020-04-22 15:38:36 +00:00
* [ ] Clipboard copy/paste
2020-04-21 08:27:53 +00:00
* [ ] Color picker
* [ ] Style editor
2020-04-23 07:50:03 +00:00
* [ ] Table with resizable columns
### Web version:
* [x] Scroll input
2020-04-23 17:15:17 +00:00
* [x] Change to resize cursor on hover
2020-04-21 08:27:53 +00:00
### Animations
Add extremely quick animations for some things, maybe 2-3 frames. For instance:
* [x] Animate collapsing headers with clip_rect
2020-04-21 08:27:53 +00:00
### Clip rects
* [x] Separate Region::clip_rect from Region::rect
* [x] Use clip rectangles when painting
* [ ] Use clip rectangles when interacting
* [x] Adjust clip rects so edges of child widgets aren't clipped
2020-04-21 14:50:56 +00:00
2020-04-21 08:27:53 +00:00
### Other
2020-04-21 14:50:56 +00:00
* [ ] Generalize Layout so we can create grid layouts etc
2020-04-21 08:27:53 +00:00
* [ ] Persist UI state in external storage
2020-04-23 17:15:17 +00:00
* [ ] Pixel-perfect rendering (round positions to nearest pixel).
2020-04-21 08:27:53 +00:00
* [ ] Build in a profiler which tracks which region in which window takes up CPU.
* [ ] Draw as flame graph
* [ ] Draw as hotmap
### Names and structure
2020-04-22 15:38:36 +00:00
* [ ] Rename things to be more consistent with Dear ImGui
2020-04-21 08:27:53 +00:00
* [ ] Combine Emigui and Context
* [ ] Rename Region to something shorter?
* `region: &Region` `region.add(...)` :/
* `gui: &Gui` `gui.add(...)` :)
* `ui: &Ui` `ui.add(...)` :)
2020-04-21 08:27:53 +00:00
### Global widget search
Ability to do a search for any widget. The search works even for collapsed regions and closed windows and menus. 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.