2024-02-17 15:49:45 -06:00
|
|
|
<p></p><p></p>
|
2024-03-25 08:26:20 -05:00
|
|
|
<img src="https://raw.githubusercontent.com/griffi-gh/hui/master/.assets/hui.svg" width="120" align="left" alt="logo">
|
2024-03-01 11:21:02 -06:00
|
|
|
<h1>hUI</h1>
|
2024-02-17 15:48:48 -06:00
|
|
|
<div>
|
2024-02-19 10:10:30 -06:00
|
|
|
<span>
|
|
|
|
Simple UI library for games and other interactive applications
|
|
|
|
</span><a href="https://crates.io/crates/hui" float="right">
|
2024-02-19 10:35:12 -06:00
|
|
|
<img alt="crates.io" src="https://img.shields.io/crates/v/hui.svg?style=flat-square" align="right" height="20">
|
2024-02-19 10:10:30 -06:00
|
|
|
</a><br><a href="./LICENSE.txt" align="right" float="right">
|
2024-02-19 10:35:12 -06:00
|
|
|
<img alt="license" src="https://img.shields.io/github/license/griffi-gh/hui?style=flat-square" align="right" width="102" height="20">
|
2024-02-19 10:10:30 -06:00
|
|
|
</a><span>
|
2024-03-01 11:21:02 -06:00
|
|
|
(Formerly <code>kubi-ui</code>)
|
2024-02-19 10:10:30 -06:00
|
|
|
</span>
|
|
|
|
</div>
|
2024-02-17 15:48:48 -06:00
|
|
|
<p></p>
|
2024-02-17 15:33:09 -06:00
|
|
|
<br clear="all">
|
|
|
|
|
2024-02-17 15:53:39 -06:00
|
|
|
<table align="center">
|
2024-02-17 15:33:09 -06:00
|
|
|
<td>
|
2024-03-25 08:26:20 -05:00
|
|
|
<img src="https://raw.githubusercontent.com/griffi-gh/hui/master/.assets/demo0.gif" width="300" alt="example: mom_downloader">
|
2024-02-17 15:33:09 -06:00
|
|
|
</td>
|
|
|
|
<td>
|
2024-03-25 08:26:20 -05:00
|
|
|
<img src="https://raw.githubusercontent.com/griffi-gh/hui/master/.assets/demo1.gif" width="300" alt="example: align_test">
|
2024-02-17 15:33:09 -06:00
|
|
|
</td>
|
|
|
|
</table>
|
2024-02-19 10:10:30 -06:00
|
|
|
|
2024-02-28 09:54:14 -06:00
|
|
|
<h2>Example</h2>
|
2024-03-25 08:26:20 -05:00
|
|
|
<img src="https://raw.githubusercontent.com/griffi-gh/hui/master/.assets/exemplaris.png"
|
|
|
|
height="175" align="right" float="right" alt="code result">
|
2024-02-28 09:54:14 -06:00
|
|
|
<pre lang="rust">Container::default()
|
|
|
|
.with_size(size!(100%, 50%))
|
|
|
|
.with_align(Alignment::Center)
|
|
|
|
.with_padding(5.)
|
|
|
|
.with_gap(10.)
|
2024-04-17 08:57:46 -05:00
|
|
|
.with_background(rect_frame! {
|
2024-03-25 08:26:20 -05:00
|
|
|
color: (0.5, 0.5, 0.5, 1.),
|
|
|
|
corner_radius: 10.,
|
|
|
|
})
|
2024-02-28 09:54:14 -06:00
|
|
|
.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.))
|
2024-04-17 08:57:46 -05:00
|
|
|
.with_background(rect_frame! {
|
2024-03-25 08:26:20 -05:00
|
|
|
color: color::DARK_RED,
|
|
|
|
corner_radius: (2.5, 30., 2.5, 2.5),
|
|
|
|
})
|
2024-02-28 09:54:14 -06:00
|
|
|
.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);
|
|
|
|
})
|
2024-03-25 08:26:20 -05:00
|
|
|
.add_root(ui, size);</pre>
|
2024-02-28 09:54:14 -06:00
|
|
|
|
2024-02-19 10:10:30 -06:00
|
|
|
<h2>Backends</h2>
|
2024-02-19 10:35:12 -06:00
|
|
|
<p>
|
|
|
|
Latest stable release:
|
|
|
|
<a href="https://crates.io/crates/hui" float="right">
|
|
|
|
<img alt="crates.io" src="https://img.shields.io/crates/v/hui.svg?style=flat-square&label=&color=0d1117" height="20">
|
|
|
|
</a>
|
|
|
|
</p>
|
2024-02-19 10:10:30 -06:00
|
|
|
<table>
|
|
|
|
<tr>
|
|
|
|
<th align="center">
|
|
|
|
<code>hui</code>
|
|
|
|
</th>
|
|
|
|
<th align="center">
|
2024-02-19 10:47:43 -06:00
|
|
|
<code>glium</code> (render)
|
2024-02-19 10:10:30 -06:00
|
|
|
</th>
|
|
|
|
<th align="center">
|
2024-02-19 10:47:43 -06:00
|
|
|
<code>winit</code> (platform)
|
2024-02-19 10:10:30 -06:00
|
|
|
</th>
|
|
|
|
<th align="center">
|
2024-02-19 10:47:43 -06:00
|
|
|
<code>wgpu</code> (render)
|
2024-02-19 10:10:30 -06:00
|
|
|
</th>
|
|
|
|
</tr>
|
2024-02-19 10:24:31 -06:00
|
|
|
<tr>
|
|
|
|
<td align="center">
|
2024-02-19 10:25:12 -06:00
|
|
|
<code>master</code>
|
2024-02-19 10:24:31 -06:00
|
|
|
</th>
|
|
|
|
<td>
|
2024-02-19 10:25:12 -06:00
|
|
|
<code>hui-glium = <master></code><br>
|
2024-12-11 13:24:44 -06:00
|
|
|
<code>glium = "0.36"</code>
|
2024-02-19 10:24:31 -06:00
|
|
|
</td>
|
|
|
|
<td>
|
|
|
|
<code>hui-winit = <master></code><br>
|
2024-08-04 11:06:49 -05:00
|
|
|
<code>winit = "0.30"</code>
|
2024-02-19 10:24:31 -06:00
|
|
|
</td>
|
2024-05-07 18:50:02 -05:00
|
|
|
<td>
|
|
|
|
<code>hui-wgpu = <master></code><br>
|
2024-12-11 13:24:44 -06:00
|
|
|
<code>wgpu = "23"</code>
|
2024-05-07 18:50:02 -05:00
|
|
|
</td>
|
2024-02-19 10:24:31 -06:00
|
|
|
</tr>
|
2024-12-11 14:06:24 -06:00
|
|
|
<tr>
|
2024-12-11 13:24:44 -06:00
|
|
|
<td align="center">
|
|
|
|
<code>0.1.0-alpha.5</code>
|
|
|
|
</th>
|
|
|
|
<td>
|
|
|
|
<code>hui-glium = <master></code><br>
|
|
|
|
<code>glium = "0.36"</code>
|
|
|
|
</td>
|
|
|
|
<td>
|
|
|
|
<code>hui-winit = <master></code><br>
|
|
|
|
<code>winit = "0.30"</code>
|
|
|
|
</td>
|
|
|
|
<td>
|
|
|
|
<code>hui-wgpu = <master></code><br>
|
|
|
|
<code>wgpu = "23"</code>
|
|
|
|
</td>
|
2024-12-11 14:06:24 -06:00
|
|
|
</tr>
|
2024-03-25 12:35:54 -05:00
|
|
|
<tr>
|
|
|
|
<td align="center">
|
|
|
|
<code>0.1.0-alpha.4</code>
|
|
|
|
</th>
|
|
|
|
<td>
|
|
|
|
<code>hui-glium = "0.1.0-alpha.4"</code><br>
|
|
|
|
<code>glium = "0.34"</code>
|
|
|
|
</td>
|
|
|
|
<td>
|
|
|
|
<code>hui-winit = "0.1.0-alpha.4"</code><br>
|
|
|
|
<code>winit = "0.29"</code>
|
|
|
|
</td>
|
|
|
|
<td align="center">N/A</td>
|
|
|
|
</tr>
|
2024-02-20 14:21:58 -06:00
|
|
|
<tr>
|
|
|
|
<td align="center">
|
|
|
|
<code>0.1.0-alpha.3</code>
|
|
|
|
</th>
|
|
|
|
<td>
|
|
|
|
<code>hui-glium = "0.1.0-alpha.3"</code><br>
|
|
|
|
<code>glium = "0.34"</code>
|
|
|
|
</td>
|
|
|
|
<td align="center" colspan="2">N/A</td>
|
|
|
|
</tr>
|
2024-02-19 10:10:30 -06:00
|
|
|
<tr>
|
|
|
|
<td align="center">
|
|
|
|
<code>0.1.0-alpha.2</code>
|
|
|
|
</th>
|
|
|
|
<td>
|
|
|
|
<code>hui-glium = "0.1.0-alpha.2"</code><br>
|
|
|
|
<code>glium = "0.34"</code>
|
|
|
|
</td>
|
|
|
|
<td align="center" colspan="2">N/A</td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td align="center">
|
|
|
|
<code>0.1.0-alpha.1</code>
|
|
|
|
</th>
|
|
|
|
<td>
|
|
|
|
<code>hui-glium = "0.1.0-alpha.1"</code><br>
|
|
|
|
<code>glium = "0.34"</code>
|
|
|
|
</td>
|
|
|
|
<td align="center" colspan="2">N/A</td>
|
|
|
|
</tr>
|
|
|
|
<!-- <tr>
|
|
|
|
<td align="center">
|
|
|
|
<code>0.0.2</code>
|
|
|
|
</th>
|
|
|
|
<td>
|
|
|
|
<code>hui-glium = "0.0.2"</code><br>
|
|
|
|
<code>glium = "0.34"</code>
|
|
|
|
</td>
|
|
|
|
<td align="center">-</td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td align="center">
|
|
|
|
<code>0.0.1</code>
|
|
|
|
</th>
|
|
|
|
<td>
|
|
|
|
<code>hui-glium = "0.0.1"</code><br>
|
|
|
|
<code>glium = "0.34"</code>
|
|
|
|
</td>
|
|
|
|
<td align="center">-</td>
|
|
|
|
</tr> -->
|
|
|
|
</table>
|
2024-03-25 12:32:31 -05:00
|
|
|
|
|
|
|
<h2>MSRV</h2>
|
2024-08-06 07:48:40 -05:00
|
|
|
1.80 (or latest stable at the time of the last major release)<br>
|
|
|
|
bumps to MSRV are considered a breaking change
|