egui/emigui
2020-04-22 20:01:49 +02:00
..
fonts New font: Comfortaa 2019-03-16 13:37:29 +01:00
src Listen to scroll wheel (glium only) 2020-04-22 20:01:49 +02:00
Cargo.toml Switch to parking_lot::Mutex 2020-04-18 09:32:39 +02:00
README.md Listen to scroll wheel (glium only) 2020-04-22 20:01:49 +02:00

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:

Widgets

  • Label
  • Button
  • Checkbox
  • Radiobutton
  • Horizontal slider
  • Vertical slider
  • Collapsing header region
  • Tooltip
  • Movable/resizable windows
    • Kinetic windows
  • Scroll areas
    • Vertical scrolling
    • Horizontal scrolling
    • Scroll-wheel input
      • Scroll-wheel input in web verions
    • Drag background to scroll
    • Kinetic scrolling
  • Menu bar (File, Edit, etc)
  • One-line TextField
    • Clipboard copy/paste
  • Color picker
  • Style editor

Animations

Add extremely quick animations for some things, maybe 2-3 frames. For instance:

  • Animate collapsing headers with clip_rect

Clip rects

  • Separate Region::clip_rect from Region::rect
  • Use clip rectangles when painting
  • Use clip rectangles when interacting
  • Adjust clip rects so edges of child widgets aren't clipped

Other

  • Generalize Layout so we can create 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

  • Rename things to be more consistent with Dear ImGui
  • Combine Emigui and Context
  • Rename Region to something shorter?
    • region: &Region region.add(...) :/
    • gui: &Gui gui.add(...) :)
    • ui: &Ui ui.add(...) :)

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.