Package-level declarations

Types

Link copied to clipboard
open class GUI(val appearance: GUIAppearance = GUIAppearance(), val defaultStyles: List<StyleSheet> = defaultStyles(), val bindings: ParameterBindings = ParameterBindings()) : Extension

A GUI with controls for the parameters of objects, see orx-parameters. The parameters are bound by bindings, which can be shared with other code, like remote controls; objects added to it directly are shown too.

Link copied to clipboard
class GUIAppearance(val baseColor: ColorRGBa = ColorRGBa.GRAY.opacify(0.99), val barWidth: Int = 200)
Link copied to clipboard
class GUIEvent
Link copied to clipboard
typealias GUILayout = GUILayoutScope.() -> Unit

Builds the element tree of a GUI. The layout arranges the building blocks offered by GUILayoutScope inside GUILayoutScope.body, with containers created using the regular div {} builder. A layout must call GUILayoutScope.sidebar exactly once, as the sidebar holds the compartments of the GUI.

Link copied to clipboard

The scope in which a GUILayout builds the element tree of gui.

Link copied to clipboard
open class MiniGUI(appearance: GUIAppearance = GUIAppearance(), defaultStyles: List<StyleSheet> = defaultStyles(), controlWidth: Int = 150) : GUI

A compact version of GUI that shows a single horizontal bar at the bottom of the screen. A dropdown on the left selects the compartment to show, the controls of that compartment are laid out horizontally next to it, followed by the toolbar when showToolbar is set. When the controls do not fit, they scroll horizontally, with the wheel, a trackpad or the scrollbar, which shows while scrolling and fades out after it.

Link copied to clipboard
class WindowedGUI(val appearance: GUIAppearance = GUIAppearance(), val defaultStyles: List<StyleSheet> = defaultStyles(), val windowClosable: Boolean = false, val windowAlwaysOntop: Boolean = false, val windowResizable: Boolean = false) : Extension

Properties

Link copied to clipboard

The default layout: a column holding the toolbar (when GUI.showToolbar is set), the collapse border and the sidebar, followed by the side canvas when GUI.enableSideCanvas is set.

Link copied to clipboard

The styles of the elements of a GUI, as CSS, in addition to the default control styles. The colors and sizes are the custom properties of the theme, see guiThemeCss.

Link copied to clipboard

The layout of MiniGUI: an empty area that takes up the screen above a horizontal bar holding the compartment selector, the compartments and the toolbar.

Link copied to clipboard

The styles of miniGUILayout, as CSS. The compartments are laid out as rows of controls of --mini-control-width; the colors are those of the theme of the GUI, see guiThemeCss.

Functions

Link copied to clipboard
@JvmName(name = "addToGui")
fun <T : Any> T.addTo(gui: GUI, label: String? = this.title()): T
@JvmName(name = "addToWindowedGui")
fun <T : Any> T.addTo(gui: WindowedGUI, label: String? = this.title()): T
Link copied to clipboard
fun guiStyles(appearance: GUIAppearance = GUIAppearance()): List<StyleSheet>

The style sheets for the elements of a GUI, in addition to the default control styles: the theme of appearance, see guiThemeCss, and the style sheets of guiStylesCss. Custom style sheets can be appended to (or replace) the list, see GUI.styles.

Link copied to clipboard
fun guiThemeCss(appearance: GUIAppearance = GUIAppearance()): String

The theme of the GUI, the custom properties that guiStylesCss and miniGUIStylesCss use, as declarations for :root: the base color of the bars and their shades, and the width of the bar. Override them in a later style sheet, like :root { --gui-base: #223 }.

Link copied to clipboard
fun miniGUIStyles(appearance: GUIAppearance = GUIAppearance(), controlWidth: Int = 150): List<StyleSheet>

The style sheets for miniGUILayout: the theme of appearance, see guiThemeCss, with controls of controlWidth pixels, and the style sheets of miniGUIStylesCss.