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 be23d66f9e Update rusttype and run cargo update 5 years ago
docs Fix performance issue on touch devices 6 years ago
emigui Update rusttype and run cargo update 5 years ago
emigui_glium Some minor fixes and additions 5 years ago
emigui_wasm New font: Comfortaa 6 years ago
example_glium Minor API improvements 6 years ago
example_wasm Some minor fixes and additions 5 years ago
.gitignore No typescript. Just one index.html + wasm. 6 years ago
Cargo.lock Update rusttype and run cargo update 5 years ago
Cargo.toml Minor API improvements 6 years ago
OFL.txt New font: Comfortaa 6 years ago
README.md New font: Comfortaa 6 years ago
TODO.md Some minor fixes and additions 5 years ago
build_and_run.sh Update rusttype and run cargo update 5 years ago
build_wasm.sh Rename example app to example_wasm 6 years ago
lint.sh No typescript. Just one index.html + wasm. 6 years ago

README.md

Emigui

(Experimental, Modularized Immediate mode Graphical User Interface)

An immediate mode GUI library written in Rust. For web apps or native apps.

Goals:

  • Easy to use
  • Platform independent (the same code works on the web and as a native app)
  • Responsive

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 Emigui.

Currently two backends have been tested:

  • WebAssembly (emigui_wasm) for making a web app
  • Glium for native apps (see example_glium).

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

Demos

Emigui feature demo, source: https://github.com/emilk/emigui/blob/master/example_wasm/src/app.rs

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

State

Mostly a tech demo at this point. I hope to find time to work more on this in the future.

Features:

  • Text
  • Buttons, checkboxes, radio buttons and sliders
  • Horizontal or vertical layout
  • Column layout
  • Collapsible headers (sections)
  • Anti-aliased rendering of circles, rounded rectangles and lines.

Roadmap:

  • Turn the Glium backend into a library
  • Some examples and documentation
  • Text input

Inspiration

Dear ImGui is a great Immediate Mode GUI for C++ which works with many backends.

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