An immediate mode VR GUI library for LÖVR
How to use:
- Put the ui folder inside your project and do
UI = require "ui/ui"
- Initialize the library by calling
UI.Init()
onlovr.load()
- Handle controller input by calling
UI.InputInfo()
onlovr.update()
- Everything inside
NewFrame()
/RenderFrame()
is your GUI
Input:
- Change the dominant hand by pushing the corresponding trigger button.
- Scroll in ListBox with the Y-axis of the analog stick.
- Text entry is done by an on-screen keyboard (appears when a TextBox has focus)
Widgets:
- Button
- ImageButton
- TextBox
- ListBox
- SliderInt
- SliderFloat
- Label
- CheckBox
- RadioButton
General Info:
UI.Begin()
/UI.End()
defines a window. Widget function calls placed inside this block, are then part of this window.
lovr-ui currently uses a row-based auto-layout. That means that there are limits to how widgets are positioned.
Widget sizes are mostly character-width based. This is done for simplicity.
This library borrows concepts from the outstanding Dear ImGui library