mirror of
https://github.com/griffi-gh/hUI.git
synced 2024-11-24 16:18:40 -06:00
Compare commits
2 commits
6eb3d98ad4
...
61989c7a79
Author | SHA1 | Date | |
---|---|---|---|
griffi-gh | 61989c7a79 | ||
griffi-gh | 7ef1929906 |
|
@ -1,3 +1,3 @@
|
||||||
[workspace]
|
[workspace]
|
||||||
resolver = "2"
|
resolver = "2"
|
||||||
members = ["hui", "hui-derive", "hui-examples", "hui-glium", "hui-wgpu", "hui-winit"]
|
members = ["hui", "hui-derive", "hui-examples", "hui-glium", "hui-painter", "hui-shared", "hui-wgpu", "hui-winit"]
|
||||||
|
|
|
@ -86,11 +86,11 @@
|
||||||
</th>
|
</th>
|
||||||
<td>
|
<td>
|
||||||
<code>hui-glium = <master></code><br>
|
<code>hui-glium = <master></code><br>
|
||||||
<code>glium = "0.34"</code>
|
<code>glium = "0.35"</code>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<code>hui-winit = <master></code><br>
|
<code>hui-winit = <master></code><br>
|
||||||
<code>winit = "0.30"</code> or <code>winit = "0.29"</code>
|
<code>winit = "0.30"</code>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<code>hui-wgpu = <master></code><br>
|
<code>hui-wgpu = <master></code><br>
|
||||||
|
|
|
@ -8,11 +8,11 @@ publish = false
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
hui = { path = "../hui" }
|
hui = { path = "../hui" }
|
||||||
hui-glium = { path = "../hui-glium" }
|
hui-glium = { path = "../hui-glium" }
|
||||||
hui-winit = { path = "../hui-winit", features = ["winit_29"] }
|
hui-winit = { path = "../hui-winit" }
|
||||||
kubi-logging = { git = "https://github.com/griffi-gh/kubi", rev = "c162893fd" }
|
kubi-logging = { git = "https://github.com/griffi-gh/kubi", rev = "c162893fd" }
|
||||||
glium = "0.34"
|
glium = "0.35"
|
||||||
winit = "0.29"
|
winit = "0.30"
|
||||||
glam = "0.27"
|
glam = "0.28"
|
||||||
log = "0.4"
|
log = "0.4"
|
||||||
image = { version = "0.25", features = ["jpeg", "png"] }
|
image = { version = "0.25", features = ["jpeg", "png"] }
|
||||||
|
|
||||||
|
|
|
@ -17,6 +17,6 @@ include = [
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
hui = { version = "=0.1.0-alpha.5", path = "../hui", default-features = false }
|
hui = { version = "=0.1.0-alpha.5", path = "../hui", default-features = false }
|
||||||
glium = { version = "0.34", default-features = false }
|
glium = { version = "0.35", default-features = false }
|
||||||
glam = "0.27"
|
glam = "0.28"
|
||||||
log = "0.4"
|
log = "0.4"
|
||||||
|
|
20
hui-painter/Cargo.toml
Normal file
20
hui-painter/Cargo.toml
Normal file
|
@ -0,0 +1,20 @@
|
||||||
|
[package]
|
||||||
|
name = "hui-painter"
|
||||||
|
description = "UI rendering middleware for hUI, abstracts away triangulation, text rendering and all the other hard stuff."
|
||||||
|
repository = "https://github.com/griffi-gh/hui"
|
||||||
|
readme = "../README.md"
|
||||||
|
authors = ["griffi-gh <prasol258@gmail.com>"]
|
||||||
|
rust-version = "1.75"
|
||||||
|
version = "0.1.0-alpha.5"
|
||||||
|
edition = "2021"
|
||||||
|
license = "GPL-3.0-or-later"
|
||||||
|
publish = true
|
||||||
|
include = [
|
||||||
|
"assets/**/*",
|
||||||
|
"src/**/*.rs",
|
||||||
|
"Cargo.toml",
|
||||||
|
]
|
||||||
|
|
||||||
|
[dependencies]
|
||||||
|
hui-shared = { version = "0.1.0-alpha.5", path = "../hui-shared" }
|
||||||
|
glam = "0.28"
|
17
hui-painter/src/lib.rs
Normal file
17
hui-painter/src/lib.rs
Normal file
|
@ -0,0 +1,17 @@
|
||||||
|
//TODO painter rewrite
|
||||||
|
|
||||||
|
mod rect;
|
||||||
|
pub use rect::PaintRectParams;
|
||||||
|
|
||||||
|
pub struct PaintTransformParams {
|
||||||
|
transform: glam::Affine2,
|
||||||
|
}
|
||||||
|
|
||||||
|
pub enum PaintCommand {
|
||||||
|
Rect(PaintRectParams),
|
||||||
|
Transform(PaintTransformParams, Box<PaintCommand>),
|
||||||
|
}
|
||||||
|
|
||||||
|
pub struct Painter {
|
||||||
|
|
||||||
|
}
|
13
hui-painter/src/rect.rs
Normal file
13
hui-painter/src/rect.rs
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
use glam::Vec2;
|
||||||
|
use hui_shared::rect::{Corners, FillColor};
|
||||||
|
|
||||||
|
pub struct PaintRectParams {
|
||||||
|
/// Color of the rectangle.
|
||||||
|
pub color: FillColor,
|
||||||
|
|
||||||
|
/// Border width.
|
||||||
|
pub border_radius: Corners<f32>,
|
||||||
|
|
||||||
|
/// Border color.
|
||||||
|
pub border_radius_points_override: Option<f32>,
|
||||||
|
}
|
7
hui-shared/Cargo.toml
Normal file
7
hui-shared/Cargo.toml
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
[package]
|
||||||
|
name = "hui-shared"
|
||||||
|
version = "0.1.0-alpha.5"
|
||||||
|
edition = "2021"
|
||||||
|
|
||||||
|
[dependencies]
|
||||||
|
glam = "0.28"
|
1
hui-shared/src/lib.rs
Normal file
1
hui-shared/src/lib.rs
Normal file
|
@ -0,0 +1 @@
|
||||||
|
pub mod rect;
|
|
@ -20,4 +20,4 @@ hui = { version = "=0.1.0-alpha.5", path = "../hui", default-features = false }
|
||||||
wgpu = { version = "0.20", default-features = false, features = ["wgsl"]}
|
wgpu = { version = "0.20", default-features = false, features = ["wgsl"]}
|
||||||
bytemuck = "1.15"
|
bytemuck = "1.15"
|
||||||
log = "0.4"
|
log = "0.4"
|
||||||
glam = "0.27"
|
glam = "0.28"
|
||||||
|
|
|
@ -15,12 +15,13 @@ include = [
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
hui = { version = "=0.1.0-alpha.5", path = "../hui", default-features = false }
|
hui = { version = "=0.1.0-alpha.5", path = "../hui", default-features = false }
|
||||||
winit_30 = { package = "winit", version = "0.30", default-features = false, optional = true }
|
winit = { version = "0.30", default-features = false }
|
||||||
winit_29 = { package = "winit", version = "0.29", default-features = false, optional = true }
|
# winit_30 = { package = "winit", version = "0.30", default-features = false, optional = true }
|
||||||
glam = "0.27"
|
# winit_29 = { package = "winit", version = "0.29", default-features = false, optional = true }
|
||||||
|
glam = "0.28"
|
||||||
log = "0.4"
|
log = "0.4"
|
||||||
|
|
||||||
[features]
|
[features]
|
||||||
default = []
|
default = []
|
||||||
winit_30 = ["dep:winit_30"]
|
# winit_30 = ["dep:winit_30"]
|
||||||
winit_29 = ["dep:winit_29"]
|
# winit_29 = ["dep:winit_29"]
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
#[cfg(all(feature = "winit_30", feature = "winit_29"))]
|
// #[cfg(all(feature = "winit_30", feature = "winit_29"))]
|
||||||
compile_error!("Only one of the winit_30 and winit_29 features can be enabled at a time");
|
// compile_error!("Only one of the winit_30 and winit_29 features can be enabled at a time");
|
||||||
#[cfg(not(any(feature = "winit_30", feature = "winit_29")))]
|
// #[cfg(not(any(feature = "winit_30", feature = "winit_29")))]
|
||||||
compile_error!("One of the winit_30 and winit_29 features must be enabled");
|
// compile_error!("One of the winit_30 and winit_29 features must be enabled");
|
||||||
#[cfg(feature = "winit_30")] extern crate winit_30 as winit;
|
// #[cfg(feature = "winit_30")] extern crate winit_30 as winit;
|
||||||
#[cfg(feature = "winit_29")] extern crate winit_29 as winit;
|
// #[cfg(feature = "winit_29")] extern crate winit_29 as winit;
|
||||||
|
|
||||||
use glam::vec2;
|
use glam::vec2;
|
||||||
use hui::{event::UiEvent, UiInstance};
|
use hui::{event::UiEvent, UiInstance};
|
||||||
|
|
|
@ -17,10 +17,12 @@ include = [
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
hui-derive = { version = "0.1.0-alpha.5", path = "../hui-derive", optional = true }
|
hui-derive = { version = "0.1.0-alpha.5", path = "../hui-derive", optional = true }
|
||||||
|
hui-shared = { version = "0.1.0-alpha.5", path = "../hui-shared" }
|
||||||
|
hui-painter = { version = "0.1.0-alpha.5", path = "../hui-painter" }
|
||||||
hashbrown = "0.14"
|
hashbrown = "0.14"
|
||||||
nohash-hasher = "0.2"
|
nohash-hasher = "0.2"
|
||||||
glam = "0.27"
|
glam = "0.28.0"
|
||||||
fontdue = "0.8"
|
fontdue = "0.9"
|
||||||
rect_packer = "0.2"
|
rect_packer = "0.2"
|
||||||
log = "0.4"
|
log = "0.4"
|
||||||
document-features = "0.2"
|
document-features = "0.2"
|
||||||
|
@ -28,7 +30,7 @@ derive_setters = "0.1"
|
||||||
derive_more = "0.99"
|
derive_more = "0.99"
|
||||||
tinyset = "0.4"
|
tinyset = "0.4"
|
||||||
image = { version = "0.25", default-features = false, optional = true }
|
image = { version = "0.25", default-features = false, optional = true }
|
||||||
rustc-hash = "1.1"
|
rustc-hash = "2.0"
|
||||||
|
|
||||||
[features]
|
[features]
|
||||||
default = ["el_all", "image", "builtin_font", "pixel_perfect_text", "derive"]
|
default = ["el_all", "image", "builtin_font", "pixel_perfect_text", "derive"]
|
||||||
|
|
|
@ -11,10 +11,11 @@
|
||||||
#![forbid(unsafe_op_in_unsafe_fn)]
|
#![forbid(unsafe_op_in_unsafe_fn)]
|
||||||
#![allow(unused_parens)]
|
#![allow(unused_parens)]
|
||||||
|
|
||||||
|
pub use hui_shared::*;
|
||||||
|
|
||||||
mod instance;
|
mod instance;
|
||||||
mod macros;
|
mod macros;
|
||||||
pub mod layout;
|
pub mod layout;
|
||||||
pub mod rect;
|
|
||||||
pub mod element;
|
pub mod element;
|
||||||
pub mod event;
|
pub mod event;
|
||||||
pub mod input;
|
pub mod input;
|
||||||
|
|
Loading…
Reference in a new issue