Updated some formatting

Updated formatting for object
This commit is contained in:
Robert Jelic
2022-10-20 21:05:29 +02:00
parent 4352d36831
commit ab72f244ed
42 changed files with 381 additions and 122 deletions

View File

@@ -0,0 +1,22 @@
# Object - Event
## onReposition
`onReposition(self)`
This is a custom event which gets triggered as soon as the object gets repositioned (for example by dynamic value).
Here is a example on how to add a onReposition event to your button:
```lua
local basalt = require("basalt")
local main = basalt.createFrame()
local aButton = main:addButton():setPosition(3,3)
local function onButtonReposition(self)
self:setSize(self:getWidth() - self:getX(), 3)
end
aButton:onReposition(onButtonReposition)
```