diff --git a/docs/objects/Object/disable.md b/docs/objects/Object/disable.md
index 6c97de3..b7946f0 100644
--- a/docs/objects/Object/disable.md
+++ b/docs/objects/Object/disable.md
@@ -1,4 +1,7 @@
+# Object
+
## disable
+
Disables the object's event listeners
-This will disable the object. Which means it doesn't listen to any events anymore.
\ No newline at end of file
+This will disable the object. Which means it doesn't listen to any events anymore.
diff --git a/docs/objects/Object/enable.md b/docs/objects/Object/enable.md
index f277cb8..17c5824 100644
--- a/docs/objects/Object/enable.md
+++ b/docs/objects/Object/enable.md
@@ -1,4 +1,7 @@
+# Object
+
## enable
+
Enables the object's event listeners
-If the object's is disabled, it will stop listening to incoming events, this will reenable it.
\ No newline at end of file
+If the object's is disabled, it will stop listening to incoming events, this will reenable it.
diff --git a/docs/objects/Object/getAbsolutePosition.md b/docs/objects/Object/getAbsolutePosition.md
index aa89388..6874e60 100644
--- a/docs/objects/Object/getAbsolutePosition.md
+++ b/docs/objects/Object/getAbsolutePosition.md
@@ -1,16 +1,24 @@
+# Object
+
## getAbsolutePosition
+
Converts the relative coordinates into absolute coordinates
-#### Parameters:
+
+### Parameters
+
1. `number|nil` x
2. `number|nil` y
-#### Returns:
+### Returns
+
1. `object` The object in use
-#### Usage:
+### Usage
+
* Creates a frame and a button and prints the button's absolute position to the debug console
+
```lua
local mainFrame = basalt.createFrame():setPosition(3,3)
local aButton = mainFrame:addButton():setSize(8,1):setPosition(4,2)
basalt.debug(aButton:getAbsolutePosition()) -- returns 7,5 (frame coords + own coords) instead of 4,2
-```
\ No newline at end of file
+```
diff --git a/docs/objects/Object/getAnchorPosition.md b/docs/objects/Object/getAnchorPosition.md
index e335b71..cb275b2 100644
--- a/docs/objects/Object/getAnchorPosition.md
+++ b/docs/objects/Object/getAnchorPosition.md
@@ -1,16 +1,23 @@
+# Object
+
## getAnchorPosition
+
Converts the x and y coordinates into the anchor coordinates of the object
-#### Parameters:
+### Parameters
+
1. `number|nil` x
2. `number|nil` y, if nothing it uses the object's x, y
-#### Returns:
+#### Returns
+
1. `number` x
2. `number` y
-#### Usage:
+#### Usage
+
* Prints the anchor position to the debug console
+
```lua
local mainFrame = basalt.createFrame():setSize(15,15)
local aButton = mainFrame:addButton()
@@ -18,4 +25,4 @@ local aButton = mainFrame:addButton()
:setSize(8,1)
:setPosition(1,1)
basalt.debug(aButton:getAnchorPosition()) -- returns 7,14 (framesize - own size) instead of 1,1
-```
\ No newline at end of file
+```
diff --git a/docs/objects/Object/getBackground.md b/docs/objects/Object/getBackground.md
index 25015f0..4393af5 100644
--- a/docs/objects/Object/getBackground.md
+++ b/docs/objects/Object/getBackground.md
@@ -1,5 +1,9 @@
+# Object
+
## getBackground
+
Returns the current background color
-#### Returns:
+### Returns
+
1. `number` color
diff --git a/docs/objects/Object/getForeground.md b/docs/objects/Object/getForeground.md
index 6692aa8..b459fde 100644
--- a/docs/objects/Object/getForeground.md
+++ b/docs/objects/Object/getForeground.md
@@ -1,5 +1,9 @@
+# Object
+
## getForeground
+
Returns the current foreground color
-#### Returns:
+### Returns
+
1. `number` color
diff --git a/docs/objects/Object/getName.md b/docs/objects/Object/getName.md
index 7866617..0875c80 100644
--- a/docs/objects/Object/getName.md
+++ b/docs/objects/Object/getName.md
@@ -1,11 +1,17 @@
+# Object
+
## getName
+
Returns the given name of the object
-#### Returns:
+### Returns
+
1. `string` name
-#### Usage:
+#### Usage
+
* Prints name of object to debug window
+
```lua
local main = basalt.createFrame()
basalt.debug(main:getName()) -- returns the uuid
@@ -14,4 +20,4 @@ basalt.debug(main:getName()) -- returns the uuid
```lua
local main = basalt.createFrame("myFirstMainFrame")
basalt.debug(main:getName()) -- returns myFirstMainFrame
-```
\ No newline at end of file
+```
diff --git a/docs/objects/Object/getPosition.md b/docs/objects/Object/getPosition.md
index b4e35e5..1d7ea27 100644
--- a/docs/objects/Object/getPosition.md
+++ b/docs/objects/Object/getPosition.md
@@ -1,6 +1,10 @@
+# Object
+
## getPosition
+
Returns the object's position
-#### Returns:
+### Returns
+
1. `number` x
2. `number` y
diff --git a/docs/objects/Object/getSize.md b/docs/objects/Object/getSize.md
index 70ca747..4421d3a 100644
--- a/docs/objects/Object/getSize.md
+++ b/docs/objects/Object/getSize.md
@@ -1,6 +1,10 @@
+# Object
+
## getSize
+
Returns the object's size
-#### Returns:
+### Returns
+
1. `number` w
2. `number` h
diff --git a/docs/objects/Object/getValue.md b/docs/objects/Object/getValue.md
index 11eab7b..ce273e9 100644
--- a/docs/objects/Object/getValue.md
+++ b/docs/objects/Object/getValue.md
@@ -1,12 +1,19 @@
+# Object
+
## getValue
+
Returns the currently saved value
-#### Returns:
+
+### Returns
+
1. `any` Object's value
-#### Usage:
+### Usage
+
* Prints the value of the checkbox to the debug console
+
```lua
local mainFrame = basalt.createFrame()
local aCheckbox = mainFrame:addCheckbox():setValue(true)
basalt.debug(aCheckbox:getValue()) -- returns true
-```
\ No newline at end of file
+```
diff --git a/docs/objects/Object/hide.md b/docs/objects/Object/hide.md
index 5f12ef1..7b271dd 100644
--- a/docs/objects/Object/hide.md
+++ b/docs/objects/Object/hide.md
@@ -1,15 +1,22 @@
+# Object
+
## hide
+
Hides the object
-#### Returns:
+### Returns
+
1. `object` The object in use
-#### Usage:
+#### Usage
+
* Hides a frame
+
```lua
local mainFrame = basalt.createFrame()
local button = mainFrame:addButton():setText("Close"):onClick(function() mainFrame:hide() end)
```
+
```xml
-```
\ No newline at end of file
+```
diff --git a/docs/objects/Object/isFocused.md b/docs/objects/Object/isFocused.md
index 63fa335..1957179 100644
--- a/docs/objects/Object/isFocused.md
+++ b/docs/objects/Object/isFocused.md
@@ -1,13 +1,19 @@
+# Object
+
## isFocused
+
Returns if the object is currently the focused object of the parent frame
-#### Returns:
+### Returns
+
1. `boolean` Whether the object is focused
-#### Usage:
+#### Usage
+
* Prints whether the button is focused to the debug console
+
```lua
local mainFrame = basalt.createFrame()
local aButton = mainFrame:addButton()
basalt.debug(aButton:isFocused()) -- shows true or false as a debug message
-```
\ No newline at end of file
+```
diff --git a/docs/objects/Object/isVisible.md b/docs/objects/Object/isVisible.md
index e825383..bf7a979 100644
--- a/docs/objects/Object/isVisible.md
+++ b/docs/objects/Object/isVisible.md
@@ -1,12 +1,19 @@
+# Object
+
## isVisible
+
Returns if the object is currently visible
-#### Returns:
+
+### Returns
+
1. `boolean`
-#### Usage:
+#### Usage
+
* Prints boolean visibility of object to debug console
+
```lua
local mainFrame = basalt.createFrame()
local aButton = mainFrame:addButton():setSize(5,8)
basalt.debug(aButton:isVisible()) -- returns true
-```
\ No newline at end of file
+```
diff --git a/docs/objects/Object/onChange.md b/docs/objects/Object/onChange.md
index 0b7e788..0bfa518 100644
--- a/docs/objects/Object/onChange.md
+++ b/docs/objects/Object/onChange.md
@@ -1,5 +1,9 @@
-# onChange
-`onChange(self)`
+# Object - Event
+
+## onChange
+
+`onChange(self)`
+
This is a custom event which gets triggered as soon as the function :setValue() is called. This function is also called by basalt, for example if you change the input, textfield or checkbox (or all the different types of lists) objects.
Here is a example on how to add a onChange event to your input, and also another example for your checkbox:
@@ -25,4 +29,4 @@ end
aInput:onChange(checkInput)
aCheckbox:onChange(checkCheckbox)
-```
\ No newline at end of file
+```
diff --git a/docs/objects/Object/onChar.md b/docs/objects/Object/onChar.md
index 3cb4402..24f1658 100644
--- a/docs/objects/Object/onChar.md
+++ b/docs/objects/Object/onChar.md
@@ -1,6 +1,9 @@
-# onChar
+# Object - Event
+
+## onChar
+
+`onChar(self, event, char)`
-`onChar(self, event, char)`
The computercraft event which triggers this method is `char`.
The char event always happens after the key event (just like in cc:tweaked)
diff --git a/docs/objects/Object/onClick.md b/docs/objects/Object/onClick.md
index 31f1d4d..b16f7be 100644
--- a/docs/objects/Object/onClick.md
+++ b/docs/objects/Object/onClick.md
@@ -1,5 +1,7 @@
# onClick
-`onClick(self, event, button, x, y)`
+
+`onClick(self, event, button, x, y)`
+
The computercraft event which triggers this method is `mouse_click` and `monitor_touch`.
Here is a example on how to add a onClick event to your button:
@@ -20,6 +22,7 @@ button:onClick(buttonOnClick)
```
Here is also a example on how you could create double clicks:
+
```lua
local basalt = require("basalt")
local doubleClickMaxTime = 0.25 -- in seconds
@@ -44,4 +47,4 @@ end
createDoubleClick(button, debugSomething) -- this is how you will create a double click.
basalt.autoUpdate()
-```
\ No newline at end of file
+```
diff --git a/docs/objects/Object/onClickUp.md b/docs/objects/Object/onClickUp.md
index 8067182..f8ca94d 100644
--- a/docs/objects/Object/onClickUp.md
+++ b/docs/objects/Object/onClickUp.md
@@ -1,5 +1,9 @@
-# onClickUp
-`onClickUp(self, event, button, x, y)`
+# Object - Event
+
+## onClickUp
+
+`onClickUp(self, event, button, x, y)`
+
The computercraft event which triggers this method is `mouse_up`.
Here is a example on how to add a onClickUp event to your button:
@@ -22,4 +26,4 @@ function buttonOnRelease(self, button, x, y)
basalt.debug("Button got released!")
end
button:onClickUp(buttonOnRelease)
-```
\ No newline at end of file
+```
diff --git a/docs/objects/Object/onDrag.md b/docs/objects/Object/onDrag.md
index 50ef931..69a5a0d 100644
--- a/docs/objects/Object/onDrag.md
+++ b/docs/objects/Object/onDrag.md
@@ -1,8 +1,13 @@
-# onDrag
-`onDrag(self, event, button, x, y, xOffset, yOffset)`
+# Object - Event
+
+## onDrag
+
+`onDrag(self, event, button, x, y, xOffset, yOffset)`
+
The computercraft event which triggers this method is `mouse_drag`.
This is a example on how you would create a movable button:
+
```lua
local basalt = require("basalt")
@@ -21,6 +26,7 @@ basalt.autoUpdate()
```
Another example on how you could change the frame's offset by dragging around.
+
```lua
local basalt = require("basalt")
@@ -43,6 +49,7 @@ basalt.autoUpdate()
```
Also very interesting is a button where you are able to resize the frame just by dragging the button.
+
```lua
local basalt = require("basalt")
@@ -57,7 +64,7 @@ local dragButton = sub:addButton()
:setSize(1,1)
:setText("/")
:onDrag(function(self, button, x, y, xOffset, yOffset)
- sub:setSize(-xOffset, -yOffset, true)
+ sub:setSize(-xOffset, -yOffset, true)
end)
basalt.autoUpdate()
diff --git a/docs/objects/Object/onEvent.md b/docs/objects/Object/onEvent.md
index e863bf4..af3d30c 100644
--- a/docs/objects/Object/onEvent.md
+++ b/docs/objects/Object/onEvent.md
@@ -1,4 +1,6 @@
-# onEvent
+# Object - Event
+
+## onEvent
`onEvent(self, event, ...)`
@@ -17,4 +19,4 @@ main:onEvent(function(event, side, channel, replyChannel, message, distance)
basalt.debug("Mesage received: "..tostring(message))
end
end)
-```
\ No newline at end of file
+```
diff --git a/docs/objects/Object/onGetFocus.md b/docs/objects/Object/onGetFocus.md
index 10d21a0..e34471c 100644
--- a/docs/objects/Object/onGetFocus.md
+++ b/docs/objects/Object/onGetFocus.md
@@ -1,5 +1,9 @@
-# onGetFocus
-`onGetFocus(self)`
+# Object - Event
+
+## onGetFocus
+
+`onGetFocus(self)`
+
This event gets triggered as soon as the object is the currently focused object.
```lua
diff --git a/docs/objects/Object/onHover.md b/docs/objects/Object/onHover.md
index c3bb2f3..716ba38 100644
--- a/docs/objects/Object/onHover.md
+++ b/docs/objects/Object/onHover.md
@@ -1,6 +1,9 @@
-# onHover
+# Object - Event
+
+## onHover
+
+`onHover(self, event, button, x, y)`
-`onHover(self, event, button, x, y)`
The computercraft event which triggers this method is `mouse_move` - only available in [CraftOS-PC](https://www.craftos-pc.cc).
Here is a example on how to add a onHover event to your button:
diff --git a/docs/objects/Object/onKey.md b/docs/objects/Object/onKey.md
index 8532061..287b3b3 100644
--- a/docs/objects/Object/onKey.md
+++ b/docs/objects/Object/onKey.md
@@ -1,5 +1,9 @@
-# onKey
-`onKey(self, event, key)`
+# Object - Event
+
+## onKey
+
+`onKey(self, event, key)`
+
The computercraft event which triggers this method is `key` and `char`.
Here is a example on how to add a onKey event to your frame:
@@ -19,4 +23,4 @@ function openSubFrame(self, event, key)
end
end
main:onKey(openSubFrame)
-```
\ No newline at end of file
+```
diff --git a/docs/objects/Object/onKeyUp.md b/docs/objects/Object/onKeyUp.md
index dce83db..11e7148 100644
--- a/docs/objects/Object/onKeyUp.md
+++ b/docs/objects/Object/onKeyUp.md
@@ -1,5 +1,9 @@
-# onKeyUp
-`onKeyUp(self, event, key)`
+# Object - Event
+
+## onKeyUp
+
+`onKeyUp(self, event, key)`
+
The computercraft event which triggers this method is `key_up`.
Here is a example on how to add a onKeyUp event to your frame:
@@ -18,4 +22,4 @@ function openSubFrame(self, event, key)
end
end
main:onKeyUp(openSubFrame)
-```
\ No newline at end of file
+```
diff --git a/docs/objects/Object/onLeave.md b/docs/objects/Object/onLeave.md
index 974af68..13075d7 100644
--- a/docs/objects/Object/onLeave.md
+++ b/docs/objects/Object/onLeave.md
@@ -1,6 +1,9 @@
-# onLeave
+# Object - Event
+
+## onLeave
+
+`onLeave(self, event, button, x, y)`
-`onLeave(self, event, button, x, y)`
The computercraft event which triggers this method is `mouse_move` - only available in [CraftOS-PC](https://www.craftos-pc.cc).
Here is a example on how to add a onLeave event to your button:
diff --git a/docs/objects/Object/onLoseFocus.md b/docs/objects/Object/onLoseFocus.md
index 1515620..eb1c0d2 100644
--- a/docs/objects/Object/onLoseFocus.md
+++ b/docs/objects/Object/onLoseFocus.md
@@ -1,5 +1,9 @@
-# onLoseFocus
-`onLoseFocus(self)`
+# Object - Event
+
+## onLoseFocus
+
+`onLoseFocus(self)`
+
This event gets triggered as soon as the object loses its focus.
```lua
@@ -13,4 +17,4 @@ local aButton = main:addButton()
basalt.debug("Please come back...")
end
)
-```
\ No newline at end of file
+```
diff --git a/docs/objects/Object/onRelease.md b/docs/objects/Object/onRelease.md
index d8c84e4..cd354cf 100644
--- a/docs/objects/Object/onRelease.md
+++ b/docs/objects/Object/onRelease.md
@@ -1,5 +1,9 @@
-# onRelease
-`onRelease(self, event, button, x, y)`
+# Object - Event
+
+## onRelease
+
+`onRelease(self, event, button, x, y)`
+
The computercraft event which triggers this method is `mouse_up`.
The difference between onRelease and :onClickUp is that :onRelease is called even when the mouse is no longer over the object, while :onClickUp is only called when the mouse is over the object.
@@ -24,4 +28,4 @@ function buttonOnRelease(self, button, x, y)
basalt.debug("Button got released!")
end
button:onRelease(buttonOnRelease)
-```
\ No newline at end of file
+```
diff --git a/docs/objects/Object/onReposition.md b/docs/objects/Object/onReposition.md
index e69de29..3bd7ec5 100644
--- a/docs/objects/Object/onReposition.md
+++ b/docs/objects/Object/onReposition.md
@@ -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)
+```
diff --git a/docs/objects/Object/onResize.md b/docs/objects/Object/onResize.md
index 08916c6..f858bd4 100644
--- a/docs/objects/Object/onResize.md
+++ b/docs/objects/Object/onResize.md
@@ -1,6 +1,9 @@
-# onResize
+# Object - Event
+
+## onResize
+
+`onResize(self)`
-`onResize(self)`
This is a custom event which gets triggered as soon as the parent frame gets resized.
Here is a example on how to add a onResize event to your button:
diff --git a/docs/objects/Object/onScroll.md b/docs/objects/Object/onScroll.md
index b2558f3..7d4b9bd 100644
--- a/docs/objects/Object/onScroll.md
+++ b/docs/objects/Object/onScroll.md
@@ -1,5 +1,9 @@
-# onScroll
-`onScroll(self, event, direction, x, y)`
+# Object - Event
+
+## onScroll
+
+`onScroll(self, event, direction, x, y)`
+
The computercraft event which triggers this method is `mouse_scroll`.
Here is a example on how to add a onScroll event to your button:
@@ -17,4 +21,4 @@ function buttonOnScroll(self, direction, x, y)
basalt.debug("Someone scrolls on me!")
end
button:onScroll(buttonOnScroll)
-```
\ No newline at end of file
+```
diff --git a/docs/objects/Object/remove.md b/docs/objects/Object/remove.md
index ebb2799..57c39c7 100644
--- a/docs/objects/Object/remove.md
+++ b/docs/objects/Object/remove.md
@@ -1,11 +1,15 @@
+# Object
+
## remove
+
Removes the object from it's parent frame. This won't 'destroy' the object, It will continue to exist as long as you still have pointers to it.
Here is a example on how a button will be fully removed from the memory:
+
```lua
local main = basalt.createFrame()
local button = main:addButton():setPosition(2,2):setText("Close")
button:remove()
button = nil
-```
\ No newline at end of file
+```
diff --git a/docs/objects/Object/setAnchor.md b/docs/objects/Object/setAnchor.md
index a8febad..4435d7c 100644
--- a/docs/objects/Object/setAnchor.md
+++ b/docs/objects/Object/setAnchor.md
@@ -1,14 +1,21 @@
+# Object
+
## setAnchor
+
Sets the anchor of the object
-#### Parameters:
+### Parameters
+
1. `string` Anchor sides `("topLeft" "top", "topRight", "right", "bottomRight", "bottom", "bottomLeft", "left", "center")`
-#### Returns:
+### Returns
+
1. `object` The object in use
-#### Usage:
+### Usage
+
* Sets the button to have an anchor of `bottomRight`
+
```lua
local mainFrame = basalt.createFrame():show()
local aButton = mainFrame:addButton()
@@ -16,6 +23,7 @@ local aButton = mainFrame:addButton()
:setSize(8,1)
:setPosition(-8,1)
```
+
```xml
-```
\ No newline at end of file
+```
diff --git a/docs/objects/Object/setBackground.md b/docs/objects/Object/setBackground.md
index 4834da5..323e524 100644
--- a/docs/objects/Object/setBackground.md
+++ b/docs/objects/Object/setBackground.md
@@ -1,16 +1,27 @@
-## setBackground
-Changes the object background color, if you set the value to false the background wont be visible. For example you could see trough a frame.
-#### Parameters:
-1. `number|color` Background color
+# Object
+
+## setBackground
+
+Changes the object background color, if you set the value to false the background wont be visible. For example you could see trough a frame.
+
+### Parameters
+
+1. `number|color` Background color
+1. `char` background symbol you want to draw (optional)
+1. `number|color` Background symbol color (optional)
+
+### Returns
-#### Returns:
1. `object` The object in use
-#### Usage:
-* Creates a frame, and sets its background color to `colors.gray`
+### Usage
+
+* Creates a frame, and sets its background color to `colors.gray`, also sets a background symbol with color black.
+
```lua
-local mainFrame = basalt.createFrame():setBackground(colors.gray)
+local mainFrame = basalt.createFrame():setBackground(colors.gray, "#", colors.black)
```
+
```xml
-```
\ No newline at end of file
+```
diff --git a/docs/objects/Object/setBorder.md b/docs/objects/Object/setBorder.md
index d1609bc..fac31d8 100644
--- a/docs/objects/Object/setBorder.md
+++ b/docs/objects/Object/setBorder.md
@@ -1,16 +1,24 @@
+# Object
+
## setBorder
-Sets the border of that objects, if false the border will be removed
+
+Sets the border of that objects, if false the border will be removed
+
Default: false
-#### Parameters:
+### Parameters
+
1. `number|color` Border color
2. `string` optional - sides. If you don't set sides, all 4 sides will have a border
-#### Returns:
+### Returns
+
1. `object` The object in use
-#### Usage:
+### Usage
+
* Sets the border to green and shows it:
+
```lua
local mainFrame = basalt.createFrame()
local subFrame = mainFrame:addFrame()
@@ -18,6 +26,7 @@ local subFrame = mainFrame:addFrame()
:setSize(18,6)
:setBorder(colors.green, "left", "right", "bottom")
```
+
```xml
-```
\ No newline at end of file
+```
diff --git a/docs/objects/Object/setFocus.md b/docs/objects/Object/setFocus.md
index f861284..cb64027 100644
--- a/docs/objects/Object/setFocus.md
+++ b/docs/objects/Object/setFocus.md
@@ -1,13 +1,20 @@
-## setFocus
+# Object
+
+## setFocus
+
Sets the object to be the focused object.
If you click on an object, it's normally automatically the focused object. For example, if you call :show() on a frame, and you want this particular frame to be in
the foreground, you should also use :setFocus()
-#### Returns:
+
+### Returns
+
1. `object` The object in use
-#### Usage:
+### Usage
+
* Sets the button to the focused object
+
```lua
local mainFrame = basalt.createFrame()
local aButton = mainFrame:addButton():setFocus()
-```
\ No newline at end of file
+```
diff --git a/docs/objects/Object/setForeground.md b/docs/objects/Object/setForeground.md
index d75777b..4da0f4c 100644
--- a/docs/objects/Object/setForeground.md
+++ b/docs/objects/Object/setForeground.md
@@ -1,16 +1,25 @@
+# Object
+
## setForeground
+
Changes the object text color
-#### Parameters:
+
+### Parameters
+
1. `number|color` Foreground color
-#### Returns:
+### Returns
+
1. `object` The object in use
-#### Usage:
+### Usage
+
* Creates a frame, and sets its foreground color to `colors.green`
+
```lua
local mainFrame = basalt.createFrame():setForeground(colors.green)
```
+
```xml
-```
\ No newline at end of file
+```
diff --git a/docs/objects/Object/setParent.md b/docs/objects/Object/setParent.md
index aa50e44..bdb222a 100644
--- a/docs/objects/Object/setParent.md
+++ b/docs/objects/Object/setParent.md
@@ -1,13 +1,21 @@
+# Object
+
## setParent
+
Sets the parent frame of the object
-#### Parameters:
+
+### Parameters
+
1. `frame` The to-be parent frame
-#### Returns:
+### Returns
+
1. `object` The object in use
-#### Usage:
+### Usage
+
* Sets the parent frame of the random frame, adding it to the main frame when the button is clicked"
+
```lua
local mainFrame = basalt.createFrame()
local aRandomFrame = basalt.createFrame()
@@ -16,4 +24,4 @@ local aButton = mainFrame:addButton():onClick(
aRandomFrame:setParent(mainFrame)
end
)
-```
\ No newline at end of file
+```
diff --git a/docs/objects/Object/setPosition.md b/docs/objects/Object/setPosition.md
index 4ba0413..a4819d8 100644
--- a/docs/objects/Object/setPosition.md
+++ b/docs/objects/Object/setPosition.md
@@ -1,28 +1,39 @@
+# Object
+
## setPosition
+
Changes the position relative to its parent frame
-#### Parameters:
+
+### Parameters
+
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:
+### Returns
+
1. `object` The object in use
-#### Usage:
+### Usage
+
* Sets the Buttons position to an x coordinate of 2 with a y coordinate of 3
+
```lua
local mainFrame = basalt.createFrame()
mainFrame:addButton():setPosition(2,3)
```
+
```xml
```
if you prefer to use dynamic values:
+
```lua
local mainFrame = basalt.createFrame()
mainFrame:addButton():setPosition("parent.w * 0.5", 23)
```
+
```xml
-```
\ No newline at end of file
+```
diff --git a/docs/objects/Object/setShadow.md b/docs/objects/Object/setShadow.md
index 32a6726..49b7247 100644
--- a/docs/objects/Object/setShadow.md
+++ b/docs/objects/Object/setShadow.md
@@ -1,14 +1,21 @@
+# Object
+
## setShadow
+
Sets the shadow color - default: false
-#### Parameters:
+### Parameters
+
1. `number|color` Shadow color
-#### Returns:
+#### Returns
+
1. `object` The object in use
-#### Usage:
+#### Usage
+
* Sets the shadow to green and shows it:
+
```lua
local mainFrame = basalt.createFrame()
local subFrame = mainFrame:addFrame()
@@ -16,7 +23,9 @@ local subFrame = mainFrame:addFrame()
:setSize(18,6)
:setShadow(colors.green)
```
-Or:
+
+Or:
+
```xml
-```
\ No newline at end of file
+```
diff --git a/docs/objects/Object/setSize.md b/docs/objects/Object/setSize.md
index 335a332..364395c 100644
--- a/docs/objects/Object/setSize.md
+++ b/docs/objects/Object/setSize.md
@@ -1,18 +1,27 @@
+# Object
+
## setSize
+
Changes the object size
-#### Parameters:
+
+### Parameters
+
1. `number|string` width as number or dynamicvalue as string
2. `number|string` height as number or dynamicvalue as string
-#### Returns:
+### Returns
+
1. `object` The object in use
-#### Usage:
+### Usage
+
* Sets the frame to have a width of 15 and a height of 12
+
```lua
local mainFrame = basalt.createFrame()
local subFrame = mainFrame:addFrame():setSize(15,12)
```
+
```xml
-```
\ No newline at end of file
+```
diff --git a/docs/objects/Object/setValue.md b/docs/objects/Object/setValue.md
index 2050bcd..91f8ad7 100644
--- a/docs/objects/Object/setValue.md
+++ b/docs/objects/Object/setValue.md
@@ -1,17 +1,26 @@
+# Object
+
## setValue
+
Sets the value of that object (input, label, checkbox, textfield, scrollbar,...)
-#### Parameters:
+
+### Parameters
+
1. `any` Value to set the object to
-#### Returns:
+### Returns
+
1. `object` The object in use
-#### Usage:
+### Usage
+
* Creates a checkbox and ticks it
+
```lua
local mainFrame = basalt.createFrame()
local aCheckbox = mainFrame:addCheckbox():setValue(true)
```
+
```xml
-```
\ No newline at end of file
+```
diff --git a/docs/objects/Object/setZIndex.md b/docs/objects/Object/setZIndex.md
index e1e9bba..0936487 100644
--- a/docs/objects/Object/setZIndex.md
+++ b/docs/objects/Object/setZIndex.md
@@ -1,19 +1,28 @@
+# Object
+
## setZIndex
+
Sets the z-index. Higher value means higher draw/event priority. You can also add multiple objects to the same z-index, if so the last added object will have the highest priority.
-#### Parameters:
+
+### Parameters
+
1. `number` z-index
-#### Returns:
+### Returns
+
1. `object` The object in use
-#### Usage:
+### Usage
+
* Sets the buttons z-index to `1` and the labels z-index to `2`
+
```lua
local mainFrame = basalt.createFrame()
local aButton = mainFrame:addButton():setZIndex(1):setPosition(2,2)
local aLabel = mainFrame:addButton():setZIndex(2):setPosition(2,2):setText("I am a label!")
```
+
```xml
-```
\ No newline at end of file
+```
diff --git a/docs/objects/Object/show.md b/docs/objects/Object/show.md
index 20fd15f..7fdf269 100644
--- a/docs/objects/Object/show.md
+++ b/docs/objects/Object/show.md
@@ -1,15 +1,23 @@
+# Object
+
## show
+
Shows the object (only if the parent frame is already visible)
-#### Returns:
+
+### Returns
+
1. `object` The object in use
-#### Usage:
+### Usage
+
* Shows a frame
+
```lua
local mainFrame = basalt.createFrame()
local button = mainFrame:addButton()
button:show()
```
+
```xml
-```
\ No newline at end of file
+```