No description
Find a file
2019-03-12 22:59:55 +01:00
docs Run on requestAnimationFrame by default 2019-03-12 10:01:25 +01:00
emigui Add native glium backend 2019-03-12 22:59:55 +01:00
emigui_wasm Handle more than 2^16 vertices in WebGL renderer 2019-03-12 14:43:50 +01:00
example Handle more than 2^16 vertices in WebGL renderer 2019-03-12 14:43:50 +01:00
example_glium Add native glium backend 2019-03-12 22:59:55 +01:00
.gitignore No typescript. Just one index.html + wasm. 2019-01-05 22:55:09 +01:00
build.sh Minor improvements 2019-02-10 20:56:59 +01:00
build_and_run.sh Initial commit: Closed loop of TS->Rust->TS 2018-12-23 19:42:30 +01:00
Cargo.lock Add native glium backend 2019-03-12 22:59:55 +01:00
Cargo.toml Add native glium backend 2019-03-12 22:59:55 +01:00
lint.sh No typescript. Just one index.html + wasm. 2019-01-05 22:55:09 +01:00
README.md Add native glium backend 2019-03-12 22:59:55 +01:00
TODO.md Code cleanup: allow None mouse_pos + clippy fixes 2019-02-10 15:30:48 +01:00

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/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:

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