mirror of
https://github.com/griffi-gh/hUI.git
synced 2024-11-26 00:48:44 -06:00
restructure stuff, add builtin_container
feature
This commit is contained in:
parent
91e8b44dd5
commit
f4a747c505
|
@ -29,8 +29,10 @@ document-features = "0.2"
|
||||||
default = ["builtin_elements", "builtin_font", "pixel_perfect"]
|
default = ["builtin_elements", "builtin_font", "pixel_perfect"]
|
||||||
## Enable the built-in font (ProggyTiny, adds 35kb to the executable)
|
## Enable the built-in font (ProggyTiny, adds 35kb to the executable)
|
||||||
builtin_font = []
|
builtin_font = []
|
||||||
## Enable the built-in elements (`Container`, `ProgressBar`, etc.)
|
## Enable the built-in elements (`Container`, `ProgressBar`, etc.)\
|
||||||
builtin_elements = []
|
builtin_elements = ["builtin_container"]
|
||||||
|
## Enable only the `Container` component (which is essential for laying out other components)
|
||||||
|
builtin_container = []
|
||||||
## Round vertex positions to nearest integer coordinates (fixes blurry text)
|
## Round vertex positions to nearest integer coordinates (fixes blurry text)
|
||||||
pixel_perfect = []
|
pixel_perfect = []
|
||||||
|
|
||||||
|
|
|
@ -7,16 +7,7 @@ use crate::{
|
||||||
LayoutInfo
|
LayoutInfo
|
||||||
};
|
};
|
||||||
|
|
||||||
#[cfg(feature = "builtin_elements")]
|
mod builtin;
|
||||||
mod builtin {
|
|
||||||
pub mod rect;
|
|
||||||
pub mod container;
|
|
||||||
pub mod spacer;
|
|
||||||
pub mod progress_bar;
|
|
||||||
pub mod text;
|
|
||||||
}
|
|
||||||
|
|
||||||
#[cfg(feature = "builtin_elements")]
|
|
||||||
pub use builtin::*;
|
pub use builtin::*;
|
||||||
|
|
||||||
pub struct MeasureContext<'a> {
|
pub struct MeasureContext<'a> {
|
||||||
|
|
14
hui/src/element/builtin.rs
Normal file
14
hui/src/element/builtin.rs
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
#[cfg(feature = "builtin_container")]
|
||||||
|
pub mod container;
|
||||||
|
|
||||||
|
#[cfg(feature = "builtin_elements")]
|
||||||
|
pub mod rect;
|
||||||
|
|
||||||
|
#[cfg(feature = "builtin_elements")]
|
||||||
|
pub mod spacer;
|
||||||
|
|
||||||
|
#[cfg(feature = "builtin_elements")]
|
||||||
|
pub mod progress_bar;
|
||||||
|
|
||||||
|
#[cfg(feature = "builtin_elements")]
|
||||||
|
pub mod text;
|
Loading…
Reference in a new issue