Skip to main content

Draggable

A draggable is a renderless component that can be dragged around, moving its children components with it.

Example

var draggable = new Draggable(0, 0, 100, 100);

var dragged_button = new UiButton(0, 0, 100, 100, draggable);
with (dragged_button.state) {
text = "Drag me!";
}

State reference

VariableDescriptionTypeDefault
statusCurrent status of the draggableRealui_enum_draggable_status.idle
axisAxis the draggable can move alongRealui_enum_draggable_axis.both
boundsBy default, the component will be draggable within the parent, otherwise you can specify a Struct containing the "left", "right", "up" and "down" variables, that indicates the drag area limitsStruct
click_buttonWhich button to check for the clickRealmb_left

Enums

EnumValues
ui_enum_draggable_statusidle/hover/dragging
ui_enum_draggable_axisboth/x/y