Package-level declarations

Types

Link copied to clipboard
open class Block @JvmOverloads constructor(children: Drawable?, at: Vec2? = null, size: Vec2? = null, val alignment: Align = AlignDefault, visibleSize: Vec2? = null, val focusable: Boolean = false, color: PolyColor? = null, var radii: FloatArray = 8f.radii()) : Drawable
Link copied to clipboard
class Group(children: Drawable?, at: Vec2? = null, val alignment: Align = AlignDefault, size: Vec2? = null, visibleSize: Vec2? = null) : Drawable

A drawable that contains other drawables, and does not render anything itself.

Link copied to clipboard
open class Image(image: PolyImage, at: Vec2? = null, size: Vec2? = null, var radii: FloatArray = 0f.radii(), var backgroundColor: PolyColor? = null, val alignment: Align = AlignDefault, children: Drawable?) : Block
Link copied to clipboard
class Spacer(at: Vec2? = null, size: Vec2) : Drawable
Link copied to clipboard
open class Text(text: Translator.Text, font: Font? = null, fontSize: Float = 12.0f, at: Vec2? = null, val alignment: Align = AlignDefault, wrap: Float = 0.0f, visibleSize: Vec2? = null, val focusable: Boolean = false, children: Drawable?) : Drawable
Link copied to clipboard
open class TextInput(text: String = "", placeholder: String = "polyui.textinput.placeholder", font: Font? = null, fontSize: Float = 12.0f, at: Vec2? = null, val alignment: Align = AlignDefault, visibleSize: Vec2? = null, wrap: Float = 0.0f, children: Drawable?) : Text

Functions

Link copied to clipboard
fun BoxedTextInput(image: PolyImage? = null, pre: String? = null, placeholder: String = "polyui.textinput.placeholder", initialValue: String = "", size: Vec2? = null): Drawable
fun BoxedTextInput(image: PolyImage? = null, pre: String? = null, placeholder: String = "polyui.textinput.placeholder", initialValue: String = "", post: String, size: Vec2? = null): Drawable
Link copied to clipboard
fun Button(leftImage: PolyImage? = null, text: String? = null, rightImage: PolyImage? = null, fontSize: Float = 12.0f, font: Font? = null, radii: FloatArray = 8f.radii(), padding: Vec2 = Vec2(12f, 6f), at: Vec2? = null, size: Vec2? = null): Block
Link copied to clipboard
fun Checkbox(at: Vec2? = null, size: Float, state: Boolean = false): Drawable
Link copied to clipboard
fun ColorPicker(color: Ref.ObjectRef<PolyColor.Mutable>, faves: MutableList<PolyColor>, recents: MutableList<PolyColor>, polyUI: PolyUI?, openNow: Boolean = true, position: Point = Point.At): Block
Link copied to clipboard
fun Dropdown(vararg entries: Pair<PolyImage?, String>, at: Vec2? = null, fontSize: Float = 12.0f, initial: Int = 0, padding: Float = 12.0f): Block

fun Dropdown(vararg entries: String, at: Vec2? = null, fontSize: Float = 12.0f, initial: Int = 0, padding: Float = 12.0f): Block

For images, use Image to "string" for each entry.

Link copied to clipboard
fun PopupMenu(vararg children: Drawable, size: Vec2? = null, align: Align = AlignDefault, polyUI: PolyUI?, openNow: Boolean = true, position: Point = Point.At): Block

Spawn a menu at the mouse position.

Link copied to clipboard
fun Radiobutton(vararg entries: Pair<PolyImage?, String?>, at: Vec2? = null, initial: Int = 0, fontSize: Float = 12.0f, optionLateralPadding: Float = 6.0f, optionVerticalPadding: Float = 6.0f): Block

For just strings, use "string" for each entry.

fun Radiobutton(vararg entries: String, at: Vec2? = null, initial: Int = 0, fontSize: Float = 12.0f, optionLateralPadding: Float = 6.0f, optionVerticalPadding: Float = 6.0f): Block

For images, use Image for each entry.

fun Radiobutton(vararg entries: PolyImage, at: Vec2? = null, initial: Int = 0, fontSize: Float = 12.0f, optionLateralPadding: Float = 6.0f, optionVerticalPadding: Float = 6.0f): Block

For strings, use "string" for each entry.

Link copied to clipboard
fun Slider(at: Vec2? = null, min: Float = 0.0f, max: Float = 100.0f, initialValue: Float = 0.0f, ptrSize: Float = 24.0f, scaleFactor: Float = 2.0f, floating: Boolean = true, instant: Boolean = false): Drawable

Note that slider change events cannot be cancelled.

Link copied to clipboard
fun Switch(at: Vec2? = null, size: Float, padding: Float = 3.0f, state: Boolean = false, lateralStretch: Float = 1.8f): Block