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
(enabled by default) — Enable the built-inContainer
elementel_frame_view
(enabled by default) — Enable the built-inFrameView
elementel_spacer
(enabled by default) — Enable the built-inSpacer
elementel_br
(enabled by default) — Enable the built-inBreak
elementel_text
(enabled by default) — Enable the built-inText
elementel_image
(enabled by default) — Enable the built-inImage
elementel_progress_bar
(enabled by default) — Enable the built-inProgressBar
elementel_slider
(enabled by default) — Enable the built-inSlider
elementel_transformer
(enabled by default) — Enable the built-inTransformer
elementel_interactable
(enabled by default) — Enable the built-inInteractable
element
Modules§
- color
- various predefined color constants and helper functions
- draw
- draw commands, tesselation and UI rendering.
- element
- element API and built-in elements like
Container
,Button
,Text
, etc. - event
- input, window events and event handling
- frame
- modular procedural background system
- input
- keyboard, mouse, and touch input handling
- layout
- element layout, alignment and sizing
- measure
- element measurement, hints and responses
- rect
- contains types which represent the sides and corners of a rectangular shape.
- signal
- signal handling for UI events
- state
- state managment for stateful elements
- text
- text rendering, styling, measuring
Macros§
- rect_
frame - Helper macro for constructing a
RectFrame
- size
- Constructs a
Size
orSize2d
from a literal or expression
Structs§
- UiInstance
- The main instance of the UI system.