mirror of
https://github.com/griffi-gh/hUI.git
synced 2024-11-21 22:58:42 -06:00
update readme
This commit is contained in:
parent
2d2e335259
commit
cdbc0559c2
BIN
.assets/exemplaris.png
Normal file
BIN
.assets/exemplaris.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 6.9 KiB |
30
README.md
30
README.md
|
@ -24,6 +24,36 @@
|
||||||
</td>
|
</td>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
|
<h2>Example</h2>
|
||||||
|
|
||||||
|
<img src="https://raw.githubusercontent.com/griffi-gh/hui/master/.assets/exemplaris.png" width="400" align="right">
|
||||||
|
<pre lang="rust">Container::default()
|
||||||
|
.with_size(size!(100%, 50%))
|
||||||
|
.with_align(Alignment::Center)
|
||||||
|
.with_padding(5.)
|
||||||
|
.with_gap(10.)
|
||||||
|
.with_corner_radius(10.)
|
||||||
|
.with_background(color::WHITE)
|
||||||
|
.with_children(|ui| {
|
||||||
|
Text::default()
|
||||||
|
.with_text("Hello, world")
|
||||||
|
.with_text_size(100)
|
||||||
|
.with_color(color::BLACK)
|
||||||
|
.add_child(ui);
|
||||||
|
Container::default()
|
||||||
|
.with_padding((10., 20.))
|
||||||
|
.with_corner_radius((2.5, 30., 2.5, 2.5))
|
||||||
|
.with_background(color::DARK_RED)
|
||||||
|
.with_children(|ui| {
|
||||||
|
Text::default()
|
||||||
|
.with_text("Lorem ipsum dolor sit amet, consectetur adipiscing elit.")
|
||||||
|
.with_text_size(24)
|
||||||
|
.add_child(ui);
|
||||||
|
})
|
||||||
|
.add_child(ui);
|
||||||
|
})
|
||||||
|
.add_root(&mut hui, resolution);</pre>
|
||||||
|
|
||||||
<h2>Backends</h2>
|
<h2>Backends</h2>
|
||||||
<p>
|
<p>
|
||||||
Latest stable release:
|
Latest stable release:
|
||||||
|
|
Loading…
Reference in a new issue