Expand description
Simple UI library for games and other interactive applications
§Features
derive
(enabled by default) — Enable derive macrosimage
(enabled by default) — Enable image loading support using theimage
cratebuiltin_font
(enabled by default) — Enable the built-in font (ProggyTiny, adds 35kb to the executable)
§Pixel-perfect rendering:
pixel_perfect
— Round all vertex positions to nearest integer coordinates (not recommended)pixel_perfect_text
(enabled by default) — Apply pixel-perfect rendering hack to text (fixes blurry text rendering)
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 space
§Built-in elements:
el_all
(enabled by default) — Enable all built-in elementsel_container
— Enable the built-inContainer
elementel_fill_rect
— Enable the built-inFillRect
elementel_spacer
— Enable the built-inSpacer
elementel_br
— Enable the built-inBreak
elementel_text
— Enable the built-inText
elementel_image
— Enable the built-inImage
elementel_progress_bar
— Enable the built-inProgressBar
elementel_slider
— Enable the built-inSlider
elementel_transformer
— Enable the built-inTransformer
elementel_interactable
— Enable the built-inInteractable
element
Modules§
- various predefined color constants and helper functions
- draw commands, tesselation and UI rendering.
- element API and built-in elements like
Container
,Button
,Text
, etc. - input, window events and event handling
- modular procedural background system
- keyboard, mouse, and touch input handling
- element layout, alignment and sizing
- element measurement, hints and responses
- contains types which represent the sides and corners of a rectangular shape.
- signal handling for UI events
- state managment for stateful elements
- text rendering, styling, measuring
Macros§
- Helper macro for constructing a
FrameRect
- Constructs a
Size
orSize2d
from a literal or expression
Structs§
- The main instance of the UI system.