No description
Find a file
2020-07-30 12:30:20 +02:00
.github/workflows github action 2020-07-30 12:12:06 +02:00
demo_glium [build] use path dependencies in all Cargo.toml 2020-07-30 12:14:51 +02:00
demo_web [build] use path dependencies in all Cargo.toml 2020-07-30 12:14:51 +02:00
docs [app] unify web and glium demo app 2020-07-23 19:04:23 +02:00
egui [clippy] fix all clippy issues 2020-07-30 12:30:20 +02:00
egui_glium [build] use path dependencies in all Cargo.toml 2020-07-30 12:14:51 +02:00
egui_web [clippy] fix all clippy issues 2020-07-30 12:30:20 +02:00
example_glium [build] use path dependencies in all Cargo.toml 2020-07-30 12:14:51 +02:00
.gitignore Add a benchmark 2020-05-20 21:21:25 +02:00
build_glium.sh [refactor] rename 'example' to 'demo', and add simple example_glium 2020-07-23 12:18:19 +02:00
build_web.sh [refactor] rename 'example' to 'demo', and add simple example_glium 2020-07-23 12:18:19 +02:00
Cargo.lock [build] use path dependencies in all Cargo.toml 2020-07-30 12:14:51 +02:00
Cargo.toml [refactor] rename 'example' to 'demo', and add simple example_glium 2020-07-23 12:18:19 +02:00
LICENSE-APACHE [license] licence under MIT or Apache-2.0 2020-05-26 15:07:31 +02:00
LICENSE-MIT [license] licence under MIT or Apache-2.0 2020-05-26 15:07:31 +02:00
lint.sh No typescript. Just one index.html + wasm. 2019-01-05 22:55:09 +01:00
OFL.txt New font: Comfortaa 2019-03-16 13:37:29 +01:00
README.md rename egui_wasm to egui_web 2020-07-17 12:55:07 +02:00
start_server.sh Update wasm/web example 2020-04-23 09:50:03 +02:00

Latest version Documentation MIT Apache

Egui

An immediate mode GUI library written in Rust. Works anywhere you can draw textured triangles.

Goals:

  • Lightweight
  • Short, conveniant syntax
  • Responsive (60 Hz without breaking a sweat)
  • Portable
  • Platform independent (the same code works on the web and as a native app)

How it works:

Loop:

  • Gather input: mouse, touches, screen size, ...
  • Run application code (Immediate Mode GUI)
  • Output is a triangle mesh
  • Render with e.g. OpenGL

Available backends:

Wherever you can render textured triangles you can use Egui.

The same application code can thus be compiled to either into a native app or a web app.

Demos

Egui feature demo, (partial) source: https://github.com/emilk/emigui/blob/master/egui/src/examples/app.rs

Hobogo: A small game using Egui, source: https://github.com/emilk/hobogo

State

Alpha state. It works, but is somewhat incomplete.

Features:

  • Labels
  • Buttons, checkboxes, radio buttons and sliders
  • Horizontal or vertical layout
  • Column layout
  • Collapsible headers (sections)
  • Windows
  • Resizable regions
  • Vertical scolling
  • Simple text input
  • Anti-aliased rendering of circles, rounded rectangles and lines.

Conventions

  • All coordinates are screen space coordinates, in locial "points" (which may consist of many physical pixels).
  • All colors have premultiplied alpha

Inspiration

The one and only Dear ImGui is a great Immediate Mode GUI for C++ which works with many backends. That library revolutionized how I think about GUI code from something I hated to do to something I now like to do.

Name

The name of the gui library is "Egui", written like that in text and as egui in code and pronounced as "e-gooey".

The library used to be called Emigui, which is why it is still hosted at github.com/emilk/emigui. If you like, emigui is the collection of helper crates that surrounds egui, while egui is the actual GUI library.

Credits / Licenses

Fonts:

  • Comfortaa: Open Font License, see OFT.txt
  • ProggyClean.ttf, Copyright (c) 2004, 2005 Tristan Grimmer. MIT License. http://www.proggyfonts.net/
  • Roboto-Regular.ttf: Apache License, Version 2.0