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 theimagecratebuiltin_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-inContainerelementel_frame_view(enabled by default) — Enable the built-inFrameViewelementel_spacer(enabled by default) — Enable the built-inSpacerelementel_br(enabled by default) — Enable the built-inBreakelementel_text(enabled by default) — Enable the built-inTextelementel_image(enabled by default) — Enable the built-inImageelementel_progress_bar(enabled by default) — Enable the built-inProgressBarelementel_slider(enabled by default) — Enable the built-inSliderelementel_transformer(enabled by default) — Enable the built-inTransformerelementel_interactable(enabled by default) — Enable the built-inInteractableelement
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
SizeorSize2dfrom a literal or expression
Structs§
- UiInstance
- The main instance of the UI system.