Cargo Features
[dependencies]
hui = { version = "0.1.0-alpha.5", default-features = false, features = ["derive", "image", "builtin_font", "pixel_perfect", "pixel_perfect_text", "el_all", "el_container", "el_frame_view", "el_spacer", "el_br", "el_text", "el_image", "el_progress_bar", "el_slider", "el_transformer", "el_interactable"] }
- default = builtin_font, derive, el_all, image, pixel_perfect_text
-
These default features are set whenever
hui
is added without
somewhere in the dependency tree.default-features = false - derive default
-
Enable derive macros
Enables hui-derive
- image default
-
Enable image loading support using the
image
crateEnables image
- builtin_font default
-
Enable the built-in font (ProggyTiny, adds *35kb* to the executable)
Affects
font::BUILTIN_FONT
… - pixel_perfect = pixel_perfect_text
-
Pixel-perfect rendering:
Round all vertex positions to nearest integer coordinates (not recommended)
- pixel_perfect_text default pixel_perfect?
-
Apply pixel-perfect rendering hack to text (fixes blurry text rendering)
- el_all default = el_br, el_container, el_frame_view, el_image, el_interactable, el_progress_bar, el_slider, el_spacer, el_text, el_transformer
-
Make sure to disable both features if you are not rendering UI "as-is" at 1:1 scale
For exmaple, you should disable them if using DPI (or any other form of) scaling while passing the virtual resolution to the ui or rendering it in 3d spaceBuilt-in elements:
Enable all built-in elements
- el_container el_all
-
Enable the built-in
Container
elementAffects
builtin::container
… - el_frame_view el_all
-
Enable the built-in
FrameView
elementAffects
builtin::frame_view
… - el_spacer el_all
-
Enable the built-in
Spacer
elementAffects
builtin::spacer
… - el_br el_all
-
Enable the built-in
Break
elementAffects
builtin::br
… - el_text el_all
-
Enable the built-in
Text
elementAffects
builtin::text
… - el_image el_all
-
Enable the built-in
Image
elementAffects
builtin::image
… - el_progress_bar el_all
-
Enable the built-in
ProgressBar
elementAffects
builtin::progress_bar
… - el_slider el_all
-
Enable the built-in
Slider
elementAffects
builtin::slider
… - el_transformer el_all
-
Enable the built-in
Transformer
elementAffects
builtin::transformer
… - el_interactable el_all
-
Enable the built-in
Interactable
elementAffects
builtin::interactable
…