Phosphorus is a user interface library written in rust. It is written for use in Athena, but can also be used in Piston or standalone. It can be integrated into any application that uses gfx-rs.
To use Phosphorus you need to create a Gui
object, filling it with a layout.
let root = phosphorus::widget::LayoutBuilder::new()
.with_background_color([21, 23, 24])
.build();
let mut gui = phosphorus::Gui::new(&mut device, &mut factory, root);
Then you can render it using a gfx Factory
and Stream
combination.
gui.render(&mut factory, &mut stream);
Phosphorus aims to:
- Make it easy to create complex layout-based UIs
- Provide a non-immediate-mode alternative to Conrod
- Provide a UI library for both desktop applications and games
- Provide markup based UI (Not Done)
- Support runtime updating of the UI through data binding (Not Done)