Show raw api
{
"functions": [
{
"name": "new",
"desc": "Construst a new drag model for the button",
"params": [
{
"name": "initialButton",
"desc": "Optional",
"lua_type": "GuiButton?"
}
],
"returns": [
{
"desc": "",
"lua_type": "ButtonDragModel"
}
],
"function_type": "static",
"source": {
"line": 26,
"path": "src/buttondragmodel/src/Client/ButtonDragModel.lua"
}
},
{
"name": "IsPressed",
"desc": "Returns true if pressed",
"params": [],
"returns": [
{
"desc": "",
"lua_type": "boolean"
}
],
"function_type": "method",
"source": {
"line": 70,
"path": "src/buttondragmodel/src/Client/ButtonDragModel.lua"
}
},
{
"name": "ObserveIsPressed",
"desc": "Observes if anything is pressing down on the button itself",
"params": [],
"returns": [
{
"desc": "",
"lua_type": "Observable<boolean>"
}
],
"function_type": "method",
"source": {
"line": 79,
"path": "src/buttondragmodel/src/Client/ButtonDragModel.lua"
}
},
{
"name": "ObserveIsPressedBrio",
"desc": "",
"params": [],
"returns": [
{
"desc": "",
"lua_type": "Observable<Brio<true>>"
}
],
"function_type": "method",
"source": {
"line": 86,
"path": "src/buttondragmodel/src/Client/ButtonDragModel.lua"
}
},
{
"name": "ObserveDragDelta",
"desc": "",
"params": [],
"returns": [
{
"desc": "",
"lua_type": "Observable<Vector2 | nil>"
}
],
"function_type": "method",
"source": {
"line": 95,
"path": "src/buttondragmodel/src/Client/ButtonDragModel.lua"
}
},
{
"name": "GetDragDelta",
"desc": "",
"params": [],
"returns": [
{
"desc": "",
"lua_type": "Vector2 | nil"
}
],
"function_type": "method",
"source": {
"line": 102,
"path": "src/buttondragmodel/src/Client/ButtonDragModel.lua"
}
},
{
"name": "GetDragPosition",
"desc": "Returns the scale position on the Gui from 0 to 1\n\nThis is reletive to the GUI, so top left is 0, 0",
"params": [],
"returns": [
{
"desc": "",
"lua_type": "Vector2 | nil"
}
],
"function_type": "method",
"source": {
"line": 113,
"path": "src/buttondragmodel/src/Client/ButtonDragModel.lua"
}
},
{
"name": "ObserveDragPosition",
"desc": "Observes the scale position on the Gui from 0 to 1\n\nThis is reletive to the GUI, so top left is 0, 0",
"params": [],
"returns": [
{
"desc": "",
"lua_type": "Observable<Vector2 | nil>"
}
],
"function_type": "method",
"source": {
"line": 124,
"path": "src/buttondragmodel/src/Client/ButtonDragModel.lua"
}
},
{
"name": "SetClampWithinButton",
"desc": "Sets whether to clamp the results within the button bounds",
"params": [
{
"name": "clampWithinButton",
"desc": "",
"lua_type": "boolean"
}
],
"returns": [],
"function_type": "method",
"source": {
"line": 132,
"path": "src/buttondragmodel/src/Client/ButtonDragModel.lua"
}
},
{
"name": "SetButton",
"desc": "Sets the current button for the model",
"params": [
{
"name": "button",
"desc": "",
"lua_type": "GuiButton"
}
],
"returns": [
{
"desc": "Cleanup function",
"lua_type": "() -> ()"
}
],
"function_type": "method",
"source": {
"line": 142,
"path": "src/buttondragmodel/src/Client/ButtonDragModel.lua"
}
}
],
"properties": [],
"types": [],
"name": "ButtonDragModel",
"desc": "Computes the position of a user dragging a button around",
"source": {
"line": 6,
"path": "src/buttondragmodel/src/Client/ButtonDragModel.lua"
}
}