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.

56 lines
1.8 KiB

6 years ago
# Emigui
6 years ago
(Experimental, Modularized Immediate mode Graphical User Interface)
An immediate mode GUI library written in Rust. For web apps or native apps.
6 years ago
## Goals:
* Easy to use
* Platform independent (the same code works on the web and as a native app)
6 years ago
* Responsive
6 years ago
## How it works:
6 years ago
Loop:
* Gather input: mouse, touches, screen size, ...
6 years ago
* Run application code (Immediate Mode GUI)
6 years ago
* 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](https://github.com/glium/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.
6 years ago
## Demos
6 years ago
[Emigui feature demo](https://emilk.github.io/emigui/index.html), source: https://github.com/emilk/emigui/blob/master/example/src/app.rs
6 years ago
[Hobogo: A small game using Emigui](https://emilk.github.io/hobogo/index.html), source: https://github.com/emilk/hobogo
6 years ago
6 years ago
## State
6 years ago
Mostly a tech demo at this point. I hope to find time to work more on this in the future.
Features:
6 years ago
6 years ago
* Text
6 years ago
* Buttons, checkboxes, radio buttons and sliders
6 years ago
* Horizontal or vertical layout
6 years ago
* Column layout
* Collapsible headers (sections)
* Anti-aliased rendering of circles, rounded rectangles and lines.
## Roadmap:
* Turn the [Glium](https://github.com/glium/glium) backend into a library
* Some examples and documentation
6 years ago
* Text input
6 years ago
## Inspiration
6 years ago
[Dear ImGui](https://github.com/ocornut/imgui) is a great Immediate Mode GUI for C++ which works with many backends.
6 years ago
## Credits / Licenses
6 years ago
Fonts:
* ProggyClean.ttf, Copyright (c) 2004, 2005 Tristan Grimmer. MIT License. http://www.proggyfonts.net/
* Roboto-Regular.ttf: Apache License, Version 2.0