Some updates

This commit is contained in:
Robert Jelic
2022-08-28 20:25:42 +02:00
parent 4d614372a1
commit 18601d54f7
11 changed files with 141 additions and 8 deletions

View File

@@ -1,8 +1,8 @@
## setPosition
Changes the position relative to its parent frame
#### Parameters:
1. `number` x coordinate
2. `number` y coordinate
1. `number|string` x coordinate as number or dynamicvalue as string
2. `number|string` y coordinate as number or dynamicvalue as string
3. `boolean` Whether it will add/remove to the current coordinates instead of setting them
#### Returns:
@@ -16,4 +16,13 @@ mainFrame:addButton():setPosition(2,3)
```
```xml
<button x="2" y="3" />
```
if you prefer to use dynamic values:
```lua
local mainFrame = basalt.createFrame()
mainFrame:addButton():setPosition("parent.w * 0.5", 23)
```
```xml
<button x="parent.w * 0.5" y="3" />
```