You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
Emil Ernerfeldt cc589c7bbc bump version to 0.1.2 4 years ago
..
benches [egui] handle dynamic changes to pixels_per_point (dpi scaling) 5 years ago
fonts Rename from "Emigui" to "Egui" 5 years ago
src [widgets] new widget: DragValue 4 years ago
Cargo.toml bump version to 0.1.2 4 years ago
README.md [window] auto-position windows in a column layout 5 years ago

README.md

GUI implementation

This is the core library crate Egui. It is fully platform independent without any backend. You give the Egui 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
    • Windows should open from UIs and be boxed by parent ui.
      • Then we could open the example app inside a window in the example app, recursively.
    • Resize any side and corner on windows
    • Fix autoshrink
    • Automatic positioning of new windows
  • Scroll areas
    • Vertical scrolling
    • Horizontal scrolling
    • Scroll-wheel input
    • Drag background to scroll
    • Kinetic scrolling
  • Add support for clicking hyperlinks
  • Menu bar (File, Edit, etc)
    • Sub-menus
    • Keyboard shortcuts
  • Text input
    • Input events (key presses)
    • Text focus
    • Cursor movement
    • Text selection
    • Clipboard copy/paste
    • Move focus with tab
    • Handle leading/trailing space
  • Color picker
  • Style editor
  • Table with resizable columns
  • Layout
    • Generalize Layout (separate from Ui)
    • Cascading layout: same lite if it fits, else next line. Like text.
    • Grid layout
    • Point list
  • Image support

Web version:

  • Scroll input
  • Change to resize cursor on hover
  • Make it a JS library for easily creating your own stuff
  • Read url fragment and redirect to a subpage (e.g. different examples apps)

Visuals

  • Simplify button style to make for nicer collapsible headers. Maybe weak outline? Or just subtle different text color?
  • [/] Pixel-perfect painting (round positions to nearest pixel).
  • Make sure alpha blending is correct (different between web and glium)
  • Color picker widgets
  • Fix thin rounded corners rendering bug (too bright)

Animations

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

  • Animate collapsing headers with clip_rect

Clip rects

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

Modularity

  • trait Widget (Label, Slider, Checkbox, ...)
  • trait Container (Frame, Resize, ScrollArea, ...)
  • widget::TextButton implemented as a container::Button which contains a widget::Label.
  • Easily chain Containers without nested closures.
    • e.g. ui.containers((Frame::new(), Resize::new(), ScrollArea::new()), |ui| ...)

Input

  • Distinguish between clicks and drags
  • Double-click
  • Text
  • Support all mouse buttons

Debugability / Inspection

  • Widget debug rectangles
  • Easily debug why something keeps expanding

Other

  • Persist UI state in external storage
  • Persist Example App state
  • Build in a profiler which tracks which Ui in which window takes up CPU.
    • Draw as flame graph
    • Draw as hotmap
  • Change width.min(max_width) to width.at_most(max_width)

Names and structure

  • Rename things to be more consistent with Dear ImGui
  • Combine Egui and Context?
  • Solve which parts of Context are behind a mutex
  • Rename Region to Ui
  • Move Path and Triangles to own crate
  • Maybe find a shorter name for the library like egui?

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.