API (python)#
Module Summary:
Omni::UI |
Module Details::
Omni::UI#
Omni::UI is Omniverse’s UI toolkit for creating beautiful and flexible graphical user interfaces in the Kit extensions. Omni::UI provides the basic types necessary to create rich extensions with a fluid and dynamic user interface in Omniverse Kit. It gives a layout system and includes widgets for creating visual components, receiving user input, and creating data models. It allows user interface components to be built around their behavior and enables a declarative flavor of describing the layout of the application. Omni::UI gives a very flexible styling system that allows deep customizing the final look of the application.
Typical Example#
Typical example to create a window with two buttons:
import omni.ui as ui
_window_example = ui.Window("Example Window", width=300, height=300)
with _window_example.frame:
with ui.VStack():
ui.Button("click me")
def move_me(window):
window.setPosition(200, 200)
def size_me(window):
window.width = 300
window.height = 300
ui.Button("Move to (200,200)", clicked_fn=lambda w=self._window_example: move_me(w))
ui.Button("Set size (300,300)", clicked_fn=lambda w=self._window_example: size_me(w))
Detailed Documentation#
Omni::UI is shipped with the developer documentation that is written with Omni::UI. For detailed documentation, please see omni.example.ui extension. It has detailed descriptions of all the classes, best practices, and real-world usage examples.
Layout#
Widgets#
- Base Widgets
- Model-View Fields
omni.ui.MultiField
- Model-View Drags and Sliders
- Model-View ProgressBar
- Web
omni.ui.WebViewWidget