mirror of
https://github.com/griffi-gh/hUI.git
synced 2024-11-25 08:28:42 -06:00
restructure stuff, add builtin_container
feature
This commit is contained in:
parent
250e821396
commit
e9cfd19c01
|
@ -29,8 +29,10 @@ document-features = "0.2"
|
|||
default = ["builtin_elements", "builtin_font", "pixel_perfect"]
|
||||
## Enable the built-in font (ProggyTiny, adds 35kb to the executable)
|
||||
builtin_font = []
|
||||
## Enable the built-in elements (`Container`, `ProgressBar`, etc.)
|
||||
builtin_elements = []
|
||||
## Enable the built-in elements (`Container`, `ProgressBar`, etc.)\
|
||||
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)
|
||||
pixel_perfect = []
|
||||
|
||||
|
|
|
@ -7,16 +7,7 @@ use crate::{
|
|||
LayoutInfo
|
||||
};
|
||||
|
||||
#[cfg(feature = "builtin_elements")]
|
||||
mod builtin {
|
||||
pub mod rect;
|
||||
pub mod container;
|
||||
pub mod spacer;
|
||||
pub mod progress_bar;
|
||||
pub mod text;
|
||||
}
|
||||
|
||||
#[cfg(feature = "builtin_elements")]
|
||||
mod builtin;
|
||||
pub use builtin::*;
|
||||
|
||||
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