Crates.io | rg3d-ui |
lib.rs | rg3d-ui |
version | 0.15.0 |
source | src |
created_at | 2020-02-01 16:56:48.589882 |
updated_at | 2022-01-07 19:16:41.577321 |
description | Extendable UI library |
homepage | https://rg3d.rs |
repository | https://github.com/mrDIMAS/rg3d |
max_upload_size | |
id | 203968 |
size | 850,143 |
Retained mode, general purpose, graphics API agnostic user interface library. Inspired by WPF.
NOTE: even though this crate has rg3d
prefix in its name, it can be used separately without any issues.
rg3d-ui uses a bit unusual way of styling - you have to replace entire sub-graphs of widget's visual trees. What does that mean? rg3d-ui uses graph to build visual trees of any complexity, each widget is a set of nodes in the graph. For example a button is a set of background and foreground widgets, background widget usually defines appearance and foreground shows a content. Content of a button can be any widget, in most common cases it is either a text or an image. So to change appearance of a button you have to define your own background widget at the building stage, by default rg3d-ui uses Decorator widget which just changes its foreground brush when it receives MouseEnter, MouseLeave, etc. message. This fact significantly complicates minor styling (like change a color), but it is super flexible approach and allows to build your own unique style. Most of widget builders provides a way to change its parts, some of them still may lack such functionality, but this should eventually be fixed.
TODO.
TODO.
There are two projects using this UI library:
However, it can be too difficult to understand how to use the library from those projects, so standalone samples should be added. This is still a TODO.