From 4d614372a188d89bc2551763e80a8216d14aeaa3 Mon Sep 17 00:00:00 2001
From: Robert Jelic <36573031+NoryiE@users.noreply.github.com>
Date: Sun, 28 Aug 2022 18:18:26 +0200
Subject: [PATCH] Updated docs
There is still stuff to do
---
Basalt/objects/Animation.lua | 4 +-
docs/_sidebar.md | 51 +-
docs/events/keyEvents.md | 39 --
docs/events/mouseEvents.md | 82 ----
docs/events/otherEvents.md | 79 ----
docs/home/Quick-Start.md | 16 +-
docs/objects/Animation.md | 316 +------------
docs/objects/Animation/add.md | 17 +
docs/objects/Animation/cancel.md | 15 +
docs/objects/Animation/changeBackground.md | 28 ++
docs/objects/Animation/changeText.md | 28 ++
docs/objects/Animation/changeTextColor.md | 28 ++
docs/objects/Animation/move.md | 25 +
docs/objects/Animation/offset.md | 25 +
docs/objects/Animation/onDone.md | 35 ++
docs/objects/Animation/play.md | 16 +
docs/objects/Animation/setObject.md | 24 +
docs/objects/Animation/size.md | 24 +
docs/objects/Animation/wait.md | 16 +
docs/objects/Basalt.md | 218 ++-------
docs/objects/Basalt/autoUpdate.md | 13 +
docs/objects/Basalt/createFrame.md | 27 ++
docs/objects/Basalt/debug.md | 22 +
docs/objects/Basalt/getActiveFrame.md | 12 +
docs/objects/Basalt/getFrame.md | 23 +
docs/objects/Basalt/isKeyDown.md | 21 +
docs/objects/Basalt/log.md | 15 +
docs/objects/Basalt/removeFrame.md | 17 +
docs/objects/Basalt/schedule.md | 28 ++
docs/objects/Basalt/setTheme.md | 15 +
docs/objects/Basalt/setVariable.md | 17 +
docs/objects/Basalt/stopUpdate.md | 15 +
docs/objects/Basalt/update.md | 18 +
docs/objects/Button.md | 76 +--
docs/objects/Button/setHorizontalAlign.md | 20 +
docs/objects/Button/setText.md | 17 +
docs/objects/Button/setVerticalAlign.md | 21 +
docs/objects/Checkbox.md | 15 +-
docs/objects/Checkbox/setSymbol.md | 0
docs/objects/Dropdown.md | 326 +------------
docs/objects/Dropdown/addItem.md | 28 ++
docs/objects/Dropdown/clear.md | 16 +
docs/objects/Dropdown/editItem.md | 23 +
docs/objects/Dropdown/getAll.md | 16 +
docs/objects/Dropdown/getItem.md | 19 +
docs/objects/Dropdown/getItemCount.md | 16 +
docs/objects/Dropdown/getItemIndex.md | 17 +
docs/objects/Dropdown/getOffset.md | 20 +
docs/objects/Dropdown/removeItem.md | 19 +
docs/objects/Dropdown/selectItem.md | 19 +
docs/objects/Dropdown/setDropdownSize.md | 26 ++
docs/objects/Dropdown/setOffset.md | 32 ++
docs/objects/Dropdown/setSelectedItem.md | 28 ++
docs/objects/Frame.md | 430 ++---------------
docs/objects/Frame/addLayout.md | 17 +
docs/objects/Frame/addLayoutFromString.md | 14 +
docs/objects/Frame/addObject.md | 18 +
docs/objects/Frame/getFocusedObject.md | 11 +
docs/objects/Frame/getLastLayout.md | 5 +
docs/objects/Frame/getObject.md | 15 +
docs/objects/Frame/getOffset.md | 0
docs/objects/Frame/removeFocusedObject.md | 16 +
docs/objects/Frame/removeObject.md | 15 +
docs/objects/Frame/setBar.md | 30 ++
docs/objects/Frame/setBarTextAlign.md | 17 +
docs/objects/Frame/setFocusedObject.md | 15 +
docs/objects/Frame/setMirror.md | 17 +
docs/objects/Frame/setMonitor.md | 19 +
docs/objects/Frame/setMovable.md | 17 +
docs/objects/Frame/setOffset.md | 25 +
docs/objects/Frame/setScrollAmount.md | 17 +
docs/objects/Frame/setScrollable.md | 17 +
docs/objects/Frame/setTheme.md | 17 +
docs/objects/Frame/showBar.md | 17 +
docs/objects/Image.md | 39 +-
docs/objects/Image/loadImage.md | 18 +
docs/objects/Image/shrink.md | 15 +
docs/objects/Input.md | 95 +---
docs/objects/Input/getInputLimit.md | 13 +
docs/objects/Input/getInputType.md | 13 +
docs/objects/Input/setDefaultText.md | 20 +
docs/objects/Input/setInputLimit.md | 18 +
docs/objects/Input/setInputType.md | 18 +
docs/objects/Label.md | 76 +--
docs/objects/Label/getFontSize.md | 13 +
docs/objects/Label/setFontSize.md | 18 +
docs/objects/Label/setText.md | 18 +
docs/objects/List.md | 298 +-----------
docs/objects/List/addItem.md | 28 ++
docs/objects/List/clear.md | 16 +
docs/objects/List/editItem.md | 23 +
docs/objects/List/getAll.md | 16 +
docs/objects/List/getItem.md | 19 +
docs/objects/List/getItemCount.md | 16 +
docs/objects/List/getItemIndex.md | 17 +
docs/objects/List/getOffset.md | 22 +
docs/objects/List/removeItem.md | 19 +
docs/objects/List/selectItem.md | 19 +
docs/objects/List/setOffset.md | 32 ++
docs/objects/List/setScrollable.md | 38 ++
docs/objects/List/setSelectedItem.md | 28 ++
docs/objects/Menubar.md | 359 ++------------
docs/objects/Menubar/addItem.md | 28 ++
docs/objects/Menubar/clear.md | 16 +
docs/objects/Menubar/editItem.md | 23 +
docs/objects/Menubar/getAll.md | 16 +
docs/objects/Menubar/getItem.md | 19 +
docs/objects/Menubar/getItemCount.md | 16 +
docs/objects/Menubar/getItemIndex.md | 17 +
docs/objects/Menubar/getOffset.md | 22 +
docs/objects/Menubar/removeItem.md | 19 +
docs/objects/Menubar/selectItem.md | 19 +
docs/objects/Menubar/setOffset.md | 32 ++
docs/objects/Menubar/setScrollable.md | 38 ++
docs/objects/Menubar/setSelectedItem.md | 28 ++
docs/objects/Object.md | 441 ++----------------
docs/objects/Object/disable.md | 0
docs/objects/Object/enable.md | 0
docs/objects/Object/getAbsolutePosition.md | 16 +
docs/objects/Object/getAnchorPosition.md | 21 +
docs/objects/Object/getName.md | 17 +
docs/objects/Object/getPosition.md | 0
docs/objects/Object/getSize.md | 0
docs/objects/Object/getValue.md | 12 +
docs/objects/Object/hide.md | 15 +
docs/objects/Object/isFocused.md | 13 +
docs/objects/Object/isVisible.md | 12 +
docs/objects/Object/onChange.md | 28 ++
docs/objects/Object/onClick.md | 20 +
docs/objects/Object/onClickUp.md | 25 +
docs/objects/Object/onDrag.md | 20 +
docs/objects/Object/onGetFocus.md | 16 +
docs/objects/Object/onKey.md | 21 +
docs/objects/Object/onKeyUp.md | 21 +
docs/objects/Object/onLoseFocus.md | 16 +
docs/objects/Object/onReposition.md | 0
docs/objects/Object/onResize.md | 19 +
docs/objects/Object/onScroll.md | 20 +
docs/objects/Object/setAnchor.md | 21 +
docs/objects/Object/setBackground.md | 16 +
docs/objects/Object/setBorder.md | 23 +
docs/objects/Object/setFocus.md | 13 +
docs/objects/Object/setForeground.md | 16 +
docs/objects/Object/setParent.md | 19 +
docs/objects/Object/setPosition.md | 19 +
docs/objects/Object/setShadow.md | 22 +
docs/objects/Object/setSize.md | 18 +
docs/objects/Object/setValue.md | 17 +
docs/objects/Object/setZIndex.md | 19 +
docs/objects/Object/show.md | 15 +
docs/objects/Pane.md | 7 +-
docs/objects/Program.md | 177 +------
docs/objects/Program/execute.md | 19 +
docs/objects/Program/getQueuedEvents.md | 34 ++
docs/objects/Program/getStatus.md | 13 +
docs/objects/Program/injectEvent.md | 21 +
docs/objects/Program/injectEvents.md | 23 +
docs/objects/Program/isPaused.md | 13 +
docs/objects/Program/pause.md | 16 +
docs/objects/Program/stop.md | 14 +
docs/objects/Progressbar.md | 137 +-----
docs/objects/Progressbar/getProgress.md | 14 +
.../Progressbar/setBackgroundSymbol.md | 19 +
docs/objects/Progressbar/setDirection.md | 19 +
docs/objects/Progressbar/setProgress.md | 16 +
docs/objects/Progressbar/setProgressBar.md | 21 +
docs/objects/Radio.md | 245 +---------
docs/objects/Radio/addItem.md | 30 ++
docs/objects/Radio/clear.md | 16 +
docs/objects/Radio/editItem.md | 25 +
docs/objects/Radio/getAll.md | 16 +
docs/objects/Radio/getItem.md | 19 +
docs/objects/Radio/getItemCount.md | 16 +
docs/objects/Radio/getItemIndex.md | 17 +
docs/objects/Radio/removeItem.md | 19 +
docs/objects/Radio/selectItem.md | 19 +
docs/objects/Radio/setSelectedItem.md | 28 ++
docs/objects/Slider.md | 115 +----
docs/objects/Slider/getIndex.md | 5 +
docs/objects/Slider/setBackgroundSymbol.md | 18 +
docs/objects/Slider/setBarType.md | 18 +
docs/objects/Slider/setIndex.md | 21 +
docs/objects/Slider/setMaxValue.md | 18 +
docs/objects/Slider/setSymbol.md | 18 +
docs/objects/Textfield.md | 170 +------
docs/objects/Textfield/addKeywords.md | 30 ++
docs/objects/Textfield/addLine.md | 24 +
docs/objects/Textfield/addRule.md | 27 ++
docs/objects/Textfield/editLine.md | 17 +
docs/objects/Textfield/getLine.md | 16 +
docs/objects/Textfield/getLines.md | 13 +
docs/objects/Textfield/getTextCursor.md | 6 +
docs/objects/Textfield/removeLine.md | 17 +
docs/objects/Thread.md | 70 +--
docs/objects/Thread/getStatus.md | 12 +
docs/objects/Thread/start.md | 28 ++
docs/objects/Thread/stop.md | 20 +
docs/objects/Timer.md | 91 +---
docs/objects/Timer/cancel.md | 12 +
docs/objects/Timer/onCall.md | 35 ++
docs/objects/Timer/setTime.md | 18 +
docs/objects/Timer/start.md | 14 +
docs/tips/buttonColoring.md | 80 ++++
docs/tips/buttons.md | 41 --
docs/tips/design.md | 172 ++++---
docs/tips/events.md | 34 --
docs/tips/logic.md | 60 ++-
207 files changed, 3868 insertions(+), 3785 deletions(-)
delete mode 100644 docs/events/keyEvents.md
delete mode 100644 docs/events/mouseEvents.md
delete mode 100644 docs/events/otherEvents.md
create mode 100644 docs/objects/Animation/add.md
create mode 100644 docs/objects/Animation/cancel.md
create mode 100644 docs/objects/Animation/changeBackground.md
create mode 100644 docs/objects/Animation/changeText.md
create mode 100644 docs/objects/Animation/changeTextColor.md
create mode 100644 docs/objects/Animation/move.md
create mode 100644 docs/objects/Animation/offset.md
create mode 100644 docs/objects/Animation/onDone.md
create mode 100644 docs/objects/Animation/play.md
create mode 100644 docs/objects/Animation/setObject.md
create mode 100644 docs/objects/Animation/size.md
create mode 100644 docs/objects/Animation/wait.md
create mode 100644 docs/objects/Basalt/autoUpdate.md
create mode 100644 docs/objects/Basalt/createFrame.md
create mode 100644 docs/objects/Basalt/debug.md
create mode 100644 docs/objects/Basalt/getActiveFrame.md
create mode 100644 docs/objects/Basalt/getFrame.md
create mode 100644 docs/objects/Basalt/isKeyDown.md
create mode 100644 docs/objects/Basalt/log.md
create mode 100644 docs/objects/Basalt/removeFrame.md
create mode 100644 docs/objects/Basalt/schedule.md
create mode 100644 docs/objects/Basalt/setTheme.md
create mode 100644 docs/objects/Basalt/setVariable.md
create mode 100644 docs/objects/Basalt/stopUpdate.md
create mode 100644 docs/objects/Basalt/update.md
create mode 100644 docs/objects/Button/setHorizontalAlign.md
create mode 100644 docs/objects/Button/setText.md
create mode 100644 docs/objects/Button/setVerticalAlign.md
create mode 100644 docs/objects/Checkbox/setSymbol.md
create mode 100644 docs/objects/Dropdown/addItem.md
create mode 100644 docs/objects/Dropdown/clear.md
create mode 100644 docs/objects/Dropdown/editItem.md
create mode 100644 docs/objects/Dropdown/getAll.md
create mode 100644 docs/objects/Dropdown/getItem.md
create mode 100644 docs/objects/Dropdown/getItemCount.md
create mode 100644 docs/objects/Dropdown/getItemIndex.md
create mode 100644 docs/objects/Dropdown/getOffset.md
create mode 100644 docs/objects/Dropdown/removeItem.md
create mode 100644 docs/objects/Dropdown/selectItem.md
create mode 100644 docs/objects/Dropdown/setDropdownSize.md
create mode 100644 docs/objects/Dropdown/setOffset.md
create mode 100644 docs/objects/Dropdown/setSelectedItem.md
create mode 100644 docs/objects/Frame/addLayout.md
create mode 100644 docs/objects/Frame/addLayoutFromString.md
create mode 100644 docs/objects/Frame/addObject.md
create mode 100644 docs/objects/Frame/getFocusedObject.md
create mode 100644 docs/objects/Frame/getLastLayout.md
create mode 100644 docs/objects/Frame/getObject.md
create mode 100644 docs/objects/Frame/getOffset.md
create mode 100644 docs/objects/Frame/removeFocusedObject.md
create mode 100644 docs/objects/Frame/removeObject.md
create mode 100644 docs/objects/Frame/setBar.md
create mode 100644 docs/objects/Frame/setBarTextAlign.md
create mode 100644 docs/objects/Frame/setFocusedObject.md
create mode 100644 docs/objects/Frame/setMirror.md
create mode 100644 docs/objects/Frame/setMonitor.md
create mode 100644 docs/objects/Frame/setMovable.md
create mode 100644 docs/objects/Frame/setOffset.md
create mode 100644 docs/objects/Frame/setScrollAmount.md
create mode 100644 docs/objects/Frame/setScrollable.md
create mode 100644 docs/objects/Frame/setTheme.md
create mode 100644 docs/objects/Frame/showBar.md
create mode 100644 docs/objects/Image/loadImage.md
create mode 100644 docs/objects/Image/shrink.md
create mode 100644 docs/objects/Input/getInputLimit.md
create mode 100644 docs/objects/Input/getInputType.md
create mode 100644 docs/objects/Input/setDefaultText.md
create mode 100644 docs/objects/Input/setInputLimit.md
create mode 100644 docs/objects/Input/setInputType.md
create mode 100644 docs/objects/Label/getFontSize.md
create mode 100644 docs/objects/Label/setFontSize.md
create mode 100644 docs/objects/Label/setText.md
create mode 100644 docs/objects/List/addItem.md
create mode 100644 docs/objects/List/clear.md
create mode 100644 docs/objects/List/editItem.md
create mode 100644 docs/objects/List/getAll.md
create mode 100644 docs/objects/List/getItem.md
create mode 100644 docs/objects/List/getItemCount.md
create mode 100644 docs/objects/List/getItemIndex.md
create mode 100644 docs/objects/List/getOffset.md
create mode 100644 docs/objects/List/removeItem.md
create mode 100644 docs/objects/List/selectItem.md
create mode 100644 docs/objects/List/setOffset.md
create mode 100644 docs/objects/List/setScrollable.md
create mode 100644 docs/objects/List/setSelectedItem.md
create mode 100644 docs/objects/Menubar/addItem.md
create mode 100644 docs/objects/Menubar/clear.md
create mode 100644 docs/objects/Menubar/editItem.md
create mode 100644 docs/objects/Menubar/getAll.md
create mode 100644 docs/objects/Menubar/getItem.md
create mode 100644 docs/objects/Menubar/getItemCount.md
create mode 100644 docs/objects/Menubar/getItemIndex.md
create mode 100644 docs/objects/Menubar/getOffset.md
create mode 100644 docs/objects/Menubar/removeItem.md
create mode 100644 docs/objects/Menubar/selectItem.md
create mode 100644 docs/objects/Menubar/setOffset.md
create mode 100644 docs/objects/Menubar/setScrollable.md
create mode 100644 docs/objects/Menubar/setSelectedItem.md
create mode 100644 docs/objects/Object/disable.md
create mode 100644 docs/objects/Object/enable.md
create mode 100644 docs/objects/Object/getAbsolutePosition.md
create mode 100644 docs/objects/Object/getAnchorPosition.md
create mode 100644 docs/objects/Object/getName.md
create mode 100644 docs/objects/Object/getPosition.md
create mode 100644 docs/objects/Object/getSize.md
create mode 100644 docs/objects/Object/getValue.md
create mode 100644 docs/objects/Object/hide.md
create mode 100644 docs/objects/Object/isFocused.md
create mode 100644 docs/objects/Object/isVisible.md
create mode 100644 docs/objects/Object/onChange.md
create mode 100644 docs/objects/Object/onClick.md
create mode 100644 docs/objects/Object/onClickUp.md
create mode 100644 docs/objects/Object/onDrag.md
create mode 100644 docs/objects/Object/onGetFocus.md
create mode 100644 docs/objects/Object/onKey.md
create mode 100644 docs/objects/Object/onKeyUp.md
create mode 100644 docs/objects/Object/onLoseFocus.md
create mode 100644 docs/objects/Object/onReposition.md
create mode 100644 docs/objects/Object/onResize.md
create mode 100644 docs/objects/Object/onScroll.md
create mode 100644 docs/objects/Object/setAnchor.md
create mode 100644 docs/objects/Object/setBackground.md
create mode 100644 docs/objects/Object/setBorder.md
create mode 100644 docs/objects/Object/setFocus.md
create mode 100644 docs/objects/Object/setForeground.md
create mode 100644 docs/objects/Object/setParent.md
create mode 100644 docs/objects/Object/setPosition.md
create mode 100644 docs/objects/Object/setShadow.md
create mode 100644 docs/objects/Object/setSize.md
create mode 100644 docs/objects/Object/setValue.md
create mode 100644 docs/objects/Object/setZIndex.md
create mode 100644 docs/objects/Object/show.md
create mode 100644 docs/objects/Program/execute.md
create mode 100644 docs/objects/Program/getQueuedEvents.md
create mode 100644 docs/objects/Program/getStatus.md
create mode 100644 docs/objects/Program/injectEvent.md
create mode 100644 docs/objects/Program/injectEvents.md
create mode 100644 docs/objects/Program/isPaused.md
create mode 100644 docs/objects/Program/pause.md
create mode 100644 docs/objects/Program/stop.md
create mode 100644 docs/objects/Progressbar/getProgress.md
create mode 100644 docs/objects/Progressbar/setBackgroundSymbol.md
create mode 100644 docs/objects/Progressbar/setDirection.md
create mode 100644 docs/objects/Progressbar/setProgress.md
create mode 100644 docs/objects/Progressbar/setProgressBar.md
create mode 100644 docs/objects/Radio/addItem.md
create mode 100644 docs/objects/Radio/clear.md
create mode 100644 docs/objects/Radio/editItem.md
create mode 100644 docs/objects/Radio/getAll.md
create mode 100644 docs/objects/Radio/getItem.md
create mode 100644 docs/objects/Radio/getItemCount.md
create mode 100644 docs/objects/Radio/getItemIndex.md
create mode 100644 docs/objects/Radio/removeItem.md
create mode 100644 docs/objects/Radio/selectItem.md
create mode 100644 docs/objects/Radio/setSelectedItem.md
create mode 100644 docs/objects/Slider/getIndex.md
create mode 100644 docs/objects/Slider/setBackgroundSymbol.md
create mode 100644 docs/objects/Slider/setBarType.md
create mode 100644 docs/objects/Slider/setIndex.md
create mode 100644 docs/objects/Slider/setMaxValue.md
create mode 100644 docs/objects/Slider/setSymbol.md
create mode 100644 docs/objects/Textfield/addKeywords.md
create mode 100644 docs/objects/Textfield/addLine.md
create mode 100644 docs/objects/Textfield/addRule.md
create mode 100644 docs/objects/Textfield/editLine.md
create mode 100644 docs/objects/Textfield/getLine.md
create mode 100644 docs/objects/Textfield/getLines.md
create mode 100644 docs/objects/Textfield/getTextCursor.md
create mode 100644 docs/objects/Textfield/removeLine.md
create mode 100644 docs/objects/Thread/getStatus.md
create mode 100644 docs/objects/Thread/start.md
create mode 100644 docs/objects/Thread/stop.md
create mode 100644 docs/objects/Timer/cancel.md
create mode 100644 docs/objects/Timer/onCall.md
create mode 100644 docs/objects/Timer/setTime.md
create mode 100644 docs/objects/Timer/start.md
create mode 100644 docs/tips/buttonColoring.md
delete mode 100644 docs/tips/buttons.md
delete mode 100644 docs/tips/events.md
diff --git a/Basalt/objects/Animation.lua b/Basalt/objects/Animation.lua
index fc7dabb..48d9d97 100644
--- a/Basalt/objects/Animation.lua
+++ b/Basalt/objects/Animation.lua
@@ -143,7 +143,9 @@ return function(name)
if(typ~=nil)then
if(activeAnimations[typ]==nil)then activeAnimations[typ] = {} end
if(activeAnimations[typ][name]~=nil)then
- activeAnimations[typ][name]:cancel()
+ if(activeAnimations[typ][name]~=self)then
+ activeAnimations[typ][name]:cancel()
+ end
end
activeAnimations[typ][name] = self
end
diff --git a/docs/_sidebar.md b/docs/_sidebar.md
index 17667c6..488f803 100644
--- a/docs/_sidebar.md
+++ b/docs/_sidebar.md
@@ -3,33 +3,28 @@
- [Quick Start](home/Quick-Start.md)
- [Installer](home/installer)
- Objects
- - [Basalt](objects/Basalt)
- - [Object](objects/Object)
- - [Button](objects/Button)
- - [Checkbox](objects/Checkbox)
- - [Dropdown](objects/Dropdown)
- - [Frame](objects/Frame)
- - [Image](objects/Image)
- - [Input](objects/Input)
- - [Label](objects/Label)
- - [List](objects/List)
- - [Menubar](objects/Menubar)
- - [Pane](objects/Pane)
- - [Program](objects/Program)
- - [Progressbar](objects/Progressbar)
- - [Radio](objects/Radio)
- - [Scrollbar](objects/Scrollbar)
- - [Slider](objects/Slider)
- - [Textfield](objects/Textfield)
+ - [Basalt](objects/Basalt.md)
+ - [Object](objects/Object.md)
+ - [Button](objects/Button.md)
+ - [Checkbox](objects/Checkbox.md)
+ - [Dropdown](objects/Dropdown.md)
+ - [Frame](objects/Frame.md)
+ - [Image](objects/Image.md)
+ - [Input](objects/Input.md)
+ - [Label](objects/Label.md)
+ - [List](objects/List.md)
+ - [Menubar](objects/Menubar.md)
+ - [Pane](objects/Pane.md)
+ - [Program](objects/Program.md)
+ - [Progressbar](objects/Progressbar.md)
+ - [Radio](objects/Radio.md)
+ - [Scrollbar](objects/Scrollbar.md)
+ - [Slider](objects/Slider.md)
+ - [Textfield](objects/Textfield.md)
- [Animation](objects/Animation.md)
- - [Thread](objects/Thread)
- - [Timer](objects/Timer)
-- Events
- - [Mouse Events](events/mouseEvents.md)
- - [Keyboard Events](events/keyEvents.md)
- - [Other Events](events/otherEvents.md)
+ - [Thread](objects/Thread.md)
+ - [Timer](objects/Timer.md)
- Tips & Tricks
- - [Component Logic](tips/logic)
- - [Changing Button Color](tips/buttons)
- - [Advanced usage of Events](tips/events.md)
- - [Example Designs](tips/design.md)
+ - [Your Logic](tips/logic.md)
+ - [Button coloring](tips/buttonColoring.md)
+ - [Designing/Animating](tips/design.md)
diff --git a/docs/events/keyEvents.md b/docs/events/keyEvents.md
deleted file mode 100644
index 079fa99..0000000
--- a/docs/events/keyEvents.md
+++ /dev/null
@@ -1,39 +0,0 @@
-Here we will talk about keyboard events and how you can manipulate them. There are 2 possible key events you can add to almost every visual object.
-
-# onKey
-`onKey(self, event, key)`
-The computercraft event which triggers this method is `key`.
-Any visual object can register onKey events.
-
-Here is a example on how to add a onKey event to your frame:
-
-```lua
-local basalt = require("Basalt")
-
-local mainFrame = basalt.createFrame("myMainFrame"):show()
-local subFrame = mainFrame:addFrame("subFrame"):setPosition(3,3):setSize(18,6):setBar("Sub Frame",colors.black):showBar():show()
-
-function openSubFrame()
- subFrame:show()
-end
-mainFrame:onKey(openSubFrame)
-```
-
-# onKeyUp
-`onKeyUp(self, event, key)`
-The computercraft event which triggers this method is `key_up`.
-Any visual object can register onKeyUp events.
-
-Here is a example on how to add a onKeyUp event to your frame:
-
-```lua
-local basalt = require("Basalt")
-
-local mainFrame = basalt.createFrame("myMainFrame"):show()
-local subFrame = mainFrame:addFrame("subFrame"):setPosition(3,3):setSize(18,6):setBar("Sub Frame",colors.black):showBar():show()
-
-function openSubFrame()
- subFrame:show()
-end
-mainFrame:onKeyUp(openSubFrame)
-```
diff --git a/docs/events/mouseEvents.md b/docs/events/mouseEvents.md
deleted file mode 100644
index 88fae51..0000000
--- a/docs/events/mouseEvents.md
+++ /dev/null
@@ -1,82 +0,0 @@
-Here we will talk about mouse events and how you can use them. You can register custom mouse events to all visual objects
-
-# onClick
-`onClick(self, event, button, x, y)`
-The computercraft event which triggers this method is `mouse_click` and `monitor_touch`.
-Any visual object can register onClick events.
-
-Here is a example on how to add a onClick event to your button:
-
-```lua
-local basalt = require("Basalt")
-
-local mainFrame = basalt.createFrame("myMainFrame"):show()
-local button = mainFrame:addButton("myButton"):setPosition(3,3):setSize(12,3):setText("Click"):show()
-
-function buttonOnClick()
- basalt.debug("Button got clicked!")
-end
-button:onClick(buttonOnClick)
-```
-
-# onClickUp
-`onClickUp(self, event, button, x, y)`
-The computercraft event which triggers this method is `mouse_up`.
-Any visual object can register onClickUp events.
-
-Here is a example on how to add a onClickUp event to your button:
-
-```lua
-local basalt = require("Basalt")
-
-local mainFrame = basalt.createFrame("myMainFrame"):show()
-local button = mainFrame:addButton("myButton"):setPosition(3,3):setSize(12,3):setText("Click"):show()
-
-function buttonOnClick(self, button, x, y)
- basalt.debug("Button got clicked!")
-end
-button:onClick(buttonOnClick)
-
-function buttonOnRelease(self, button, x, y)
- basalt.debug("Button got released!")
-end
-button:onClickUp(buttonOnRelease)
-```
-
-# onScroll
-`onScroll(self, event, direction, x, y)`
-The computercraft event which triggers this method is `mouse_scroll`.
-Any visual object can register onScroll events.
-
-Here is a example on how to add a onScroll event to your button:
-
-```lua
-local basalt = require("Basalt")
-
-local mainFrame = basalt.createFrame("myMainFrame"):show()
-local button = mainFrame:addButton("myButton"):setPosition(3,3):setSize(12,3):setText("Click"):show()
-
-function buttonOnScroll(self, direction, x, y)
- basalt.debug("Someone scrolls on me!")
-end
-button:onScroll(buttonOnScroll)
-```
-
-# onDrag
-`onDrag(self, event, button, x, y)`
-The computercraft event which triggers this method is `mouse_drag`.
-Any visual object can register onDrag events.
-
-Here is a example on how to add a onDrag event to your button:
-
-```lua
-local basalt = require("Basalt")
-
-local mainFrame = basalt.createFrame("myMainFrame"):show()
-local button = mainFrame:addButton("myButton"):setPosition(3,3):setSize(12,3):setText("Click"):show()
-
-function buttonOnDrag(self, button, x, y)
- basalt.debug("Someone drags me (i know i wont reposition myself)!")
-end
-button:onDrag(buttonOnDrag)
-```
diff --git a/docs/events/otherEvents.md b/docs/events/otherEvents.md
deleted file mode 100644
index 8ed8f3e..0000000
--- a/docs/events/otherEvents.md
+++ /dev/null
@@ -1,79 +0,0 @@
-There are also other useful events you can listen to:
-
-# 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:
-
-```lua
-local basalt = require("Basalt")
-
-local mainFrame = basalt.createFrame("myMainFrame"):show()
-local aInput = mainFrame:addInput("specialInput"):setPosition(3,3):show()
-local aCheckbox = mainFrame:addCheckbox("specialCheckbox"):setPosition(3,5):show()
-
-local function checkInput(input)
- if(string.lower(input:getValue())=="hello")then
- basalt.debug("Hello back!")
- end
-end
-
-local function checkCheckbox(checkbox)
- if(checkbox:getValue()==true)then -- or if(checkbox:getValue())then
- basalt.debug("Checkbox is active, let us do something!")
- end
-end
-
-aInput:onChange(checkInput)
-aCheckbox:onChange(checkCheckbox)
-```
-
-# onResize
-`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:
-
-```lua
-local basalt = require("Basalt")
-
-local mainFrame = basalt.createFrame("myMainFrame"):show()
-local aButton = mainFrame:addButton("myButton"):setPosition(3,3):show()
-
-local function onButtonResize(button)
- local width = mainFrame:getWidth()
- button:setSize()
-end
-
-aButton:onResize(onButtonResize)
-```
-# onLoseFocus
-`onLoseFocus(self)`
-This event gets triggered as soon as the object loses its focus.
-
-```lua
-local basalt = require("Basalt")
-
-local mainFrame = basalt.createFrame("myFirstFrame"):show()
-local aButton = mainFrame:addButton("exampleButton"):setPosition(3,3):onLoseFocus(
- function(self)
- basalt.debug("Please come back... :(")
- end
-):show()
-```
-
-# onGetFocus
-`onGetFocus(self)`
-This event gets triggered as soon as the object is the currently focused object.
-
-```lua
-local basalt = require("Basalt")
-
-local mainFrame = basalt.createFrame("myFirstFrame"):show()
-local aButton = mainFrame:addButton("exampleButton"):setPosition(3,3):onGetFocus(
- function(self)
- basalt.debug("Welcome back!")
- end
-):show()
-```
diff --git a/docs/home/Quick-Start.md b/docs/home/Quick-Start.md
index c7d48f5..5002627 100644
--- a/docs/home/Quick-Start.md
+++ b/docs/home/Quick-Start.md
@@ -45,11 +45,14 @@ Here is a fully functioning example of Basalt code
```lua
local basalt = require("basalt") --> Load the Basalt framework
---> Create a base frame. Please note that Basalt needs at least one active base frame to properly supply events
-local mainFrame = basalt.createFrame()
+--> Create the first frame. Please note that Basalt needs at least one active "non-parent" frame to properly supply events
+--> When Basalt#createFrame makes use of unique identifiers (commonly referred to as UIDs), meaning that the supplied value must be UNIQUE
+local mainFrame = basalt.createFrame("mainFrame")
+--> Show the frame to the user
+mainFrame:show()
-local button = mainFrame:addButton() --> Add a button to the mainFrame
+local button = mainFrame:addButton("clickableButton") --> Add a button to the mainFrame (With a unique identifier)
--> Set the position of the button, Button#setPosition follows an x, y pattern.
--> The x value is how far right the object should be from its anchor (negative values from an anchor will travel left)
@@ -66,21 +69,24 @@ end
--> Make sure the button knows which function to call when it's clicked
button:onClick(buttonClick)
+button:show() --> Make the button visible, so the user can click it
+
basalt.autoUpdate() --> Basalt#autoUpdate starts the event listener to detect user input
```
If you're like us and strive for succinct and beautiful code, here is a cleaner implementation of the code above:
```lua
local basalt = require("basalt")
-local mainFrame = basalt.createFrame()
+local mainFrame = basalt.createFrame("mainFrame"):show()
local button = mainFrame --> Basalt returns an instance of the object on most methods, to make use of "call-chaining"
- :addButton() --> This is an example of call chaining
+ :addButton("clickableButton") --> This is an example of call chaining
:setPosition(4,4)
:setText("Click me!")
:onClick(
function()
basalt.debug("I got clicked!")
end)
+ :show()
basalt.autoUpdate()
```
diff --git a/docs/objects/Animation.md b/docs/objects/Animation.md
index 77b8725..ef789f0 100644
--- a/docs/objects/Animation.md
+++ b/docs/objects/Animation.md
@@ -1,303 +1,21 @@
-With animations, you can create a beautiful experience for users while interacting with objects.
-For now the animation class is very basic, it will be expanded in the future, but we have to say you can already do almost everything you can imagine!
+With animations, you can create a beautiful experience for users while interacting with your program.
-Right now animation is a class which makes use of the timer event.
-You can find more information below:
-
-`The animation object is still a WIP and the way you use it right now could change in the future!`
-
-## add
-Adds a new function to an animation
-#### Parameters:
-1. `function` The function containing animation logic
-
-#### Returns:
-1. `animation` Animation in use
-
-
-#### Usage:
-* This will set the button position to 3,3, waits 1 second, then sets position to 4,4, waits 2 seconds, and then sets the position to 5,5
-```lua
-local mainFrame = basalt.createFrame()
-local testButton = mainFrame:addButton()
-local aAnimation = mainFrame:addAnimation():add(function() testButton:setPosition(3,3) end):wait(1):add(function() testButton:setPosition(1,1,"r") end):wait(2):add(function() testButton:setPosition(1,1,"r") end)
-aAnimation:play()
-```
-
-## wait
-Sets a wait timer for the next function after the previous function got executed, no wait timer calls the next function immediately
-#### Parameters:
-1. `number` The length of delay between the functions _(in seconds)_
-
-#### Returns:
-1. `animation` Animation in use
-
-#### Usage:
-```lua
-local mainFrame = basalt.createFrame()
-local testButton = mainFrame:addButton()
-local aAnimation = mainFrame:addAnimation():add(function() testButton:setPosition(3,3) end):wait(1):add(function() testButton:setPosition(1,1,"r") end):wait(2):add(function() testButton:setPosition(1,1,"r") end)
-
-aAnimation:play()
-```
-
-## play
-Plays the animation
-#### Parameters:
-1. `boolean` Whether it will loop forever, will most likely be replaced with a count in the future
-
-#### Returns:
-1. `animation` Animation in use
-
-#### Usage:
-```lua
-local mainFrame = basalt.createFrame()
-local testButton = mainFrame:addButton()
-local aAnimation = mainFrame:addAnimation():add(function() testButton:setBackground(colors.black) end):wait(1):add(function() testButton:setBackground(colors.gray) end):wait(1):add(function() testButton:setBackground(colors.lightGray) end)
-
-aAnimation:play() -- changes the background color of that button from black to gray and then to lightGray
-```
-
-## cancel
-Cancels the animation
-
-#### Returns:
-1. `animation` Animation in use
-
-#### Usage:
-
-```lua
-local mainFrame = basalt.createFrame()
-local testButton = mainFrame:addButton()
-local aAnimation = mainFrame:addAnimation():add(function() testButton:setBackground(colors.black) end):wait(1):add(function() aAnimation:cancel() end):wait(1):add(function() testButton:setBackground(colors.lightGray) end)
-
-aAnimation:play()
-```
-
-
-## setObject
-Sets the object which the animation should reposition/resize
-
-#### Parameters:
-1. `table` object
-
-#### Returns:
-1. `animation` Animation in use
-
-#### Usage:
-
-```lua
-local mainFrame = basalt.createFrame()
-local testButton = mainFrame:addButton()
-local aAnimation = mainFrame:addAnimation():setObject(testButton)
-```
-
-```lua
-local mainFrame = basalt.createFrame()
-local testButton = mainFrame:addButton("buttonToAnimate")
-```
-```xml
-
-```
-
-## move
-Moves the object which got defined by setObject
-
-#### Parameters:
-1. `number` x coordinate
-2. `number` y coordinate
-3. `number` duration in seconds
-4. `number` time - time when this part should begin (offset to when the animation starts - default 0)
-5. `table` object - optional, you could also define the object here
-
-#### Returns:
-1. `animation` Animation in use
-
-#### Usage:
-* Takes 2 seconds to move the object from its current position to x15 y3
-```lua
-local mainFrame = basalt.createFrame()
-local testButton = mainFrame:addButton("buttonToAnimate")
-local aAnimation = mainFrame:addAnimation():setObject(testButton):move(15,3,2):play()
-```
-```xml
-
-1562
-
-```
-
-## offset
-Changes the offset on the object which got defined by setObject
-
-#### Parameters:
-1. `number` x offset
-2. `number` y offset
-3. `number` duration in seconds
-4. `number` time - time when this part should begin (offset to when the animation starts - default 0)
-5. `table` object - optional, you could also define the object here
-
-#### Returns:
-1. `animation` Animation in use
-
-#### Usage:
-
-```lua
-local mainFrame = basalt.createFrame()
-local subFrame = mainFrame:addFrame("frameToAnimate")
-local aAnimation = mainFrame:addAnimation():setObject(subFrame):offset(1,12,1):play()
-```
-```xml
-
-1121
-
-```
-
-## size
-Changes the size on the object which got defined by setObject
-
-#### Parameters:
-1. `number` width
-2. `number` height
-3. `number` duration in seconds
-4. `number` time - time when this part should begin (offset to when the animation starts - default 0)
-5. `table` object - optional, you could also define the object here
-
-#### Returns:
-1. `animation` Animation in use
-
-#### Usage:
-```lua
-local mainFrame = basalt.createFrame()
-local testButton = mainFrame:addButton("buttonToAnimate")
-local aAnimation = mainFrame:addAnimation():setObject(testButton):size(15,3,1):play()
-```
-```xml
-
-1531
-
-```
-
-## changeText
-Changes the text while animation is running
-
-#### Parameters:
-1. `table` multiple text strings - example: {"i", "am", "groot"}
-2. `number` duration in seconds
-3. `number` time - time when this part should begin (offset to when the animation starts - default 0)
-
-#### Returns:
-1. `animation` Animation in use
-
-#### Usage:
-
-```lua
-local mainFrame = basalt.createFrame()
-local testButton = mainFrame:addButton("buttonToAnimate")
-local aAnimation = mainFrame:addAnimation():setObject(testButton):changeText({"i", "am", "groot"}, 2):play()
-```
-```xml
-
-
- i
- am
- groot
- 2
-
-
-```
-
-## changeTextColor
-Changes the text color while the animation is running
-
-#### Parameters:
-1. `table` multiple color numbers - example: {colors.red, colors.yellow, colors.green}
-2. `number` duration in seconds
-3. `number` time - time when this part should begin (offset to when the animation starts - default 0)
-
-#### Returns:
-1. `animation` Animation in use
-
-#### Usage:
-
-```lua
-local mainFrame = basalt.createFrame()
-local testButton = mainFrame:addButton("buttonToAnimate")
-local aAnimation = mainFrame:addAnimation():setObject(testButton):changeTextColor({colors.red, colors.yellow, colors.green}, 2):play()
-```
-```xml
-
-
- red
- yellow
- green
- 2
-
-
-```
-
-## changeBackground
-Changes the background color while the animation is running
-
-#### Parameters:
-1. `table` multiple color numbers - example: {colors.red, colors.yellow, colors.green}
-2. `number` duration in seconds
-3. `number` time - time when this part should begin (offset to when the animation starts - default 0)
-
-#### Returns:
-1. `animation` Animation in use
-
-#### Usage:
-
-```lua
-local mainFrame = basalt.createFrame()
-local testButton = mainFrame:addButton("buttonToAnimate")
-local aAnimation = mainFrame:addAnimation():setObject(testButton):changeTextColor({colors.red, colors.yellow, colors.green}, 2):play()
-```
-```xml
-
-
- red
- yellow
- green
- 2
-
-
-```
+| | |
+|---|---|
+|[add](objects/Animation/add.md)|Adds a new custom function to call at the current time
+|[wait](objects/Animation/wait.md)|Adds a amount to the animation time
+|[play](objects/Animation/play.md)|Plays the animation
+|[cancel](objects/Animation/cancel.md)|Cancels the animation
+|[setObject](objects/Animation/setObject.md)|Sets an object on which predefined animations should work on
+|[move](objects/Animation/move.md)|Predefined animation: moves the object to a new position
+|[offset](objects/Animation/offset.md)|Predefined animation: Changes the offset of that object
+|[size](objects/Animation/size.md)|Predefined animation: Changes the size on a object
+|[changeText](objects/Animation/changeText.md)|Predefined animation: Changes the text (object needs a setText method)
+|[changeTextColor](objects/Animation/changeTextColor.md)|Predefined animation: changes the foreground/textcolor on a object
+|[changeBackground](objects/Animation/changeBackground.md)|Predefined animation: changes the background on a object
# Events
-## onDone
-`onDone(self)`
-This is a event which gets fired as soon as the animation has finished.
-
-```lua
-local basalt = require("Basalt")
-
-local mainFrame = basalt.createFrame()
-local testButton = mainFrame:addButton("buttonToAnimate")
-local aAnimation = mainFrame:addAnimation():setObject(testButton):changeTextColor({colors.red, colors.yellow, colors.green}, 2):play()
-aAnimation:onDone(function()
- basalt.debug("The animation is done")
-end)
-```
-
-In XML you are also able to queue multiple animations, like this:
-
-```xml
-
-
- red
- yellow
- green
- 2
-
-
-
-
- red
- yellow
- green
- 2
-
-
-```
\ No newline at end of file
+| | |
+|---|---|
+|[onDone](objects/Animation/onDone.md)|Gets called as soon as the animation has finished
diff --git a/docs/objects/Animation/add.md b/docs/objects/Animation/add.md
new file mode 100644
index 0000000..8587646
--- /dev/null
+++ b/docs/objects/Animation/add.md
@@ -0,0 +1,17 @@
+## add
+Adds a new function to an animation
+#### Parameters:
+1. `function` The function containing animation logic
+
+#### Returns:
+1. `animation` Animation in use
+
+
+#### Usage:
+* This will set the button position to 3,3, waits 1 second, then sets position to 4,4, waits 2 seconds, and then sets the position to 5,5
+```lua
+local mainFrame = basalt.createFrame()
+local testButton = mainFrame:addButton()
+local aAnimation = mainFrame:addAnimation():add(function() testButton:setPosition(3,3) end):wait(1):add(function() testButton:setPosition(1,1,"r") end):wait(2):add(function() testButton:setPosition(1,1,"r") end)
+aAnimation:play()
+```
\ No newline at end of file
diff --git a/docs/objects/Animation/cancel.md b/docs/objects/Animation/cancel.md
new file mode 100644
index 0000000..b96c96a
--- /dev/null
+++ b/docs/objects/Animation/cancel.md
@@ -0,0 +1,15 @@
+## cancel
+Cancels the animation
+
+#### Returns:
+1. `animation` Animation in use
+
+#### Usage:
+
+```lua
+local mainFrame = basalt.createFrame()
+local testButton = mainFrame:addButton()
+local aAnimation = mainFrame:addAnimation():add(function() testButton:setBackground(colors.black) end):wait(1):add(function() aAnimation:cancel() end):wait(1):add(function() testButton:setBackground(colors.lightGray) end)
+
+aAnimation:play()
+```
\ No newline at end of file
diff --git a/docs/objects/Animation/changeBackground.md b/docs/objects/Animation/changeBackground.md
new file mode 100644
index 0000000..903031e
--- /dev/null
+++ b/docs/objects/Animation/changeBackground.md
@@ -0,0 +1,28 @@
+## changeBackground
+Changes the background color while the animation is running
+
+#### Parameters:
+1. `table` multiple color numbers - example: {colors.red, colors.yellow, colors.green}
+2. `number` duration in seconds
+3. `number` time - time when this part should begin (offset to when the animation starts - default 0)
+
+#### Returns:
+1. `animation` Animation in use
+
+#### Usage:
+
+```lua
+local mainFrame = basalt.createFrame()
+local testButton = mainFrame:addButton("buttonToAnimate")
+local aAnimation = mainFrame:addAnimation():setObject(testButton):changeTextColor({colors.red, colors.yellow, colors.green}, 2):play()
+```
+```xml
+
+
+ red
+ yellow
+ green
+ 2
+
+
+```
\ No newline at end of file
diff --git a/docs/objects/Animation/changeText.md b/docs/objects/Animation/changeText.md
new file mode 100644
index 0000000..e5a6019
--- /dev/null
+++ b/docs/objects/Animation/changeText.md
@@ -0,0 +1,28 @@
+## changeText
+Changes the text while animation is running
+
+#### Parameters:
+1. `table` multiple text strings - example: {"i", "am", "groot"}
+2. `number` duration in seconds
+3. `number` time - time when this part should begin (offset to when the animation starts - default 0)
+
+#### Returns:
+1. `animation` Animation in use
+
+#### Usage:
+
+```lua
+local mainFrame = basalt.createFrame()
+local testButton = mainFrame:addButton("buttonToAnimate")
+local aAnimation = mainFrame:addAnimation():setObject(testButton):changeText({"i", "am", "groot"}, 2):play()
+```
+```xml
+
+
+ i
+ am
+ groot
+ 2
+
+
+```
\ No newline at end of file
diff --git a/docs/objects/Animation/changeTextColor.md b/docs/objects/Animation/changeTextColor.md
new file mode 100644
index 0000000..26b9153
--- /dev/null
+++ b/docs/objects/Animation/changeTextColor.md
@@ -0,0 +1,28 @@
+## changeTextColor
+Changes the text color while the animation is running
+
+#### Parameters:
+1. `table` multiple color numbers - example: {colors.red, colors.yellow, colors.green}
+2. `number` duration in seconds
+3. `number` time - time when this part should begin (offset to when the animation starts - default 0)
+
+#### Returns:
+1. `animation` Animation in use
+
+#### Usage:
+
+```lua
+local mainFrame = basalt.createFrame()
+local testButton = mainFrame:addButton("buttonToAnimate")
+local aAnimation = mainFrame:addAnimation():setObject(testButton):changeTextColor({colors.red, colors.yellow, colors.green}, 2):play()
+```
+```xml
+
+
+ red
+ yellow
+ green
+ 2
+
+
+```
\ No newline at end of file
diff --git a/docs/objects/Animation/move.md b/docs/objects/Animation/move.md
new file mode 100644
index 0000000..094a8b3
--- /dev/null
+++ b/docs/objects/Animation/move.md
@@ -0,0 +1,25 @@
+## move
+Moves the object which got defined by setObject
+
+#### Parameters:
+1. `number` x coordinate
+2. `number` y coordinate
+3. `number` duration in seconds
+4. `number` time - time when this part should begin (offset to when the animation starts - default 0)
+5. `table` object - optional, you could also define the object here
+
+#### Returns:
+1. `animation` Animation in use
+
+#### Usage:
+* Takes 2 seconds to move the object from its current position to x15 y3
+```lua
+local mainFrame = basalt.createFrame()
+local testButton = mainFrame:addButton("buttonToAnimate")
+local aAnimation = mainFrame:addAnimation():setObject(testButton):move(15,3,2):play()
+```
+```xml
+
+1562
+
+```
\ No newline at end of file
diff --git a/docs/objects/Animation/offset.md b/docs/objects/Animation/offset.md
new file mode 100644
index 0000000..7f99a4d
--- /dev/null
+++ b/docs/objects/Animation/offset.md
@@ -0,0 +1,25 @@
+## offset
+Changes the offset on the object which got defined by setObject
+
+#### Parameters:
+1. `number` x offset
+2. `number` y offset
+3. `number` duration in seconds
+4. `number` time - time when this part should begin (offset to when the animation starts - default 0)
+5. `table` object - optional, you could also define the object here
+
+#### Returns:
+1. `animation` Animation in use
+
+#### Usage:
+
+```lua
+local mainFrame = basalt.createFrame()
+local subFrame = mainFrame:addFrame("frameToAnimate")
+local aAnimation = mainFrame:addAnimation():setObject(subFrame):offset(1,12,1):play()
+```
+```xml
+
+1121
+
+```
\ No newline at end of file
diff --git a/docs/objects/Animation/onDone.md b/docs/objects/Animation/onDone.md
new file mode 100644
index 0000000..0ecc8ae
--- /dev/null
+++ b/docs/objects/Animation/onDone.md
@@ -0,0 +1,35 @@
+## onDone
+`onDone(self)`
+This is a event which gets fired as soon as the animation has finished.
+
+```lua
+local basalt = require("Basalt")
+
+local mainFrame = basalt.createFrame()
+local testButton = mainFrame:addButton("buttonToAnimate")
+local aAnimation = mainFrame:addAnimation():setObject(testButton):changeTextColor({colors.red, colors.yellow, colors.green}, 2):play()
+aAnimation:onDone(function()
+ basalt.debug("The animation is done")
+end)
+```
+
+In XML you are also able to queue multiple animations, like this:
+
+```xml
+
+
+ red
+ yellow
+ green
+ 2
+
+
+
+
+ red
+ yellow
+ green
+ 2
+
+
+```
\ No newline at end of file
diff --git a/docs/objects/Animation/play.md b/docs/objects/Animation/play.md
new file mode 100644
index 0000000..ff550d5
--- /dev/null
+++ b/docs/objects/Animation/play.md
@@ -0,0 +1,16 @@
+## play
+Plays the animation
+#### Parameters:
+1. `boolean` Whether it will loop forever, will most likely be replaced with a count in the future
+
+#### Returns:
+1. `animation` Animation in use
+
+#### Usage:
+```lua
+local mainFrame = basalt.createFrame()
+local testButton = mainFrame:addButton()
+local aAnimation = mainFrame:addAnimation():add(function() testButton:setBackground(colors.black) end):wait(1):add(function() testButton:setBackground(colors.gray) end):wait(1):add(function() testButton:setBackground(colors.lightGray) end)
+
+aAnimation:play() -- changes the background color of that button from black to gray and then to lightGray
+```
\ No newline at end of file
diff --git a/docs/objects/Animation/setObject.md b/docs/objects/Animation/setObject.md
new file mode 100644
index 0000000..71070a4
--- /dev/null
+++ b/docs/objects/Animation/setObject.md
@@ -0,0 +1,24 @@
+## setObject
+Sets the object which the animation should reposition/resize
+
+#### Parameters:
+1. `table` object
+
+#### Returns:
+1. `animation` Animation in use
+
+#### Usage:
+
+```lua
+local mainFrame = basalt.createFrame()
+local testButton = mainFrame:addButton()
+local aAnimation = mainFrame:addAnimation():setObject(testButton)
+```
+
+```lua
+local mainFrame = basalt.createFrame()
+local testButton = mainFrame:addButton("buttonToAnimate")
+```
+```xml
+
+```
\ No newline at end of file
diff --git a/docs/objects/Animation/size.md b/docs/objects/Animation/size.md
new file mode 100644
index 0000000..36887be
--- /dev/null
+++ b/docs/objects/Animation/size.md
@@ -0,0 +1,24 @@
+## size
+Changes the size on the object which got defined by setObject
+
+#### Parameters:
+1. `number` width
+2. `number` height
+3. `number` duration in seconds
+4. `number` time - time when this part should begin (offset to when the animation starts - default 0)
+5. `table` object - optional, you could also define the object here
+
+#### Returns:
+1. `animation` Animation in use
+
+#### Usage:
+```lua
+local mainFrame = basalt.createFrame()
+local testButton = mainFrame:addButton("buttonToAnimate")
+local aAnimation = mainFrame:addAnimation():setObject(testButton):size(15,3,1):play()
+```
+```xml
+
+1531
+
+```
\ No newline at end of file
diff --git a/docs/objects/Animation/wait.md b/docs/objects/Animation/wait.md
new file mode 100644
index 0000000..f270479
--- /dev/null
+++ b/docs/objects/Animation/wait.md
@@ -0,0 +1,16 @@
+## wait
+Sets a wait timer for the next function after the previous function got executed, no wait timer calls the next function immediately
+#### Parameters:
+1. `number` The length of delay between the functions _(in seconds)_
+
+#### Returns:
+1. `animation` Animation in use
+
+#### Usage:
+```lua
+local mainFrame = basalt.createFrame()
+local testButton = mainFrame:addButton()
+local aAnimation = mainFrame:addAnimation():add(function() testButton:setPosition(3,3) end):wait(1):add(function() testButton:setPosition(1,1,"r") end):wait(2):add(function() testButton:setPosition(1,1,"r") end)
+
+aAnimation:play()
+```
\ No newline at end of file
diff --git a/docs/objects/Basalt.md b/docs/objects/Basalt.md
index 844f211..ac6393d 100644
--- a/docs/objects/Basalt.md
+++ b/docs/objects/Basalt.md
@@ -1,201 +1,37 @@
+This is the UI Manager and the first thing you want to access.
Before you can access Basalt, you need to add the following code on top of your file:
-`local basalt = require("Basalt")`
+`local basalt = require("basalt")`
-Now you are able to access the following methods:
+require loads the UI Framework into your project.
-## basalt.createFrame
-Create a base-frame (main frame)
-#### Parameters:
-1. `string` name
+Now you are able to access the following list of methods:
-#### Returns:
-1. `frame` object
+| | |
+|---|---|
+|[createFrame](objects/Basalt/createFrame.md)|Creates a new base frame
+|[removeFrame](objects/Basalt/removeFrame.md)|Removes a previously created base frame
+|[getFrame](objects/Basalt/getFrame.md)|Returns a frame object by it's id
+|[getActiveFrame](objects/Basalt/getActiveFrame.md)|Returns the currently active base frame
+|[autoUpdate](objects/Basalt/autoUpdate.md)|Starts the event and draw listener
+|[update](objects/Basalt/update.md)|Starts the event and draw listener once
+|[stopUpdate](objects/Basalt/stopUpdate.md)|Stops the currently active event and draw listener
+|[isKeyDown](objects/Basalt/isKeyDown.md)|Returns if the key is held down
+|[debug](objects/Basalt/debug.md)|Writes something into the debug console
+|[log](objects/Basalt/log.md)|Writes something into the log file
+|[setTheme](objects/Basalt/setTheme.md)|Changes the base theme of basalt
+|[setVariable](objects/Basalt/setVariable.md)|Sets a variable which you can access via XML
+|[schedule](objects/Basalt/schedule.md)|Schedules a new task
-#### Usage:
-* Create and show a frame with id "myFirstFrame"
+# Examples
+
+Here is a lua example on how to create a empty base frame and start basalt's listener.
```lua
-local mainFrame = basalt.createFrame("myFirstFrame")
-```
+local basalt = require("basalt") -- we load the UI Framework into our project
-## basalt.removeFrame
-Removes a base frame
+local main = basalt.createFrame() -- we create a base frame - on that frame we are able to add object's
-#### Parameters:
-1. `string` name
+-- here we would add additional object's
-#### Usage:
-* Removes the previously created frame with id "myFirstFrame"
-```lua
-local mainFrame = basalt.createFrame("myFirstFrame")
-basalt.removeFrame("myFirstFrame")
-```
-
-## basalt.getFrame
-Returns a base frame with the given name
-#### Parameters:
-1. `string` name
-
-#### Returns:
-1. `frame` object
-
-#### Usage:
-* Creates, fetches and shows the "myFirstFrame" object
-```lua
-basalt.createFrame("myFirstFrame"):hide()
-basalt.getFrame("myFirstFrame"):show()
-```
-
-## basalt.getActiveFrame
-Returns the currently active base frame
-
-#### Returns:
-1. `frame` The current frame
-
-#### Usage:
-* Displays the active frame name in the debug console
-```lua
-basalt.createFrame()
-basalt.debug(basalt.getActiveFrame():getName()) -- returns the uuid
-```
-
-## basalt.autoUpdate
-Starts the draw and event handler until basalt.stopUpdate() is called
-
-#### Usage:
-* Enable the basalt updates, otherwise the screen will not continue to update
-```lua
-local mainFrame = basalt.createFrame()
-basalt.autoUpdate()
-```
-
-## basalt.update
-Calls the draw and event handler once - this gives more flexibility about which events basalt should process. For example you could filter the terminate event.
-
-#### Parameters:
-1. `string` The event to be received
-2. `...` Additional event variables to capture
-
-#### Usage:
-* Creates and starts a custom update cycle
-```lua
-local mainFrame = basalt.createFrame()
-local aButton = mainFrame:addButton():setPosition(2,2)
-while true do
- basalt.update(os.pullEventRaw())
-end
-```
-
-## basalt.stopUpdate
-Stops the automatic draw and event handler which got started by basalt.autoUpdate()
-
-#### Usage:
-* When the quit button is clicked, the button stops basalt auto updates
-```lua
-local mainFrame = basalt.createFrame()
-local aButton = mainFrame:addButton():setPosition(2,2):setText("Stop Basalt!")
-aButton:onClick(function()
-basalt.stopUpdate()
-end)
-basalt.autoUpdate()
-```
-
-## basalt.isKeyDown
-Checks if the user is currently holding a key
-
-#### Parameters:
-1. `number` key code (use the keys table for that)
-
-#### Returns:
-1. `boolean` true or false
-
-#### Usage:
-* Shows a debug message with true or false if the left ctrl key is down, as soon as you click on the button.
-```lua
-local mainFrame = basalt.createFrame()
-local aButton = mainFrame:addButton():setPosition(2,2):setText("Check Ctrl")
-aButton:onClick(function()
- basalt.debug(basalt.isKeyDown(keys.leftCtrl))
-end)
-basalt.autoUpdate()
-```
-
-## basalt.debug
-creates a label with some information on the main frame on the bottom left, if you click on that label it will open a log view for you. See it as the new print for debugging
-
-You can also edit the default debug Label (change position, change color or whatever you want) by accessing the variable basalt.debugLabel
-which returns the debug Label.
-
-Also basalt.debugFrame and basalt.debugList are available.
-
-#### Parameters:
-1. `...` (multiple parameters are possible, like print does)
-
-#### Usage:
-* Prints "Hello! ^-^" to the debug console
-```lua
-basalt.debug("Hello! ", "^-^")
-```
-
-## basalt.setTheme
-Sets the base theme of the project! Make sure to cover all existing objects, otherwise it will result in errors. A good example is [theme](https://github.com/Pyroxenium/Basalt/blob/master/Basalt/theme.lua)
-
-#### Parameters:
-1. `table` theme layout look into [theme](https://github.com/Pyroxenium/Basalt/blob/master/Basalt/theme.lua) for a example
-
-#### Usage:
-* Sets the default theme of basalt.
-```lua
-basalt.setTheme({
- ButtonBG = colors.yellow,
- ButtonText = colors.red,
- ...,
-})
-```
-
-## basalt.setVariable
-This stores a variable which you're able to access via xml. You are also able to add a function, which then gets called by object events created in XML.
-
-#### Parameters:
-1. `string` a key name
-1. `any` any variable
-
-#### Usage:
-* Adds a function to basalt.
-```lua
-basalt.setVariable("clickMe", function()
- basalt.debug("I got clicked")
-end)
-```
-```xml
-
-```
-
-## basalt.schedule
-Schedules a function which gets called in a coroutine. After the coroutine is finished it will get destroyed immediatly. It's something like threads, but with some limits.
-
-#### Parameters:
-1. `function` a function which should get executed
-
-#### Returns:
-1. `function` it returns the function which you have to execute in order to start the coroutine
-
-#### Usage:
-* Creates a schedule which switches the color between red and gray
-```lua
-local mainFrame = basalt.createFrame()
-local aButton = mainFrame:addButton():setText("Click me")
-aButton:onClick(basalt.schedule(function(self)
- self:setBackground(colors.red)
- os.sleep(0.1)
- self:setBackground(colors.gray)
- os.sleep(0.1)
- self:setBackground(colors.red)
- os.sleep(0.1)
- self:setBackground(colors.gray)
- os.sleep(0.1)
- self:setBackground(colors.red)
- os.sleep(0.1)
- self:setBackground(colors.gray)
-end))
-```
+basalt.autoUpdate() -- we start listening to incoming events and draw stuff on the screen
+```
\ No newline at end of file
diff --git a/docs/objects/Basalt/autoUpdate.md b/docs/objects/Basalt/autoUpdate.md
new file mode 100644
index 0000000..e7697cb
--- /dev/null
+++ b/docs/objects/Basalt/autoUpdate.md
@@ -0,0 +1,13 @@
+## basalt.autoUpdate
+This starts the event and draw handler for you. The listeners will run until you stop them.
+
+#### Parameters:
+1. `boolean` optional - if you use false as the first parameter it would stop the listeners.
+
+#### Usage:
+* Enable the basalt listeners, otherwise the screen will not continue to update
+```lua
+local main = basalt.createFrame()
+
+basalt.autoUpdate()
+```
\ No newline at end of file
diff --git a/docs/objects/Basalt/createFrame.md b/docs/objects/Basalt/createFrame.md
new file mode 100644
index 0000000..5650aa5
--- /dev/null
+++ b/docs/objects/Basalt/createFrame.md
@@ -0,0 +1,27 @@
+## basalt.createFrame
+Creates a new base-frame, you can have as many base-frames as you want, but only 1 can be active (visible) at the same time.
+You can always switch between your base frames.
+
+Only the currently active base-frame listens to incoming events (except for some events like time-events and peripheral-events)
+
+#### Parameters:
+1. `string` id - optional (if you dont set a id it will automatically create a uuid for you)
+
+#### Returns:
+1. `frame` object
+
+#### Usage:
+* How to use multiple base frames:
+```lua
+local main1 = basalt.createFrame() -- Visible base frame on program start
+local main2 = basalt.createFrame()
+local main3 = basalt.createFrame()
+main1:addButton()
+ :setPosition(2,2)
+ :setText("Switch")
+ :onClick(function()
+ main2:show() -- this function automatically "hides" the first one and shows the second one
+ end)
+main2:addLabel()
+ :setText("We are currently on main2")
+```
\ No newline at end of file
diff --git a/docs/objects/Basalt/debug.md b/docs/objects/Basalt/debug.md
new file mode 100644
index 0000000..948e1e0
--- /dev/null
+++ b/docs/objects/Basalt/debug.md
@@ -0,0 +1,22 @@
+## basalt.debug
+Creates a label with some information on the main frame on the bottom left. When you click on that label it will open a log view for you. See it as the new print for debugging
+
+You can also edit the default debug Label (change position, change color or whatever you want) by accessing the variable basalt.debugLabel
+which returns the debug Label.
+
+Also basalt.debugFrame and basalt.debugList are available.
+
+#### Parameters:
+1. `...` (multiple parameters are possible, like print does)
+
+#### Usage:
+* Prints "Hello! ^-^" to the debug console
+```lua
+basalt.debug("Hello! ", "^-^")
+```
+
+* Changes the debug label's anchor
+```lua
+basalt.debugLabel:setAnchor("topLeft") -- default anchor is bottomLeft
+basalt.debug("Hello!")
+```
\ No newline at end of file
diff --git a/docs/objects/Basalt/getActiveFrame.md b/docs/objects/Basalt/getActiveFrame.md
new file mode 100644
index 0000000..495e1d5
--- /dev/null
+++ b/docs/objects/Basalt/getActiveFrame.md
@@ -0,0 +1,12 @@
+## basalt.getActiveFrame
+Returns the currently active/visible base frame
+
+#### Returns:
+1. `frame` The current frame
+
+#### Usage:
+* Displays the active frame name in the debug console
+```lua
+local main = basalt.createFrame()
+basalt.debug(basalt.getActiveFrame():getName()) -- returns the id
+```
\ No newline at end of file
diff --git a/docs/objects/Basalt/getFrame.md b/docs/objects/Basalt/getFrame.md
new file mode 100644
index 0000000..ad70e02
--- /dev/null
+++ b/docs/objects/Basalt/getFrame.md
@@ -0,0 +1,23 @@
+## basalt.getFrame
+Returns a base frame by the given id
+
+#### Parameters:
+1. `string` id
+
+#### Returns:
+1. `frame` object
+
+#### Usage:
+* Creates, fetches and shows the "myFirstFrame" object
+```lua
+local main = basalt.createFrame("firstBaseFrame")
+local main2 = basalt.createFrame("secondBaseFrame")
+main:addButton()
+ :setText("Show")
+ :onClick(function()
+ local frame2 = basalt.getFrame("secondBaseFrame")
+ if(frame2~=nil)then
+ frame2:show()
+ end
+ end)
+```
\ No newline at end of file
diff --git a/docs/objects/Basalt/isKeyDown.md b/docs/objects/Basalt/isKeyDown.md
new file mode 100644
index 0000000..cdae2a8
--- /dev/null
+++ b/docs/objects/Basalt/isKeyDown.md
@@ -0,0 +1,21 @@
+## basalt.isKeyDown
+Checks if the user is currently holding a key
+
+#### Parameters:
+1. `number` key code (use the keys table for that)
+
+#### Returns:
+1. `boolean` true or false
+
+#### Usage:
+* Shows a debug message with true or false if the left ctrl key is down, as soon as you click on the button.
+```lua
+local main = basalt.createFrame()
+local aButton = mainFrame:addButton()
+ :setPosition(2,2)
+ :setText("Check Ctrl")
+ :onClick(function()
+ basalt.debug(basalt.isKeyDown(keys.leftCtrl))
+ end)
+basalt.autoUpdate()
+```
\ No newline at end of file
diff --git a/docs/objects/Basalt/log.md b/docs/objects/Basalt/log.md
new file mode 100644
index 0000000..dc6bba2
--- /dev/null
+++ b/docs/objects/Basalt/log.md
@@ -0,0 +1,15 @@
+## basalt.log
+This writes something into a file. The main goal is to make debugging errors easier. Lets say you'r program is crashing and
+you don't know why, you could use basalt.log
+
+The log files will automatically removed after you start your program again
+
+#### Parameters:
+1. `string` The text to write into the log file
+2. `string` - optional (default: "Debug") - the type to write
+
+#### Usage:
+* Writes "Hello!" into the log file
+```lua
+basalt.log("Hello!")
+```
diff --git a/docs/objects/Basalt/removeFrame.md b/docs/objects/Basalt/removeFrame.md
new file mode 100644
index 0000000..999fca6
--- /dev/null
+++ b/docs/objects/Basalt/removeFrame.md
@@ -0,0 +1,17 @@
+## basalt.removeFrame
+Removes the base frame by it's id. This only works for base-frames.
+
+#### Parameters:
+1. `string` id
+
+#### Usage:
+* Removes the previously created frame with id "myFirstFrame"
+```lua
+local main = basalt.createFrame("firstBaseFrame")
+local main2 = basalt.createFrame("secondBaseFrame")
+main:addButton()
+ :setText("Remove")
+ :onClick(function()
+ basalt.removeFrame(main2:getName()) -- you can use main2:getName() to find out the id or just use "secondBaseFrame"
+ end)
+```
\ No newline at end of file
diff --git a/docs/objects/Basalt/schedule.md b/docs/objects/Basalt/schedule.md
new file mode 100644
index 0000000..e8a995a
--- /dev/null
+++ b/docs/objects/Basalt/schedule.md
@@ -0,0 +1,28 @@
+## basalt.schedule
+Schedules a function which gets called in a coroutine. After the coroutine is finished it will get destroyed immediatly. It's something like threads, but with some limits.
+
+#### Parameters:
+1. `function` a function which should get executed
+
+#### Returns:
+1. `function` it returns the function which you have to execute in order to start the coroutine
+
+#### Usage:
+* Creates a schedule which switches the color between red and gray
+```lua
+local mainFrame = basalt.createFrame()
+local aButton = mainFrame:addButton():setText("Click me")
+aButton:onClick(basalt.schedule(function(self)
+ self:setBackground(colors.red)
+ os.sleep(0.1)
+ self:setBackground(colors.gray)
+ os.sleep(0.1)
+ self:setBackground(colors.red)
+ os.sleep(0.1)
+ self:setBackground(colors.gray)
+ os.sleep(0.1)
+ self:setBackground(colors.red)
+ os.sleep(0.1)
+ self:setBackground(colors.gray)
+end))
+```
\ No newline at end of file
diff --git a/docs/objects/Basalt/setTheme.md b/docs/objects/Basalt/setTheme.md
new file mode 100644
index 0000000..2d8b58c
--- /dev/null
+++ b/docs/objects/Basalt/setTheme.md
@@ -0,0 +1,15 @@
+## basalt.setTheme
+Sets the base theme of the project! Make sure to cover all existing objects, otherwise it will result in errors. A good example is [theme](https://github.com/Pyroxenium/Basalt/blob/master/Basalt/theme.lua)
+
+#### Parameters:
+1. `table` theme layout look into [theme](https://github.com/Pyroxenium/Basalt/blob/master/Basalt/theme.lua) for a example
+
+#### Usage:
+* Sets the default theme of basalt.
+```lua
+basalt.setTheme({
+ ButtonBG = colors.yellow,
+ ButtonText = colors.red,
+ ...,
+})
+```
\ No newline at end of file
diff --git a/docs/objects/Basalt/setVariable.md b/docs/objects/Basalt/setVariable.md
new file mode 100644
index 0000000..c9a942b
--- /dev/null
+++ b/docs/objects/Basalt/setVariable.md
@@ -0,0 +1,17 @@
+## basalt.setVariable
+This stores a variable which you're able to access via xml. You are also able to add a function, which then gets called by object events created in XML.
+
+#### Parameters:
+1. `string` a key name
+1. `any` any variable
+
+#### Usage:
+* Adds a function to basalt.
+```lua
+basalt.setVariable("clickMe", function()
+ basalt.debug("I got clicked")
+end)
+```
+```xml
+
+```
\ No newline at end of file
diff --git a/docs/objects/Basalt/stopUpdate.md b/docs/objects/Basalt/stopUpdate.md
new file mode 100644
index 0000000..dede180
--- /dev/null
+++ b/docs/objects/Basalt/stopUpdate.md
@@ -0,0 +1,15 @@
+## basalt.stopUpdate or basalt.stop
+Stops the automatic draw and event handler which got started by basalt.autoUpdate()
+
+#### Usage:
+* When the quit button is clicked, the button stops basalt's event listeners and draw handlers
+```lua
+local main = basalt.createFrame()
+local aButton = main:addButton()
+ :setPosition(2,2)
+ :setText("Stop Basalt!")
+ :onClick(function()
+ basalt.stopUpdate()
+ end)
+basalt.autoUpdate()
+```
\ No newline at end of file
diff --git a/docs/objects/Basalt/update.md b/docs/objects/Basalt/update.md
new file mode 100644
index 0000000..bc57a5b
--- /dev/null
+++ b/docs/objects/Basalt/update.md
@@ -0,0 +1,18 @@
+## basalt.update
+Calls the draw and event handler once - this gives more flexibility about which events basalt should process. For example you could filter the terminate event.
+Which means you have to pass the events into basalt.update.
+
+#### Parameters:
+1. `string` The event to be received
+2. `...` Additional event variables to capture
+
+#### Usage:
+* Creates and starts a custom update cycle
+```lua
+local mainFrame = basalt.createFrame()
+local aButton = mainFrame:addButton():setPosition(2,2)
+while true do
+ local ev = table.pack(os.pullEventRaw())
+ basalt.update(table.unpack(ev))
+end
+```
\ No newline at end of file
diff --git a/docs/objects/Button.md b/docs/objects/Button.md
index 425981a..3b00e7f 100644
--- a/docs/objects/Button.md
+++ b/docs/objects/Button.md
@@ -1,73 +1,19 @@
-Buttons are objects, which execute something by clicking on them.
+The button object is for creating buttons If you click on them, they should execute something. You decide what should happen when clicking on them.
-Remember button also inherits from [Object](objects/Object.md)
+[Object](objects/Object.md) methods also apply for buttons.
-## setText
-Sets the displayed button text
-#### Parameters:
-1. `string` the text the button should show
+| | |
+|---|---|
+|[setText](objects/Button/setText.md)|Changes the button text
+|[setHorizontalAlign](objects/Button/setHorizontalAlign.md)|Changes the horizontal text position
+|[setVerticalAlign](objects/Button/setVerticalAlign.md)|Changes the vertical text position
-#### Returns:
-1. `object` The object in use
-
-#### Usage:
-* Creates a button with "Click me!" as text.
-```lua
-local mainFrame = basalt.createFrame()
-local button = mainFrame:addButton():setText("Click me!")
-```
-```xml
-
-```
-
-## setHorizontalAlign
-Sets the horizontal align of the button text
-
-#### Parameters:
-1. `string` the position as string ("left", "center", "right") - default is center.
-
-#### Returns:
-1. `object` The object in use
-
-#### Usage:
-* Sets the button's horizontal text align to right.
-```lua
-local mainFrame = basalt.createFrame()
-local button = mainFrame:addButton()
- :setText("Click me!")
- :setHorizontalAlign("right")
-```
-```xml
-
-```
-
-## setVerticalAlign
-Sets the vertical align of the button text
-
-#### Parameters:
-1. `string` the position as string ("top", "center", "bottom") - default is center.
-
-#### Returns:
-1. `object` The object in use
-
-#### Usage:
-* Sets the button's horizontal text align to right and the vertical text align to bottom.
-```lua
-local mainFrame = basalt.createFrame()
-local button = mainFrame:addButton()
- :setText("Click me!")
- :setHorizontalAlign("right")
- :setVerticalAlign("bottom")
-```
-```xml
-
-```
# Example
This is a example on how you would create a fully working button:
```lua
-local mainFrame = basalt.createFrame()
-local aButton = mainFrame:addButton():setText("Click")
+local main = basalt.createFrame()
+local aButton = main:addButton():setText("Click")
aButton:onClick(function(self,event,button,x,y)
if(event=="mouse_click")and(button==1)then
@@ -76,9 +22,9 @@ aButton:onClick(function(self,event,button,x,y)
end)
```
-and this would be the xml way to do it:
+and this would be the xml way:
```lua
-local mainFrame = basalt.createFrame():addLayout("example.xml")
+local main = basalt.createFrame():addLayout("example.xml")
basalt.setVariable("buttonClick", function(self,event,button,x,y)
if(event=="mouse_click")and(button==1)then
diff --git a/docs/objects/Button/setHorizontalAlign.md b/docs/objects/Button/setHorizontalAlign.md
new file mode 100644
index 0000000..dbf3c61
--- /dev/null
+++ b/docs/objects/Button/setHorizontalAlign.md
@@ -0,0 +1,20 @@
+## setHorizontalAlign
+Sets the horizontal align of the button text
+
+#### Parameters:
+1. `string` the position as string ("left", "center", "right") - default is center.
+
+#### Returns:
+1. `object` The object in use
+
+#### Usage:
+* Sets the button's horizontal text align to right.
+```lua
+local mainFrame = basalt.createFrame()
+local button = mainFrame:addButton()
+ :setText("Click me!")
+ :setHorizontalAlign("right")
+```
+```xml
+
+```
\ No newline at end of file
diff --git a/docs/objects/Button/setText.md b/docs/objects/Button/setText.md
new file mode 100644
index 0000000..f7f802b
--- /dev/null
+++ b/docs/objects/Button/setText.md
@@ -0,0 +1,17 @@
+## setText
+Sets the displayed button text
+#### Parameters:
+1. `string` the text the button should show
+
+#### Returns:
+1. `object` The object in use
+
+#### Usage:
+* Creates a button with "Click me!" as text.
+```lua
+local mainFrame = basalt.createFrame()
+local button = mainFrame:addButton():setText("Click me!")
+```
+```xml
+
+```
\ No newline at end of file
diff --git a/docs/objects/Button/setVerticalAlign.md b/docs/objects/Button/setVerticalAlign.md
new file mode 100644
index 0000000..78e3d5e
--- /dev/null
+++ b/docs/objects/Button/setVerticalAlign.md
@@ -0,0 +1,21 @@
+## setVerticalAlign
+Sets the vertical align of the button text
+
+#### Parameters:
+1. `string` the position as string ("top", "center", "bottom") - default is center.
+
+#### Returns:
+1. `object` The object in use
+
+#### Usage:
+* Sets the button's horizontal text align to right and the vertical text align to bottom.
+```lua
+local mainFrame = basalt.createFrame()
+local button = mainFrame:addButton()
+ :setText("Click me!")
+ :setHorizontalAlign("right")
+ :setVerticalAlign("bottom")
+```
+```xml
+
+```
\ No newline at end of file
diff --git a/docs/objects/Checkbox.md b/docs/objects/Checkbox.md
index d46cd92..c3862b9 100644
--- a/docs/objects/Checkbox.md
+++ b/docs/objects/Checkbox.md
@@ -1,14 +1,17 @@
-With checkbox objects the user can set a bool to true or false
+With checkboxes the user can set a boolean to true or false by clicking on them.
-Remember checkbox also inherits from [Object](objects/Object.md)
+[Object](objects/Object.md) methods also apply for checkboxes.
+
+| | |
+|---|---|
+|[setSymbol](objects/Checkbox/setSymbol.md)|Changes the symbol when checkbox is checked
-A checkbox does not have any custom methods. All required methods are provided by the base [object](objects/Object.md) class.
# Example
This is how you would create a event which gets fired as soon as the value gets changed:
```lua
-local mainFrame = basalt.createFrame()
-local aCheckbox = mainFrame:addCheckbox()
+local main = basalt.createFrame()
+local aCheckbox = main:addCheckbox()
local function checkboxChange(self)
local checked = self:getValue()
@@ -19,7 +22,7 @@ aCheckbox:onChange(checkboxChange)
also possible via xml:
```lua
-local mainFrame = basalt.createFrame():addLayout("example.xml")
+local main = basalt.createFrame():addLayout("example.xml")
basalt.setVariable("checkboxChange", function(self)
local checked = self:getValue()
diff --git a/docs/objects/Checkbox/setSymbol.md b/docs/objects/Checkbox/setSymbol.md
new file mode 100644
index 0000000..e69de29
diff --git a/docs/objects/Dropdown.md b/docs/objects/Dropdown.md
index 1c5c7d7..d8e11c0 100644
--- a/docs/objects/Dropdown.md
+++ b/docs/objects/Dropdown.md
@@ -1,307 +1,31 @@
Dropdowns are objects where the user can click on a button, this will open a list where the user can choose from.
-If you want to access values inside items this is how the table for single items is made (just a example):
+[Object](objects/Object.md) methods also apply for dropdowns.
+
+| | |
+|---|---|
+|[addItem](objects/Dropdown/addItem.md)|Adds a new item into the list
+|[removeItem](objects/Dropdown/removeItem.md)|Removes a item from the list
+|[editItem](objects/Dropdown/editItem.md)|Changes a already existing item in the list
+|[getItem](objects/Dropdown/getItem.md)|Returns a item by its index
+|[getItemCount](objects/Dropdown/getItemCount.md)|Returns the item count
+|[getAll](objects/Dropdown/getAll.md)|Returns the entire list as a table
+|[selectItem](objects/Dropdown/selectItem.md)|Selects a item
+|[clear](objects/Dropdown/clear.md)|Makes the entire list empty
+|[getItemIndex](objects/Dropdown/getItemIndex.md)|Returns the currently active item index
+|[setSelectedItem](objects/Dropdown/setSelectedItem.md)|Changes the default bg and fg, when the user selects a item
+|[setOffset](objects/Dropdown/setOffset.md)|Changes the list offset
+|[getOffset](objects/Dropdown/getOffset.md)|Returns the current offset
+|[setDropdownSize](objects/Dropdown/setDropdownSize.md)|Changes the dropdown size
+
+
+A item-table in dropdowns looks like the following example:
```lua
item = {
- text="1. Entry",
- bgCol=colors.black,
- fgCol=colors.white
- args = {}
+ text="1. Entry", -- the text its showing
+ bgCol=colors.black, -- the background color
+ fgCol=colors.white -- the foreground color
+ args = {} -- custom args you want to pass, which you will be able to access in for example onChange events
}
-```
-
-Remember Dropdown also inherits from [Object](objects/Object.md)
-
-## addItem
-Adds a item into the dropdown
-
-#### Parameters:
-1. `string` The entry name
-2. `number|color` unique default background color - optional
-3. `number|color` unique default text color - optional
-4. `any` any value - you could access this later in a :onChange() event (you need to use :getValue()) - optional
-
-#### Returns:
-1. `object` The object in use
-
-#### Usage:
-* Creates a default dropdown with 3 entries
-```lua
-local mainFrame = basalt.createFrame()
-local aDropdown = mainFrame:addDropdown()
-aDropdown:addItem("1. Entry")
-aDropdown:addItem("2. Entry",colors.yellow)
-aDropdown:addItem("3. Entry",colors.yellow,colors.green)
-```
-```xml
-
- 1. Entry
- 2. Entryyellow
- 3. Entryyellowgreen
-
-```
-
-## removeItem
-Removes a item from the dropdown
-
-#### Parameters:
-1. `number` The index which should get removed
-
-#### Returns:
-1. `object` The object in use
-
-#### Usage:
-* Creates a default dropdown with 3 entries and removes the second one.
-```lua
-local mainFrame = basalt.createFrame()
-local aDropdown = mainFrame:addDropdown()
-aDropdown:addItem("1. Entry")
-aDropdown:addItem("2. Entry",colors.yellow)
-aDropdown:addItem("3. Entry",colors.yellow,colors.green)
-aDropdown:removeItem(2)
-```
-
-## editItem
-Edits a item from the dropdown
-
-#### Parameters:
-1. `number` The index which should be edited
-2. `string` The new item name
-3. `number` the new item background color - optional
-4. `number` The new item text color - optional
-5. `any` New additional information - optional
-
-#### Returns:
-1. `object` The object in use
-
-#### Usage:
-* Creates a default dropdown with 3 entries and edits the second one.
-```lua
-local mainFrame = basalt.createFrame()
-local aDropdown = mainFrame:addDropdown()
-aDropdown:addItem("1. Entry")
-aDropdown:addItem("2. Entry",colors.yellow)
-aDropdown:addItem("3. Entry",colors.yellow,colors.green)
-aDropdown:editItem(2, "Still 2. Entry", colors.red)
-```
-
-## getItem
-Returns a item by index
-
-#### Parameters:
-1. `number` The index which should be returned
-
-#### Returns:
-1. `table` The item table example: {text="1. Entry", bgCol=colors.black, fgCol=colors.white}
-
-#### Usage:
-* Creates a default dropdown with 3 entries and edits the second one.
-```lua
-local mainFrame = basalt.createFrame()
-local aDropdown = mainFrame:addDropdown()
-aDropdown:addItem("1. Entry")
-aDropdown:addItem("2. Entry",colors.yellow)
-aDropdown:addItem("3. Entry",colors.yellow,colors.green)
-basalt.debug(aDropdown:getItem(2).text)
-```
-
-## getItemCount
-Returns the current item count
-
-#### Returns:
-1. `number` The item list count
-
-#### Usage:
-* Creates a default dropdown with 3 entries and prints the current item count.
-```lua
-local mainFrame = basalt.createFrame()
-local aDropdown = mainFrame:addDropdown()
-aDropdown:addItem("1. Entry")
-aDropdown:addItem("2. Entry",colors.yellow)
-aDropdown:addItem("3. Entry",colors.yellow,colors.green)
-basalt.debug(aDropdown:getItemCount())
-```
-
-## getAll
-Returns all items as table
-
-#### Returns:
-1. `table` All items
-
-#### Usage:
-* Creates a default menubar with 3 entries and prints a table.
-```lua
-local mainFrame = basalt.createFrame()
-local aDropdown = mainFrame:addDropdown()
-aDropdown:addItem("1. Entry")
-aDropdown:addItem("2. Entry",colors.yellow)
-aDropdown:addItem("3. Entry",colors.yellow,colors.green)
-basalt.debug(aDropdown:getAll())
-```
-
-## selectItem
-selects a item in the dropdown (same as a player would click on a item)
-
-#### Parameters:
-1. `number` The index which should get selected
-
-#### Returns:
-1. `object` The object in use
-
-#### Usage:
-* Creates a default dropdown with 3 entries and selects the second entry.
-```lua
-local mainFrame = basalt.createFrame()
-local aDropdown = mainFrame:addDropdown()
-aDropdown:addItem("1. Entry")
-aDropdown:addItem("2. Entry",colors.yellow)
-aDropdown:addItem("3. Entry",colors.yellow,colors.green)
-aDropdown:selectItem(2)
-```
-
-## clear
-Removes all items.
-
-#### Returns:
-1. `object` The object in use
-
-#### Usage:
-* Creates a default dropdown with 3 entries and removes them immediatley. Which makes no sense.
-```lua
-local mainFrame = basalt.createFrame()
-local aDropdown = mainFrame:addDropdown()
-aDropdown:addItem("1. Entry")
-aDropdown:addItem("2. Entry",colors.yellow)
-aDropdown:addItem("3. Entry",colors.yellow,colors.green)
-aDropdown:clear()
-```
-
-## getItemIndex
-returns the item index of the currently selected item
-
-#### Returns:
-1. `number` The current index
-
-#### Usage:
-* Creates a default dropdown with 3 entries selects the second entry and prints the currently selected index.
-```lua
-local mainFrame = basalt.createFrame()
-local aDropdown = mainFrame:addDropdown()
-aDropdown:addItem("1. Entry")
-aDropdown:addItem("2. Entry",colors.yellow)
-aDropdown:addItem("3. Entry",colors.yellow,colors.green)
-aDropdown:selectItem(2)
-basalt.debug(aDropdown:getItemIndex())
-```
-
-## setSelectedItem
-Sets the background and the foreground of the item which is currently selected
-
-#### Parameters:
-1. `number|color` The background color which should be used
-2. `number|color` The text color which should be used
-
-#### Returns:
-1. `object` The object in use
-
-#### Usage:
-* Creates a default dropdown with 4 entries and sets the selection background color to green.
-```lua
-local mainFrame = basalt.createFrame()
-local aDropdown = mainFrame:addDropdown()
-aDropdown:addItem("1. Entry")
-aDropdown:addItem("2. Entry",colors.yellow)
-aDropdown:addItem("3. Entry",colors.yellow,colors.green)
-aDropdown:addItem("4. Entry")
-aDropdown:setSelectedItem(colors.green, colors.red)
-```
-```xml
-
- 1. Entry
- 2. Entryyellow
- 2. Entryyellowgreen
-
-```
-
-## setOffset
-Sets the offset of the dropdown (the same as you would scroll) - default is 0
-
-#### Parameters:
-1. `number` The offset value
-
-#### Returns:
-1. `object` The object in use
-
-#### Usage:
-* Creates a default dropdown with 6 entries and sets the offset to 3.
-```lua
-local mainFrame = basalt.createFrame()
-local aDropdown = mainFrame:addDropdown()
- :addItem("1. Entry")
- :addItem("2. Entry")
- :addItem("3. Entry")
- :addItem("4. Entry")
- :addItem("5. Entry")
- :addItem("6. Entry")
- :setOffset(3)
-```
-```xml
-
- 1. Entry
- 2. Entry
- 3. Entry
- 4. Entry
- 5. Entry
- 6. Entry
-
-```
-
-## getOffset
-Returns the current index offset
-
-#### Returns:
-1. `number` offset value
-
-#### Usage:
-* Creates a default dropdown with 6 entries and sets the offset to 3, also prints the current offset.
-```lua
-local mainFrame = basalt.createFrame()
-local aDropdown = mainFrame:addDropdown()
- :addItem("1. Entry")
- :addItem("2. Entry")
- :addItem("3. Entry")
- :addItem("4. Entry")
- :addItem("5. Entry")
- :addItem("6. Entry")
- :setOffset(3)
-basalt.debug(aDropdown:getOffset())
-```
-
-## setDropdownSize
-Sets the size of the opened dropdown
-
-#### Parameters:
-1. `number` The width value
-2. `number` The height value
-
-#### Returns:
-1. `object` The object in use
-
-#### Usage:
-* Creates a default dropdown, adds 3 entries and sets the dropdown size to 15w, 8h
-```lua
-local mainFrame = basalt.createFrame()
-local aDropdown = mainFrame:addDropdown():setDropdownSize(15,8)
-aDropdown:addItem("1. Entry")
-aDropdown:addItem("2. Entry")
-aDropdown:addItem("3. Entry")
-```
-```xml
-
- 1. Entry
- 2. Entry
- 3. Entry
-
-```
-
+```
\ No newline at end of file
diff --git a/docs/objects/Dropdown/addItem.md b/docs/objects/Dropdown/addItem.md
new file mode 100644
index 0000000..30696cf
--- /dev/null
+++ b/docs/objects/Dropdown/addItem.md
@@ -0,0 +1,28 @@
+## addItem
+Adds a item into the dropdown
+
+#### Parameters:
+1. `string` The entry name
+2. `number|color` unique default background color - optional
+3. `number|color` unique default text color - optional
+4. `any` any value - you could access this later in a :onChange() event (you need to use :getValue()) - optional
+
+#### Returns:
+1. `object` The object in use
+
+#### Usage:
+* Creates a default dropdown with 3 entries
+```lua
+local mainFrame = basalt.createFrame()
+local aDropdown = mainFrame:addDropdown()
+aDropdown:addItem("1. Entry")
+aDropdown:addItem("2. Entry",colors.yellow)
+aDropdown:addItem("3. Entry",colors.yellow,colors.green)
+```
+```xml
+
+ 1. Entry
+ 2. Entryyellow
+ 3. Entryyellowgreen
+
+```
\ No newline at end of file
diff --git a/docs/objects/Dropdown/clear.md b/docs/objects/Dropdown/clear.md
new file mode 100644
index 0000000..5a0ac67
--- /dev/null
+++ b/docs/objects/Dropdown/clear.md
@@ -0,0 +1,16 @@
+## clear
+Removes all items.
+
+#### Returns:
+1. `object` The object in use
+
+#### Usage:
+* Creates a default dropdown with 3 entries and removes them immediatley. Which makes no sense.
+```lua
+local mainFrame = basalt.createFrame()
+local aDropdown = mainFrame:addDropdown()
+aDropdown:addItem("1. Entry")
+aDropdown:addItem("2. Entry",colors.yellow)
+aDropdown:addItem("3. Entry",colors.yellow,colors.green)
+aDropdown:clear()
+```
\ No newline at end of file
diff --git a/docs/objects/Dropdown/editItem.md b/docs/objects/Dropdown/editItem.md
new file mode 100644
index 0000000..e51c475
--- /dev/null
+++ b/docs/objects/Dropdown/editItem.md
@@ -0,0 +1,23 @@
+## editItem
+Edits a item from the dropdown
+
+#### Parameters:
+1. `number` The index which should be edited
+2. `string` The new item name
+3. `number` the new item background color - optional
+4. `number` The new item text color - optional
+5. `any` New additional information - optional
+
+#### Returns:
+1. `object` The object in use
+
+#### Usage:
+* Creates a default dropdown with 3 entries and edits the second one.
+```lua
+local mainFrame = basalt.createFrame()
+local aDropdown = mainFrame:addDropdown()
+aDropdown:addItem("1. Entry")
+aDropdown:addItem("2. Entry",colors.yellow)
+aDropdown:addItem("3. Entry",colors.yellow,colors.green)
+aDropdown:editItem(2, "Still 2. Entry", colors.red)
+```
\ No newline at end of file
diff --git a/docs/objects/Dropdown/getAll.md b/docs/objects/Dropdown/getAll.md
new file mode 100644
index 0000000..fdbbb26
--- /dev/null
+++ b/docs/objects/Dropdown/getAll.md
@@ -0,0 +1,16 @@
+## getAll
+Returns all items as table
+
+#### Returns:
+1. `table` All items
+
+#### Usage:
+* Creates a default menubar with 3 entries and prints a table.
+```lua
+local mainFrame = basalt.createFrame()
+local aDropdown = mainFrame:addDropdown()
+aDropdown:addItem("1. Entry")
+aDropdown:addItem("2. Entry",colors.yellow)
+aDropdown:addItem("3. Entry",colors.yellow,colors.green)
+basalt.debug(aDropdown:getAll())
+```
\ No newline at end of file
diff --git a/docs/objects/Dropdown/getItem.md b/docs/objects/Dropdown/getItem.md
new file mode 100644
index 0000000..bbdf1a8
--- /dev/null
+++ b/docs/objects/Dropdown/getItem.md
@@ -0,0 +1,19 @@
+## getItem
+Returns a item by index
+
+#### Parameters:
+1. `number` The index which should be returned
+
+#### Returns:
+1. `table` The item table example: {text="1. Entry", bgCol=colors.black, fgCol=colors.white}
+
+#### Usage:
+* Creates a default dropdown with 3 entries and edits the second one.
+```lua
+local mainFrame = basalt.createFrame()
+local aDropdown = mainFrame:addDropdown()
+aDropdown:addItem("1. Entry")
+aDropdown:addItem("2. Entry",colors.yellow)
+aDropdown:addItem("3. Entry",colors.yellow,colors.green)
+basalt.debug(aDropdown:getItem(2).text)
+```
\ No newline at end of file
diff --git a/docs/objects/Dropdown/getItemCount.md b/docs/objects/Dropdown/getItemCount.md
new file mode 100644
index 0000000..f85e63b
--- /dev/null
+++ b/docs/objects/Dropdown/getItemCount.md
@@ -0,0 +1,16 @@
+## getItemCount
+Returns the current item count
+
+#### Returns:
+1. `number` The item list count
+
+#### Usage:
+* Creates a default dropdown with 3 entries and prints the current item count.
+```lua
+local mainFrame = basalt.createFrame()
+local aDropdown = mainFrame:addDropdown()
+aDropdown:addItem("1. Entry")
+aDropdown:addItem("2. Entry",colors.yellow)
+aDropdown:addItem("3. Entry",colors.yellow,colors.green)
+basalt.debug(aDropdown:getItemCount())
+```
\ No newline at end of file
diff --git a/docs/objects/Dropdown/getItemIndex.md b/docs/objects/Dropdown/getItemIndex.md
new file mode 100644
index 0000000..119dc6b
--- /dev/null
+++ b/docs/objects/Dropdown/getItemIndex.md
@@ -0,0 +1,17 @@
+## getItemIndex
+returns the item index of the currently selected item
+
+#### Returns:
+1. `number` The current index
+
+#### Usage:
+* Creates a default dropdown with 3 entries selects the second entry and prints the currently selected index.
+```lua
+local mainFrame = basalt.createFrame()
+local aDropdown = mainFrame:addDropdown()
+aDropdown:addItem("1. Entry")
+aDropdown:addItem("2. Entry",colors.yellow)
+aDropdown:addItem("3. Entry",colors.yellow,colors.green)
+aDropdown:selectItem(2)
+basalt.debug(aDropdown:getItemIndex())
+```
\ No newline at end of file
diff --git a/docs/objects/Dropdown/getOffset.md b/docs/objects/Dropdown/getOffset.md
new file mode 100644
index 0000000..1bef728
--- /dev/null
+++ b/docs/objects/Dropdown/getOffset.md
@@ -0,0 +1,20 @@
+## getOffset
+Returns the current index offset
+
+#### Returns:
+1. `number` offset value
+
+#### Usage:
+* Creates a default dropdown with 6 entries and sets the offset to 3, also prints the current offset.
+```lua
+local mainFrame = basalt.createFrame()
+local aDropdown = mainFrame:addDropdown()
+ :addItem("1. Entry")
+ :addItem("2. Entry")
+ :addItem("3. Entry")
+ :addItem("4. Entry")
+ :addItem("5. Entry")
+ :addItem("6. Entry")
+ :setOffset(3)
+basalt.debug(aDropdown:getOffset())
+```
\ No newline at end of file
diff --git a/docs/objects/Dropdown/removeItem.md b/docs/objects/Dropdown/removeItem.md
new file mode 100644
index 0000000..c74b85b
--- /dev/null
+++ b/docs/objects/Dropdown/removeItem.md
@@ -0,0 +1,19 @@
+## removeItem
+Removes a item from the dropdown
+
+#### Parameters:
+1. `number` The index which should get removed
+
+#### Returns:
+1. `object` The object in use
+
+#### Usage:
+* Creates a default dropdown with 3 entries and removes the second one.
+```lua
+local mainFrame = basalt.createFrame()
+local aDropdown = mainFrame:addDropdown()
+aDropdown:addItem("1. Entry")
+aDropdown:addItem("2. Entry",colors.yellow)
+aDropdown:addItem("3. Entry",colors.yellow,colors.green)
+aDropdown:removeItem(2)
+```
\ No newline at end of file
diff --git a/docs/objects/Dropdown/selectItem.md b/docs/objects/Dropdown/selectItem.md
new file mode 100644
index 0000000..e825d5c
--- /dev/null
+++ b/docs/objects/Dropdown/selectItem.md
@@ -0,0 +1,19 @@
+## selectItem
+selects a item in the dropdown (same as a player would click on a item)
+
+#### Parameters:
+1. `number` The index which should get selected
+
+#### Returns:
+1. `object` The object in use
+
+#### Usage:
+* Creates a default dropdown with 3 entries and selects the second entry.
+```lua
+local mainFrame = basalt.createFrame()
+local aDropdown = mainFrame:addDropdown()
+aDropdown:addItem("1. Entry")
+aDropdown:addItem("2. Entry",colors.yellow)
+aDropdown:addItem("3. Entry",colors.yellow,colors.green)
+aDropdown:selectItem(2)
+```
\ No newline at end of file
diff --git a/docs/objects/Dropdown/setDropdownSize.md b/docs/objects/Dropdown/setDropdownSize.md
new file mode 100644
index 0000000..59f5984
--- /dev/null
+++ b/docs/objects/Dropdown/setDropdownSize.md
@@ -0,0 +1,26 @@
+## setDropdownSize
+Sets the size of the opened dropdown
+
+#### Parameters:
+1. `number` The width value
+2. `number` The height value
+
+#### Returns:
+1. `object` The object in use
+
+#### Usage:
+* Creates a default dropdown, adds 3 entries and sets the dropdown size to 15w, 8h
+```lua
+local mainFrame = basalt.createFrame()
+local aDropdown = mainFrame:addDropdown():setDropdownSize(15,8)
+aDropdown:addItem("1. Entry")
+aDropdown:addItem("2. Entry")
+aDropdown:addItem("3. Entry")
+```
+```xml
+
+ 1. Entry
+ 2. Entry
+ 3. Entry
+
+```
\ No newline at end of file
diff --git a/docs/objects/Dropdown/setOffset.md b/docs/objects/Dropdown/setOffset.md
new file mode 100644
index 0000000..999005a
--- /dev/null
+++ b/docs/objects/Dropdown/setOffset.md
@@ -0,0 +1,32 @@
+## setOffset
+Sets the offset of the dropdown (the same as you would scroll) - default is 0
+
+#### Parameters:
+1. `number` The offset value
+
+#### Returns:
+1. `object` The object in use
+
+#### Usage:
+* Creates a default dropdown with 6 entries and sets the offset to 3.
+```lua
+local mainFrame = basalt.createFrame()
+local aDropdown = mainFrame:addDropdown()
+ :addItem("1. Entry")
+ :addItem("2. Entry")
+ :addItem("3. Entry")
+ :addItem("4. Entry")
+ :addItem("5. Entry")
+ :addItem("6. Entry")
+ :setOffset(3)
+```
+```xml
+
+ 1. Entry
+ 2. Entry
+ 3. Entry
+ 4. Entry
+ 5. Entry
+ 6. Entry
+
+```
\ No newline at end of file
diff --git a/docs/objects/Dropdown/setSelectedItem.md b/docs/objects/Dropdown/setSelectedItem.md
new file mode 100644
index 0000000..6fc4a6f
--- /dev/null
+++ b/docs/objects/Dropdown/setSelectedItem.md
@@ -0,0 +1,28 @@
+## setSelectedItem
+Sets the background and the foreground of the item which is currently selected
+
+#### Parameters:
+1. `number|color` The background color which should be used
+2. `number|color` The text color which should be used
+
+#### Returns:
+1. `object` The object in use
+
+#### Usage:
+* Creates a default dropdown with 4 entries and sets the selection background color to green.
+```lua
+local mainFrame = basalt.createFrame()
+local aDropdown = mainFrame:addDropdown()
+aDropdown:addItem("1. Entry")
+aDropdown:addItem("2. Entry",colors.yellow)
+aDropdown:addItem("3. Entry",colors.yellow,colors.green)
+aDropdown:addItem("4. Entry")
+aDropdown:setSelectedItem(colors.green, colors.red)
+```
+```xml
+
+ 1. Entry
+ 2. Entryyellow
+ 2. Entryyellowgreen
+
+```
\ No newline at end of file
diff --git a/docs/objects/Frame.md b/docs/objects/Frame.md
index cee2e47..85df57c 100644
--- a/docs/objects/Frame.md
+++ b/docs/objects/Frame.md
@@ -1,402 +1,32 @@
-
-
-Frames are like containers, but are also normal objects.
-In other words, you can add other objects _(even frames)_ to a frame; if the frame itself is visible
-all sub-objects _(if they are set as visible)_ are also visible. A better description will follow.
-
-## basalt.createFrame
-Creates a new non-parent frame - in most cases it is the first thing you'll need.
-
-#### Parameters:
-1. `string` name (should be unique)
-
-#### Returns:
-1. `frame | nil` The frame created by createFrame, or `nil` if there is already a frame with the given name.
-
-#### Usage:
-* Create a frame with an id "myFirstFrame", stored in a variable named frame
-```lua
-local myFrame = basalt.createFrame("myFirstFrame")
-```
-
-## addFrame
-Creates a child frame on the frame, the same as [basalt.createFrame](https://github.com/Pyroxenium/Basalt/wiki/Frame#basaltcreateframe) except the frames are given a parent-child relationship automatically
-
-#### Parameters:
-1. `string` name (should be unique)
-
-#### Returns:
-1. `frame | nil` The frame created by addFrame, or `nil` if there is already a child frame with the given name.
-
-#### Usage:
-* Create a new main frame and adds a child frame to it
-```lua
-local mainFrame = basalt.createFrame()
-local myFrame = mainFrame:addFrame()
-```
-```xml
-
-```
-
-## setBar
-Sets the text, background, and foreground of the upper bar of the frame, accordingly.
-
-#### Parameters:
-1. `string` The title text to set the bar to
-2. `number` The background color
-2. `number` The foreground color
-
-#### Returns:
-1. `frame` The frame being used
-
-#### Usage:
-* Set the title to "My first frame!", with a background of black and a foreground of light gray.
-```lua
-frame:setBar("My first Frame!", colors.black, colors.lightGray)
-```
-* Store the frame, use the named frame variable after assigning.
-```lua
-local mainFrame = basalt.createFrame()
-local myFrame = MainFrame:addFrame()
-myFrame:setBar("My first Frame!")
-```
-* This abuses the call-chaining that Basalt uses.
-```lua
-local mainFrame = basalt.createFrame()
-local myFrame = mainFrame:addFrame():setBar("My first Frame!")
-```
-```xml
-
-```
-
-## setBarTextAlign
-Sets the frame's bar-text alignment
-
-#### Parameters:
-1. `string` Can be supplied with "left", "center", or "right"
-
-#### Returns:
-1. `frame` The frame being used
-
-#### Usage:
-* Set the title of myFrame to "My first frame!", and align it to the right.
-```lua
-myFrame:setBar("My first Frame!"):setBarTextAlign("right")
-```
-```xml
-
-```
-
-## showBar
-Toggles the frame's upper bar
-
-#### Parameters:
-1. `boolean | nil` Whether the frame's bar is visible or if supplied `nil`, is automatically visible
-
-#### Returns:
-1. `frame` The frame being used
-
-#### Usage:
-* Sets myFrame to have a bar titled "Hello World!" and subsequently displays it.
-```lua
-myFrame:setBar("Hello World!"):showBar()
-```
-```xml
-
-```
-
-
-## setMonitor
-Sets this frame as a monitor frame
-
-#### Parameters:
-1. `string` The monitor name ("right", "left",... "monitor_1", "monitor_2",...)
-
-#### Returns:
-1. `frame` The frame being used
-
-#### Usage:
-* Creates a new monitor frame, you can use to show objects on a monitor.
-```lua
-local mainFrame = basalt.createFrame()
-local monitorFrame = basalt.createFrame():setMonitor("right")
-monitorFrame:setBar("Monitor 1"):showBar()
-```
-```xml
-
-```
-
-## setMirror
-mirrors this frame to another peripheral monitor object.
-
-#### Parameters:
-1. `string` The monitor name ("right", "left",... "monitor_1", "monitor_2",...)
-
-#### Returns:
-1. `frame` The frame being used
-
-#### Usage:
-* Creates mirror of your main frame to a monitor on the left side.
-```lua
-local mainFrame = basalt.createFrame():setMirror("left")
-```
-```xml
-
-```
-
-## getObject
-Returns a child object of the frame
-
-#### Parameters:
-1. `string` The name of the child object
-
-#### Returns:
-1. `object | nil` The object with the supplied name, or `nil` if there is no object present with the given name
-
-#### Usage:
-* Adds a button with id "myFirstButton", then retrieves it again through the frame object
-```lua
-myFrame:addButton("myFirstButton")
-local aButton = myFrame:getObject("myFirstButton")
-```
-
-## removeObject
-Removes a child object from the frame
-
-#### Parameters:
-1. `string` The name of the child object
-
-#### Returns:
-1. `boolean` Whether the object with the given name was properly removed
-
-#### Usage:
-* Adds a button with the id "myFirstButton", then removes it with the aforementioned id
-```lua
-myFrame:addButton("myFirstButton")
-myFrame:removeObject("myFirstButton")
-```
-
-## setFocusedObject
-Sets the currently focused object
-
-#### Parameters:
-1. `object` The child object to focus on
-
-#### Returns:
-1. `frame` The frame being used
-
-#### Usage:
-* Creates a new button, sets the focused object to the previously mentioned button
-```lua
-local aButton = myFrame:addButton()
-myFrame:setFocusedObject(aButton)
-```
-
-## removeFocusedObject
-Removes the focus of the supplied object
-
-#### Parameters:
-1. `object` The child object to remove focus from
-
-#### Returns:
-1. `frame` The frame being used
-
-#### Usage:
-* Creates a new button then removes the focus from that button when clicking on it
-```lua
-local aButton = myFrame:addButton():setFocus():onClick(function()
- myFrame:removeFocusedObject(aButton)
-end)
-```
-
-## getFocusedObject
-Gets the currently focused object
-
-#### Returns:
-1. `object` The currently focused object
-
-#### Usage:
-* Gets the currently focused object from the frame, storing it in a variable
-```lua
-local focusedObject = myFrame:getFocusedObject()
-```
-
-## setMovable
-Sets whether the frame can be moved. _In order to move the frame click and drag the upper bar of the frame_
-
-#### Parameters:
-1. `boolean` Whether the object is movable
-
-#### Returns:
-1. `frame` The frame being used
-
-#### Usage:
-* Creates a frame with id "myFirstFrame" and makes it movable
-```lua
-local myFrame = basalt.createFrame():setMovable(true)
-```
-```xml
-
-```
-
-## setOffset
-Sets the frame's coordinate offset. The frame's child objects will receive the frame's coordinate offset. For example, when using a scrollbar, if you use its value to add an offset to a frame, you will get a scrollable frame.
-Objects are also able to ignore the offset by using :ignoreOffset() (For example, you may want to ignore the offset on the scrollbar itself)
-
-The function can also be supplied with negative values
-
-#### Parameters:
-1. `number` The x direction offset (+/-)
-2. `number` The y direction offset (+/-)
-
-#### Returns:
-1. `frame` The frame being used
-
-#### Usage:
-* Creates a new base frame with x offset of 5 and a y offset of 3
-```lua
-local myFrame = basalt.createFrame():setOffset(5, 3)
-```
-* Creates with x offset of 5 and a y offset of -5 (Meaning if you added a button with y position 5, it would be at y position 0)
-```lua
-local myFrame = basalt.createFrame():setOffset(5, -5)
-```
-```xml
-
-```
-
-## addLayout
-Adds a new XML Layout into your frame.
-
-#### Parameters:
-1. `string` Path to your layout
-
-#### Returns:
-1. `frame` The frame being used
-
-#### Usage:
-* Creates a new base frame and adds the mainframe.xml layout
-```lua
-local myFrame = basalt.createFrame():addLayout("mainframe.xml")
-```
-```xml
-
-```
-
-## addLayoutFromString
-Adds a new XML Layout as string into your frame.
-
-#### Parameters:
-1. `string` xml
-
-#### Returns:
-1. `frame` The frame being used
-
-#### Usage:
-* Creates a new base frame and adds the mainframe.xml layout
-```lua
-local myFrame = basalt.createFrame():addLayoutFromString("")
-```
-
-## getLastLayout
-returns a table of all objects this frame has created via xml (useful if you'd like to access all of them for some reason)
-
-#### Returns:
-1. `table` table with objects
-
-## setTheme
-Sets the default theme of that frame children objects always try to get the theme of its parent frame, if it does not exist it goes to its parent parent frame, and so on until it reaches the basalt managers theme - which is sotred in theme.lua (Please checkout [theme](https://github.com/Pyroxenium/Basalt/blob/master/Basalt/theme.lua) for how it could look like.
-
-#### Parameters:
-1. `table` theme layout look into [theme](https://github.com/Pyroxenium/Basalt/blob/master/Basalt/theme.lua) for a example
-
-#### Returns:
-1. `frame` The frame being used
-
-#### Usage:
-* Creates a new base frame and adds a new theme which only changes the default color of buttons.
-```lua
-local myFrame = basalt.createFrame():setTheme({
- ButtonBG = colors.yellow,
- ButtonText = colors.red,
-})
-```
-
-## setScrollable
-Makes the frame scrollable with mousewheel.
-
-#### Parameters:
-1. `bool` scrollable or not
-
-#### Returns:
-1. `frame` The frame being used
-
-#### Usage:
-* Creates a new base frame and makes it scrollable
-```lua
-local myFrame = basalt.createFrame():setScrollable()
-```
-```xml
-
-```
-
-## setMinScroll
-Sets the minimum offset it is allowed to scroll (default 0)
-
-#### Parameters:
-1. `number` minimum y offset
-
-#### Returns:
-1. `frame` The frame being used
-
-#### Usage:
-* Creates a new base frame and makes it scrollable and sets the minimum amount to -5
-```lua
-local myFrame = basalt.createFrame():setScrollable():setMinScroll(-5)
-```
-```xml
-
-```
-
-## setMaxScroll
-Sets the maximum offset it is allowed to scroll (default 10)
-
-#### Parameters:
-1. `number` maximum y offset
-
-#### Returns:
-1. `frame` The frame being used
-
-#### Usage:
-* Creates a new base frame and makes it scrollable and sets the maximum amount to 25
-```lua
-local myFrame = basalt.createFrame():setScrollable():setMaxScroll(25)
-```
-```xml
-
-```
-
-## setImportantScroll
-By default if you hovering your mouse over children objects, you wont scroll the frame, if you set this to true the frame scrolling becomes more important
-
-#### Parameters:
-1. `bool` important or not
-
-#### Returns:
-1. `frame` The frame being used
-
-#### Usage:
-* Creates a new base frame and makes it scrollable and defines it as important
-```lua
-local myFrame = basalt.createFrame():setScrollable():setImportantScroll(true)
-```
-```xml
-
-```
-
-# XML Example
-
-*This is how you would implement frames via xml:
+Frames are like groups or windows. You can add objects on them and if you move the frame, all its children objects will also be moved. Frames also have
+some special functionality to create very advanced programs.
+
+[Object](objects/Object.md) methods also apply for frames.
+
+| | |
+|---|---|
+|[addObject](objects/Frame/addObject.md)|Adds a new object
+|[setBar](objects/Frame/setBar.md)|Sets the top bar text and colors - deprecated
+|[setBarTextAlign](objects/Frame/setBarTextAlign.md)|Sets the top bars text align - deprecated
+|[showBar](objects/Frame/showBar.md)|Shows the top bar - deprecated
+|[setMonitor](objects/Frame/setMonitor.md)|Sets the frame to be a monitor frame (only for base frames)
+|[setMirror](objects/Frame/setMirror.md)|Sets the frame to mirror onto a monitor (only for base frames)
+|[getObject](objects/Frame/getObject.md)|Returns the object by its name (or id)
+|[removeObject](objects/Frame/removeObject.md)|Removes the object by its name (or id)
+|[setFocusedObject](objects/Frame/setFocusedObject.md)|Sets the currently focused object by this frame
+|[removeFocusedObject](objects/Frame/removeFocusedObject.md)|Removes the currenlty focused object (it only removes beeing focused)
+|[getFocusedObject](objects/Frame/getFocusedObject.md)|Returns the currently focused object
+|[setMovable](objects/Frame/setMovable.md)|Makes the frame movable (only for sub frames)
+|[setOffset](objects/Frame/setOffset.md)|Sets the frames offset (will be added to the childrens x and y positions)
+|[getOffset](objects/Frame/getOffset.md)|Returns the current x and y offset
+|[addLayout](objects/Frame/addLayout.md)|Adds a new XML Layout into the frame
+|[addLayoutFromString](objects/Frame/addLayoutFromString.md)|Adds a new XML Layout via string into the frame
+|[getLastLayout](objects/Frame/getLastLayout.md)|Returns a table of all objects generated by the last addLayout/FromString method
+|[setTheme](objects/Frame/setTheme.md)|Sets the theme of that frame and all its childrens
+|[setScrollable](objects/Frame/setScrollable.md)|Makes the frame scrollable via mousewheel (internally this uses setOffset)
+|[setScrollAmount](objects/Frame/setScrollAmount.md)|Sets how far the user is allowed to scroll
+
+This is how you would implement frames via xml:
```xml
@@ -406,4 +36,4 @@ local myFrame = basalt.createFrame():setScrollable():setImportantScroll(true)
-```
+```
\ No newline at end of file
diff --git a/docs/objects/Frame/addLayout.md b/docs/objects/Frame/addLayout.md
new file mode 100644
index 0000000..6ad6871
--- /dev/null
+++ b/docs/objects/Frame/addLayout.md
@@ -0,0 +1,17 @@
+## addLayout
+Adds a new XML Layout into your frame.
+
+#### Parameters:
+1. `string` Path to your layout
+
+#### Returns:
+1. `frame` The frame being used
+
+#### Usage:
+* Creates a new base frame and adds the mainframe.xml layout
+```lua
+local myFrame = basalt.createFrame():addLayout("mainframe.xml")
+```
+```xml
+
+```
\ No newline at end of file
diff --git a/docs/objects/Frame/addLayoutFromString.md b/docs/objects/Frame/addLayoutFromString.md
new file mode 100644
index 0000000..276677d
--- /dev/null
+++ b/docs/objects/Frame/addLayoutFromString.md
@@ -0,0 +1,14 @@
+## addLayoutFromString
+Adds a new XML Layout as string into your frame.
+
+#### Parameters:
+1. `string` xml
+
+#### Returns:
+1. `frame` The frame being used
+
+#### Usage:
+* Creates a new base frame and adds the mainframe.xml layout
+```lua
+local myFrame = basalt.createFrame():addLayoutFromString("")
+```
\ No newline at end of file
diff --git a/docs/objects/Frame/addObject.md b/docs/objects/Frame/addObject.md
new file mode 100644
index 0000000..b025eda
--- /dev/null
+++ b/docs/objects/Frame/addObject.md
@@ -0,0 +1,18 @@
+## add<Object>
+Adds a new object. Don't use add<Object> please use addTheObjectYouNeed For example if you want a new Frame, use
+addFrame, if you want to add a button, use addButton
+
+#### Parameters:
+1. `string` optional - the id if you don't add a id it will autimatically generate one for you
+
+#### Returns:
+1. `object` The new object you've created
+
+#### Usage:
+* Creates some example objects
+```lua
+local main = basalt.createFrame()
+local button = main:addButton()
+local label = main:addLabel()
+local frame = main:addFrame()
+```
diff --git a/docs/objects/Frame/getFocusedObject.md b/docs/objects/Frame/getFocusedObject.md
new file mode 100644
index 0000000..2f18760
--- /dev/null
+++ b/docs/objects/Frame/getFocusedObject.md
@@ -0,0 +1,11 @@
+## getFocusedObject
+Gets the currently focused object
+
+#### Returns:
+1. `object` The currently focused object
+
+#### Usage:
+* Gets the currently focused object from the frame, storing it in a variable
+```lua
+local focusedObject = myFrame:getFocusedObject()
+```
\ No newline at end of file
diff --git a/docs/objects/Frame/getLastLayout.md b/docs/objects/Frame/getLastLayout.md
new file mode 100644
index 0000000..4044e42
--- /dev/null
+++ b/docs/objects/Frame/getLastLayout.md
@@ -0,0 +1,5 @@
+## getLastLayout
+returns a table of all objects this frame has created via xml (useful if you'd like to access all of them for some reason)
+
+#### Returns:
+1. `table` table with objects
\ No newline at end of file
diff --git a/docs/objects/Frame/getObject.md b/docs/objects/Frame/getObject.md
new file mode 100644
index 0000000..22cd166
--- /dev/null
+++ b/docs/objects/Frame/getObject.md
@@ -0,0 +1,15 @@
+## getObject
+Returns a child object of the frame
+
+#### Parameters:
+1. `string` The name of the child object
+
+#### Returns:
+1. `object | nil` The object with the supplied name, or `nil` if there is no object present with the given name
+
+#### Usage:
+* Adds a button with id "myFirstButton", then retrieves it again through the frame object
+```lua
+myFrame:addButton("myFirstButton")
+local aButton = myFrame:getObject("myFirstButton")
+```
\ No newline at end of file
diff --git a/docs/objects/Frame/getOffset.md b/docs/objects/Frame/getOffset.md
new file mode 100644
index 0000000..e69de29
diff --git a/docs/objects/Frame/removeFocusedObject.md b/docs/objects/Frame/removeFocusedObject.md
new file mode 100644
index 0000000..73d542b
--- /dev/null
+++ b/docs/objects/Frame/removeFocusedObject.md
@@ -0,0 +1,16 @@
+## removeFocusedObject
+Removes the focus of the supplied object
+
+#### Parameters:
+1. `object` The child object to remove focus from
+
+#### Returns:
+1. `frame` The frame being used
+
+#### Usage:
+* Creates a new button then removes the focus from that button when clicking on it
+```lua
+local aButton = myFrame:addButton():setFocus():onClick(function()
+ myFrame:removeFocusedObject(aButton)
+end)
+```
\ No newline at end of file
diff --git a/docs/objects/Frame/removeObject.md b/docs/objects/Frame/removeObject.md
new file mode 100644
index 0000000..a43cd18
--- /dev/null
+++ b/docs/objects/Frame/removeObject.md
@@ -0,0 +1,15 @@
+## removeObject
+Removes a child object from the frame
+
+#### Parameters:
+1. `string` The name of the child object
+
+#### Returns:
+1. `boolean` Whether the object with the given name was properly removed
+
+#### Usage:
+* Adds a button with the id "myFirstButton", then removes it with the aforementioned id
+```lua
+myFrame:addButton("myFirstButton")
+myFrame:removeObject("myFirstButton")
+```
\ No newline at end of file
diff --git a/docs/objects/Frame/setBar.md b/docs/objects/Frame/setBar.md
new file mode 100644
index 0000000..f19abb4
--- /dev/null
+++ b/docs/objects/Frame/setBar.md
@@ -0,0 +1,30 @@
+## setBar
+Sets the text, background, and foreground of the upper bar of the frame, accordingly.
+
+#### Parameters:
+1. `string` The title text to set the bar to
+2. `number` The background color
+2. `number` The foreground color
+
+#### Returns:
+1. `frame` The frame being used
+
+#### Usage:
+* Set the title to "My first frame!", with a background of black and a foreground of light gray.
+```lua
+frame:setBar("My first Frame!", colors.black, colors.lightGray)
+```
+* Store the frame, use the named frame variable after assigning.
+```lua
+local mainFrame = basalt.createFrame()
+local myFrame = MainFrame:addFrame()
+myFrame:setBar("My first Frame!")
+```
+* This abuses the call-chaining that Basalt uses.
+```lua
+local mainFrame = basalt.createFrame()
+local myFrame = mainFrame:addFrame():setBar("My first Frame!")
+```
+```xml
+
+```
\ No newline at end of file
diff --git a/docs/objects/Frame/setBarTextAlign.md b/docs/objects/Frame/setBarTextAlign.md
new file mode 100644
index 0000000..c05015a
--- /dev/null
+++ b/docs/objects/Frame/setBarTextAlign.md
@@ -0,0 +1,17 @@
+## setBarTextAlign
+Sets the frame's bar-text alignment
+
+#### Parameters:
+1. `string` Can be supplied with "left", "center", or "right"
+
+#### Returns:
+1. `frame` The frame being used
+
+#### Usage:
+* Set the title of myFrame to "My first frame!", and align it to the right.
+```lua
+myFrame:setBar("My first Frame!"):setBarTextAlign("right")
+```
+```xml
+
+```
\ No newline at end of file
diff --git a/docs/objects/Frame/setFocusedObject.md b/docs/objects/Frame/setFocusedObject.md
new file mode 100644
index 0000000..552f07b
--- /dev/null
+++ b/docs/objects/Frame/setFocusedObject.md
@@ -0,0 +1,15 @@
+## setFocusedObject
+Sets the currently focused object
+
+#### Parameters:
+1. `object` The child object to focus on
+
+#### Returns:
+1. `frame` The frame being used
+
+#### Usage:
+* Creates a new button, sets the focused object to the previously mentioned button
+```lua
+local aButton = myFrame:addButton()
+myFrame:setFocusedObject(aButton)
+```
\ No newline at end of file
diff --git a/docs/objects/Frame/setMirror.md b/docs/objects/Frame/setMirror.md
new file mode 100644
index 0000000..0d39e9f
--- /dev/null
+++ b/docs/objects/Frame/setMirror.md
@@ -0,0 +1,17 @@
+## setMirror
+mirrors this frame to another peripheral monitor object.
+
+#### Parameters:
+1. `string` The monitor name ("right", "left",... "monitor_1", "monitor_2",...)
+
+#### Returns:
+1. `frame` The frame being used
+
+#### Usage:
+* Creates mirror of your main frame to a monitor on the left side.
+```lua
+local mainFrame = basalt.createFrame():setMirror("left")
+```
+```xml
+
+```
\ No newline at end of file
diff --git a/docs/objects/Frame/setMonitor.md b/docs/objects/Frame/setMonitor.md
new file mode 100644
index 0000000..7e3e538
--- /dev/null
+++ b/docs/objects/Frame/setMonitor.md
@@ -0,0 +1,19 @@
+## setMonitor
+Sets this frame as a monitor frame
+
+#### Parameters:
+1. `string` The monitor name ("right", "left",... "monitor_1", "monitor_2",...)
+
+#### Returns:
+1. `frame` The frame being used
+
+#### Usage:
+* Creates a new monitor frame, you can use to show objects on a monitor.
+```lua
+local mainFrame = basalt.createFrame()
+local monitorFrame = basalt.createFrame():setMonitor("right")
+monitorFrame:setBar("Monitor 1"):showBar()
+```
+```xml
+
+```
\ No newline at end of file
diff --git a/docs/objects/Frame/setMovable.md b/docs/objects/Frame/setMovable.md
new file mode 100644
index 0000000..2795e87
--- /dev/null
+++ b/docs/objects/Frame/setMovable.md
@@ -0,0 +1,17 @@
+## setMovable
+Sets whether the frame can be moved. _In order to move the frame click and drag the upper bar of the frame_
+
+#### Parameters:
+1. `boolean` Whether the object is movable
+
+#### Returns:
+1. `frame` The frame being used
+
+#### Usage:
+* Creates a frame with id "myFirstFrame" and makes it movable
+```lua
+local myFrame = basalt.createFrame():setMovable(true)
+```
+```xml
+
+```
\ No newline at end of file
diff --git a/docs/objects/Frame/setOffset.md b/docs/objects/Frame/setOffset.md
new file mode 100644
index 0000000..843e97a
--- /dev/null
+++ b/docs/objects/Frame/setOffset.md
@@ -0,0 +1,25 @@
+## setOffset
+Sets the frame's coordinate offset. The frame's child objects will receive the frame's coordinate offset. For example, when using a scrollbar, if you use its value to add an offset to a frame, you will get a scrollable frame.
+Objects are also able to ignore the offset by using :ignoreOffset() (For example, you may want to ignore the offset on the scrollbar itself)
+
+The function can also be supplied with negative values
+
+#### Parameters:
+1. `number` The x direction offset (+/-)
+2. `number` The y direction offset (+/-)
+
+#### Returns:
+1. `frame` The frame being used
+
+#### Usage:
+* Creates a new base frame with x offset of 5 and a y offset of 3
+```lua
+local myFrame = basalt.createFrame():setOffset(5, 3)
+```
+* Creates with x offset of 5 and a y offset of -5 (Meaning if you added a button with y position 5, it would be at y position 0)
+```lua
+local myFrame = basalt.createFrame():setOffset(5, -5)
+```
+```xml
+
+```
\ No newline at end of file
diff --git a/docs/objects/Frame/setScrollAmount.md b/docs/objects/Frame/setScrollAmount.md
new file mode 100644
index 0000000..7e632b5
--- /dev/null
+++ b/docs/objects/Frame/setScrollAmount.md
@@ -0,0 +1,17 @@
+## setScrollAmount
+Sets the maximum offset it is allowed to scroll
+
+#### Parameters:
+1. `number` maximum y offset
+
+#### Returns:
+1. `frame` The frame being used
+
+#### Usage:
+* Creates a new base frame and makes it scrollable and sets the maximum amount to 25
+```lua
+local myFrame = basalt.createFrame():setScrollable():setScrollAmount(25)
+```
+```xml
+
+```
\ No newline at end of file
diff --git a/docs/objects/Frame/setScrollable.md b/docs/objects/Frame/setScrollable.md
new file mode 100644
index 0000000..70fc190
--- /dev/null
+++ b/docs/objects/Frame/setScrollable.md
@@ -0,0 +1,17 @@
+## setScrollable
+Makes the frame scrollable with mousewheel.
+
+#### Parameters:
+1. `bool` scrollable or not
+
+#### Returns:
+1. `frame` The frame being used
+
+#### Usage:
+* Creates a new base frame and makes it scrollable
+```lua
+local myFrame = basalt.createFrame():setScrollable()
+```
+```xml
+
+```
\ No newline at end of file
diff --git a/docs/objects/Frame/setTheme.md b/docs/objects/Frame/setTheme.md
new file mode 100644
index 0000000..595e50e
--- /dev/null
+++ b/docs/objects/Frame/setTheme.md
@@ -0,0 +1,17 @@
+## setTheme
+Sets the default theme of that frame children objects always try to get the theme of its parent frame, if it does not exist it goes to its parent parent frame, and so on until it reaches the basalt managers theme - which is sotred in theme.lua (Please checkout [theme](https://github.com/Pyroxenium/Basalt/blob/master/Basalt/theme.lua) for how it could look like.
+
+#### Parameters:
+1. `table` theme layout look into [theme](https://github.com/Pyroxenium/Basalt/blob/master/Basalt/theme.lua) for a example
+
+#### Returns:
+1. `frame` The frame being used
+
+#### Usage:
+* Creates a new base frame and adds a new theme which only changes the default color of buttons.
+```lua
+local myFrame = basalt.createFrame():setTheme({
+ ButtonBG = colors.yellow,
+ ButtonText = colors.red,
+})
+```
\ No newline at end of file
diff --git a/docs/objects/Frame/showBar.md b/docs/objects/Frame/showBar.md
new file mode 100644
index 0000000..ff5f624
--- /dev/null
+++ b/docs/objects/Frame/showBar.md
@@ -0,0 +1,17 @@
+## showBar
+Toggles the frame's upper bar
+
+#### Parameters:
+1. `boolean | nil` Whether the frame's bar is visible or if supplied `nil`, is automatically visible
+
+#### Returns:
+1. `frame` The frame being used
+
+#### Usage:
+* Sets myFrame to have a bar titled "Hello World!" and subsequently displays it.
+```lua
+myFrame:setBar("Hello World!"):showBar()
+```
+```xml
+
+```
\ No newline at end of file
diff --git a/docs/objects/Image.md b/docs/objects/Image.md
index 1c9bbaf..9589b61 100644
--- a/docs/objects/Image.md
+++ b/docs/objects/Image.md
@@ -3,39 +3,10 @@ It also provides a :shrink() function, where you can shrink the images to smalle
The image object is still not done. in the future i will provide more image formats.
-Remember image inherits from [Object](objects/Object.md)
+[Object](objects/Object.md) methods also apply for images.
-## loadImage
-loads a default .nfp file into the object.
+| | |
+|---|---|
+|[loadImage](objects/Image/loadImage.md)|Adds a new object
+|[shrink](objects/Image/shrink.md)|Sets the top bar text and colors - deprecated
-#### Parameters:
-1. `string` the absolute file path
-
-#### Returns:
-1. `object` The object in use
-
-#### Usage:
-* Creates a default image and loads a test.nfp file
-```lua
-local mainFrame = basalt.createFrame():show()
-local aImage = mainFrame:addImage():loadImage("test.nfp")
-```
-```xml
-
-```
-
-## shrink
-Shrinks the current image into a blittle image.
-
-#### Returns:
-1. `object` The object in use
-
-#### Usage:
-* Creates a default image and loads a test.nfp file
-```lua
-local mainFrame = basalt.createFrame()
-local aImage = mainFrame:addImage():loadImage("test.nfp"):shrink()
-```
-```xml
-
-```
diff --git a/docs/objects/Image/loadImage.md b/docs/objects/Image/loadImage.md
new file mode 100644
index 0000000..d347035
--- /dev/null
+++ b/docs/objects/Image/loadImage.md
@@ -0,0 +1,18 @@
+## loadImage
+loads a default .nfp file into the object.
+
+#### Parameters:
+1. `string` the absolute file path
+
+#### Returns:
+1. `object` The object in use
+
+#### Usage:
+* Creates a default image and loads a test.nfp file
+```lua
+local mainFrame = basalt.createFrame():show()
+local aImage = mainFrame:addImage():loadImage("test.nfp")
+```
+```xml
+
+```
\ No newline at end of file
diff --git a/docs/objects/Image/shrink.md b/docs/objects/Image/shrink.md
new file mode 100644
index 0000000..b2c485a
--- /dev/null
+++ b/docs/objects/Image/shrink.md
@@ -0,0 +1,15 @@
+## shrink
+Shrinks the current image into a blittle image.
+
+#### Returns:
+1. `object` The object in use
+
+#### Usage:
+* Creates a default image and loads a test.nfp file
+```lua
+local mainFrame = basalt.createFrame()
+local aImage = mainFrame:addImage():loadImage("test.nfp"):shrink()
+```
+```xml
+
+```
diff --git a/docs/objects/Input.md b/docs/objects/Input.md
index a89eedd..4271f7c 100644
--- a/docs/objects/Input.md
+++ b/docs/objects/Input.md
@@ -1,91 +1,12 @@
With input's you are able to create a object where the user can type something in.
-Here are all possible functions available for inputs:
-Remember Input inherits from [Object](objects/Object.md)
+[Object](objects/Object.md) methods also apply for input objects.
-## setInputType
-Changes the input type. default: text
+| | |
+|---|---|
+|[setInputType](objects/Input/setInputType.md)|Sets the input type
+|[getInputType](objects/Input/getInputType.md)|Returns the input type
+|[setDefaultText](objects/Input/setDefaultText.md)|Sets the default text
+|[setInputLimit](objects/Input/setInputLimit.md)|Sets a limit to be able to write
+|[getInputLimit](objects/Input/getInputLimit.md)|Returns the limit
-#### Parameters:
-1. `string` input type ("text", "password", "number")
-
-#### Returns:
-1. `object` The object in use
-
-#### Usage:
-* Creates a default input and sets it to numbers only.
-```lua
-local mainFrame = basalt.createFrame()
-local aInput = mainFrame:addInput():setInputType("number")
-```
-```xml
-
-```
-
-## getInputType
-Gets the current input type
-
-#### Returns:
-1. `string` input type
-
-#### Usage:
-* Creates a default input and sets it to numbers only. Also prints the current input type to log.
-```lua
-local mainFrame = basalt.createFrame()
-local aInput = mainFrame:addInput():setInputType("number")
-basalt.debug(aInput:getInputType())
-```
-
-## setDefaultText
-Sets the default text. This will only be displayed if there is no input set by the user.
-
-#### Parameters:
-1. `string` input type ("text", "password", "number")
-2. `number|color` default background color - optional
-3. `number|color` default text color - optional
-
-#### Returns:
-1. `object` The object in use
-
-#### Usage:
-* Creates a default input and sets the default text to "...".
-```lua
-local mainFrame = basalt.createFrame()
-local aInput = mainFrame:addInput():setDefaultText("...")
-```
-```xml
-
-```
-
-## setInputLimit
-Sets a character limit to the input.
-
-#### Parameters:
-1. `number` character limit
-
-#### Returns:
-1. `object` The object in use
-
-#### Usage:
-* Creates a default input and sets the character limit to 8.
-```lua
-local mainFrame = basalt.createFrame()
-local aInput = mainFrame:addInput():setInputLimit(8)
-```
-```xml
-
-```
-
-## getInputLimit
-Returns the input limit.
-
-#### Returns:
-1. `number` character limit
-
-#### Usage:
-* Creates a default input and sets the character limit to 8. Prints the current limit.
-```lua
-local mainFrame = basalt.createFrame()
-local aInput = mainFrame:addInput():setInputLimit(8)
-basalt.debug(aInput:getInputLimit())
-```
diff --git a/docs/objects/Input/getInputLimit.md b/docs/objects/Input/getInputLimit.md
new file mode 100644
index 0000000..c3d8ce9
--- /dev/null
+++ b/docs/objects/Input/getInputLimit.md
@@ -0,0 +1,13 @@
+## getInputLimit
+Returns the input limit.
+
+#### Returns:
+1. `number` character limit
+
+#### Usage:
+* Creates a default input and sets the character limit to 8. Prints the current limit.
+```lua
+local mainFrame = basalt.createFrame()
+local aInput = mainFrame:addInput():setInputLimit(8)
+basalt.debug(aInput:getInputLimit())
+```
diff --git a/docs/objects/Input/getInputType.md b/docs/objects/Input/getInputType.md
new file mode 100644
index 0000000..0d9a9e6
--- /dev/null
+++ b/docs/objects/Input/getInputType.md
@@ -0,0 +1,13 @@
+## getInputType
+Gets the current input type
+
+#### Returns:
+1. `string` input type
+
+#### Usage:
+* Creates a default input and sets it to numbers only. Also prints the current input type to log.
+```lua
+local mainFrame = basalt.createFrame()
+local aInput = mainFrame:addInput():setInputType("number")
+basalt.debug(aInput:getInputType())
+```
\ No newline at end of file
diff --git a/docs/objects/Input/setDefaultText.md b/docs/objects/Input/setDefaultText.md
new file mode 100644
index 0000000..c492bed
--- /dev/null
+++ b/docs/objects/Input/setDefaultText.md
@@ -0,0 +1,20 @@
+## setDefaultText
+Sets the default text. This will only be displayed if there is no input set by the user.
+
+#### Parameters:
+1. `string` input type ("text", "password", "number")
+2. `number|color` default background color - optional
+3. `number|color` default text color - optional
+
+#### Returns:
+1. `object` The object in use
+
+#### Usage:
+* Creates a default input and sets the default text to "...".
+```lua
+local mainFrame = basalt.createFrame()
+local aInput = mainFrame:addInput():setDefaultText("...")
+```
+```xml
+
+```
\ No newline at end of file
diff --git a/docs/objects/Input/setInputLimit.md b/docs/objects/Input/setInputLimit.md
new file mode 100644
index 0000000..f029845
--- /dev/null
+++ b/docs/objects/Input/setInputLimit.md
@@ -0,0 +1,18 @@
+## setInputLimit
+Sets a character limit to the input.
+
+#### Parameters:
+1. `number` character limit
+
+#### Returns:
+1. `object` The object in use
+
+#### Usage:
+* Creates a default input and sets the character limit to 8.
+```lua
+local mainFrame = basalt.createFrame()
+local aInput = mainFrame:addInput():setInputLimit(8)
+```
+```xml
+
+```
\ No newline at end of file
diff --git a/docs/objects/Input/setInputType.md b/docs/objects/Input/setInputType.md
new file mode 100644
index 0000000..4cf2bb6
--- /dev/null
+++ b/docs/objects/Input/setInputType.md
@@ -0,0 +1,18 @@
+## setInputType
+Changes the input type. default: text
+
+#### Parameters:
+1. `string` input type ("text", "password", "number")
+
+#### Returns:
+1. `object` The object in use
+
+#### Usage:
+* Creates a default input and sets it to numbers only.
+```lua
+local mainFrame = basalt.createFrame()
+local aInput = mainFrame:addInput():setInputType("number")
+```
+```xml
+
+```
\ No newline at end of file
diff --git a/docs/objects/Label.md b/docs/objects/Label.md
index 343b579..7afa23f 100644
--- a/docs/objects/Label.md
+++ b/docs/objects/Label.md
@@ -4,74 +4,10 @@ By default label's width is auto sizing based on the length of the text. If you
The fontsize feature is calculated by bigfonts, a library made by Wojbie (http://www.computercraft.info/forums2/index.php?/topic/25367-bigfont-api-write-bigger-letters-v10/)
-Here are all possible functions available for labels.
-Remember Label inherits from [Object](objects/Object.md)
+[Object](objects/Object.md) methods also apply for labels.
-## setText
-Sets the text which gets displayed.
-
-#### Parameters:
-1. `string` The text which should be displayed
-
-#### Returns:
-1. `object` The object in use
-
-#### Usage:
-* Creates a default label with text "Some random text".
-```lua
-local mainFrame = basalt.createFrame()
-local aLabel = mainFrame:addLabel():setText("Some random text")
-```
-```xml
-
-```
-
-## setFontSize
-Sets the font size, calculated by bigfonts. Default size is 1.
-
-#### Parameters:
-1. `number` The size (1, 2, 3, 4)
-
-#### Returns:
-1. `object` The object in use
-
-#### Usage:
-* Creates a default label, sets the text to "Basalt!" and its font size to 2.
-```lua
-local mainFrame = basalt.createFrame()
-local aLabel = mainFrame:addLabel():setText("Basalt!"):setFontSize(2)
-```
-```xml
-
-```
-
-## getFontSize
-Returns the current font size
-
-#### Returns:
-1. `number` font size
-
-#### Usage:
-* Creates a default label, sets the text to "Basalt!" and its font size to 2. Also prints the current fontsize.
-```lua
-local mainFrame = basalt.createFrame()
-local aLabel = mainFrame:addLabel():setText("Basalt!"):setFontSize(2)
-basalt.debug(aLabel:getFontSize())
-```
-
-## setTextAlign
-Changes the text align
-
-#### Returns:
-1. `string` horizontal ("left", "center", "right")
-1. `string` vertical ("top", "center", "bottom")
-
-#### Usage:
-* Creates a default label, sets the text to "Basalt!" changes the horizontal align to right
-```lua
-local mainFrame = basalt.createFrame()
-local aLabel = mainFrame:addLabel():setText("Basalt!"):setTextAlign("right")
-```
-```xml
-
-```
+| | |
+|---|---|
+|[setText](objects/Input/setInputType.md)|Sets the input type
+|[setFontSize](objects/Input/getInputType.md)|Returns the input type
+|[getFontSize](objects/Input/setDefaultText.md)|Sets the default text
diff --git a/docs/objects/Label/getFontSize.md b/docs/objects/Label/getFontSize.md
new file mode 100644
index 0000000..2a61c14
--- /dev/null
+++ b/docs/objects/Label/getFontSize.md
@@ -0,0 +1,13 @@
+## getFontSize
+Returns the current font size
+
+#### Returns:
+1. `number` font size
+
+#### Usage:
+* Creates a default label, sets the text to "Basalt!" and its font size to 2. Also prints the current fontsize.
+```lua
+local mainFrame = basalt.createFrame()
+local aLabel = mainFrame:addLabel():setText("Basalt!"):setFontSize(2)
+basalt.debug(aLabel:getFontSize())
+```
\ No newline at end of file
diff --git a/docs/objects/Label/setFontSize.md b/docs/objects/Label/setFontSize.md
new file mode 100644
index 0000000..24b98a6
--- /dev/null
+++ b/docs/objects/Label/setFontSize.md
@@ -0,0 +1,18 @@
+## setFontSize
+Sets the font size, calculated by bigfonts. Default size is 1.
+
+#### Parameters:
+1. `number` The size (1, 2, 3, 4)
+
+#### Returns:
+1. `object` The object in use
+
+#### Usage:
+* Creates a default label, sets the text to "Basalt!" and its font size to 2.
+```lua
+local mainFrame = basalt.createFrame()
+local aLabel = mainFrame:addLabel():setText("Basalt!"):setFontSize(2)
+```
+```xml
+
+```
\ No newline at end of file
diff --git a/docs/objects/Label/setText.md b/docs/objects/Label/setText.md
new file mode 100644
index 0000000..f50f322
--- /dev/null
+++ b/docs/objects/Label/setText.md
@@ -0,0 +1,18 @@
+## setText
+Sets the text which gets displayed.
+
+#### Parameters:
+1. `string` The text which should be displayed
+
+#### Returns:
+1. `object` The object in use
+
+#### Usage:
+* Creates a default label with text "Some random text".
+```lua
+local mainFrame = basalt.createFrame()
+local aLabel = mainFrame:addLabel():setText("Some random text")
+```
+```xml
+
+```
\ No newline at end of file
diff --git a/docs/objects/List.md b/docs/objects/List.md
index c9dfb8c..7e3dcb4 100644
--- a/docs/objects/List.md
+++ b/docs/objects/List.md
@@ -1,279 +1,31 @@
Lists are objects where you can create endless entries, and the user is able to select one of them
-If you want to access values inside items this is how the table for single items is made (just a example):
+[Object](objects/Object.md) methods also apply for lists.
+
+| | |
+|---|---|
+|[addItem](objects/List/addItem.md)|Adds a new item into the list
+|[removeItem](objects/List/removeItem.md)|Removes a item from the list
+|[editItem](objects/List/editItem.md)|Changes a already existing item in the list
+|[getItem](objects/List/getItem.md)|Returns a item by its index
+|[getItemCount](objects/List/getItemCount.md)|Returns the item count
+|[getAll](objects/List/getAll.md)|Returns the entire list as a table
+|[selectItem](objects/List/selectItem.md)|Selects a item
+|[clear](objects/List/clear.md)|Makes the entire list empty
+|[getItemIndex](objects/List/getItemIndex.md)|Returns the currently active item index
+|[setSelectedItem](objects/List/setSelectedItem.md)|Changes the default bg and fg, when the user selects a item
+|[setOffset](objects/List/setOffset.md)|Changes the list offset
+|[getOffset](objects/List/getOffset.md)|Returns the current offset
+|[setScrollable](objects/List/setScrollable.md)|Makes the list scrollable
+
+
+A item-table in lists looks like the following example:
```lua
item = {
- text="1. Entry",
- bgCol=colors.black,
- fgCol=colors.white
- args = {}
+ text="1. Entry", -- the text its showing
+ bgCol=colors.black, -- the background color
+ fgCol=colors.white -- the foreground color
+ args = {} -- custom args you want to pass, which you will be able to access in for example onChange events
}
-```
-
-Remember Lists also inherits from [Object](objects/Object.md)
-
-## addItem
-Adds a item into the list
-
-#### Parameters:
-1. `string` The entry name
-2. `number|color` unique default background color - optional
-3. `number|color` unique default text color - optional
-4. `any` any value - you could access this later in a :onChange() event (you need to use :getValue()) - optional
-
-#### Returns:
-1. `object` The object in use
-
-#### Usage:
-* Creates a default list with 3 entries
-```lua
-local mainFrame = basalt.createFrame()
-local aList = mainFrame:addList()
-aList:addItem("1. Entry")
-aList:addItem("2. Entry",colors.yellow)
-aList:addItem("3. Entry",colors.yellow,colors.green)
-```
-```xml
-
- 1. Entry
- 2. Entryyellow
- 3. Entryyellowgreen
-
-```
-
-## removeItem
-Removes a item from the list
-
-#### Parameters:
-1. `number` The index which should get removed
-
-#### Returns:
-1. `object` The object in use
-
-#### Usage:
-* Creates a default list with 3 entries and removes the second one.
-```lua
-local mainFrame = basalt.createFrame()
-local aList = mainFrame:addList()
-aList:addItem("1. Entry")
-aList:addItem("2. Entry",colors.yellow)
-aList:addItem("3. Entry",colors.yellow,colors.green)
-aList:removeItem(2)
-```
-
-## editItem
-Edits a item from the list
-
-#### Parameters:
-1. `number` The index which should be edited
-2. `string` The new item name
-3. `number` the new item background color - optional
-4. `number` The new item text color - optional
-5. `any` New additional information - optional
-
-#### Returns:
-1. `object` The object in use
-
-#### Usage:
-* Creates a default list with 3 entries and changes the second one.
-```lua
-local mainFrame = basalt.createFrame()
-local aList = mainFrame:addList()
-aList:addItem("1. Entry")
-aList:addItem("2. Entry",colors.yellow)
-aList:addItem("3. Entry",colors.yellow,colors.green)
-aList:editItem(2, "Still 2. Entry", colors.red)
-```
-
-## getItem
-Returns a item by index
-
-#### Parameters:
-1. `number` The index which should be returned
-
-#### Returns:
-1. `table` The item table example: {text="1. Entry", bgCol=colors.black, fgCol=colors.white}
-
-#### Usage:
-* Creates a default list with 3 entries and edits the second one.
-```lua
-local mainFrame = basalt.createFrame()
-local aList = mainFrame:addList()
-aList:addItem("1. Entry")
-aList:addItem("2. Entry",colors.yellow)
-aList:addItem("3. Entry",colors.yellow,colors.green)
-basalt.debug(aList:getItem(2).text)
-```
-
-## getItemCount
-Returns the current item count
-
-#### Returns:
-1. `number` The item list count
-
-#### Usage:
-* Creates a default list with 3 entries and prints the current item count.
-```lua
-local mainFrame = basalt.createFrame()
-local aList = mainFrame:addList()
-aList:addItem("1. Entry")
-aList:addItem("2. Entry",colors.yellow)
-aList:addItem("3. Entry",colors.yellow,colors.green)
-basalt.debug(aList:getItemCount())
-```
-
-## getAll
-Returns all items as table
-
-#### Returns:
-1. `table` All items
-
-#### Usage:
-* Creates a default menubar with 3 entries and prints a table.
-```lua
-local mainFrame = basalt.createFrame()
-local aList = mainFrame:addList()
-aList:addItem("1. Entry")
-aList:addItem("2. Entry",colors.yellow)
-aList:addItem("3. Entry",colors.yellow,colors.green)
-basalt.debug(aList:getAll())
-```
-
-## selectItem
-selects a item in the list (same as a player would click on a item)
-
-#### Parameters:
-1. `number` The index which should get selected
-
-#### Returns:
-1. `object` The object in use
-
-#### Usage:
-* Creates a default list with 3 entries and selects the second entry.
-```lua
-local mainFrame = basalt.createFrame()
-local aList = mainFrame:addList()
-aList:addItem("1. Entry")
-aList:addItem("2. Entry",colors.yellow)
-aList:addItem("3. Entry",colors.yellow,colors.green)
-aList:selectItem(2)
-```
-
-## clear
-Removes all items.
-
-#### Returns:
-1. `object` The object in use
-
-#### Usage:
-* Creates a default list with 3 entries and removes them immediatley. Which makes no sense.
-```lua
-local mainFrame = basalt.createFrame()
-local aList = mainFrame:addList()
-aList:addItem("1. Entry")
-aList:addItem("2. Entry",colors.yellow)
-aList:addItem("3. Entry",colors.yellow,colors.green)
-aList:clear()
-```
-
-## getItemIndex
-returns the item index of the currently selected item
-
-#### Returns:
-1. `number` The current index
-
-#### Usage:
-* Creates a default list with 3 entries selects the second entry and prints the currently selected index.
-```lua
-local mainFrame = basalt.createFrame()
-local aList = mainFrame:addList()
-aList:addItem("1. Entry")
-aList:addItem("2. Entry",colors.yellow)
-aList:addItem("3. Entry",colors.yellow,colors.green)
-aList:selectItem(2)
-basalt.debug(aList:getItemIndex())
-```
-
-## setSelectedItem
-Sets the background and the foreground of the item which is currently selected
-
-#### Parameters:
-1. `number|color` The background color which should be used
-2. `number|color` The text color which should be used
-
-#### Returns:
-1. `object` The object in use
-
-#### Usage:
-* Creates a default list with 4 entries and sets the selection background color to green.
-```lua
-local mainFrame = basalt.createFrame()
-local aList = mainFrame:addList()
-aList:addItem("1. Entry")
-aList:addItem("2. Entry",colors.yellow)
-aList:addItem("3. Entry",colors.yellow,colors.green)
-aList:addItem("4. Entry")
-aList:setSelectedItem(colors.green, colors.red)
-```
-```xml
-
- 1. Entry
- 2. Entryyellow
- 2. Entryyellowgreen
-
-```
-
-## setOffset
-Sets the offset of the list (the same as you would scroll) - default is 0
-
-#### Parameters:
-1. `number` The offset value
-
-#### Returns:
-1. `object` The object in use
-
-#### Usage:
-* Creates a default list with 6 entries and sets the offset to 3.
-```lua
-local mainFrame = basalt.createFrame()
-local aList = mainFrame:addList()
- :addItem("1. Entry")
- :addItem("2. Entry")
- :addItem("3. Entry")
- :addItem("4. Entry")
- :addItem("5. Entry")
- :addItem("6. Entry")
- :setOffset(3)
-```
-```xml
-
- 1. Entry
- 2. Entry
- 3. Entry
- 4. Entry
- 5. Entry
- 6. Entry
-
-```
-
-## getOffset
-Returns the current index offset
-
-#### Returns:
-1. `number` offset value
-
-#### Usage:
-* Creates a default list with 6 entries and sets the offset to 3, also prints the current offset.
-```lua
-local mainFrame = basalt.createFrame()
-local aList = mainFrame:addList()
- :addItem("1. Entry")
- :addItem("2. Entry")
- :addItem("3. Entry")
- :addItem("4. Entry")
- :addItem("5. Entry")
- :addItem("6. Entry")
- :setOffset(3)
-basalt.debug(aList:getOffset())
-```
+```
\ No newline at end of file
diff --git a/docs/objects/List/addItem.md b/docs/objects/List/addItem.md
new file mode 100644
index 0000000..da4f1dd
--- /dev/null
+++ b/docs/objects/List/addItem.md
@@ -0,0 +1,28 @@
+## addItem
+Adds a item into the list
+
+#### Parameters:
+1. `string` The entry name
+2. `number|color` unique default background color - optional
+3. `number|color` unique default text color - optional
+4. `any` any value - you could access this later in a :onChange() event (you need to use :getValue()) - optional
+
+#### Returns:
+1. `object` The object in use
+
+#### Usage:
+* Creates a default list with 3 entries
+```lua
+local mainFrame = basalt.createFrame()
+local aList = mainFrame:addList()
+aList:addItem("1. Entry")
+aList:addItem("2. Entry",colors.yellow)
+aList:addItem("3. Entry",colors.yellow,colors.green)
+```
+```xml
+
+ 1. Entry
+ 2. Entryyellow
+ 3. Entryyellowgreen
+
+```
\ No newline at end of file
diff --git a/docs/objects/List/clear.md b/docs/objects/List/clear.md
new file mode 100644
index 0000000..d5c777e
--- /dev/null
+++ b/docs/objects/List/clear.md
@@ -0,0 +1,16 @@
+## clear
+Removes all items.
+
+#### Returns:
+1. `object` The object in use
+
+#### Usage:
+* Creates a default list with 3 entries and removes them immediatley. Which makes no sense.
+```lua
+local mainFrame = basalt.createFrame()
+local aList = mainFrame:addList()
+aList:addItem("1. Entry")
+aList:addItem("2. Entry",colors.yellow)
+aList:addItem("3. Entry",colors.yellow,colors.green)
+aList:clear()
+```
\ No newline at end of file
diff --git a/docs/objects/List/editItem.md b/docs/objects/List/editItem.md
new file mode 100644
index 0000000..10aa23b
--- /dev/null
+++ b/docs/objects/List/editItem.md
@@ -0,0 +1,23 @@
+## editItem
+Edits a item from the list
+
+#### Parameters:
+1. `number` The index which should be edited
+2. `string` The new item name
+3. `number` the new item background color - optional
+4. `number` The new item text color - optional
+5. `any` New additional information - optional
+
+#### Returns:
+1. `object` The object in use
+
+#### Usage:
+* Creates a default list with 3 entries and edits the second one.
+```lua
+local mainFrame = basalt.createFrame()
+local aList = mainFrame:addList()
+aList:addItem("1. Entry")
+aList:addItem("2. Entry",colors.yellow)
+aList:addItem("3. Entry",colors.yellow,colors.green)
+aList:editItem(2, "Still 2. Entry", colors.red)
+```
\ No newline at end of file
diff --git a/docs/objects/List/getAll.md b/docs/objects/List/getAll.md
new file mode 100644
index 0000000..dbff4da
--- /dev/null
+++ b/docs/objects/List/getAll.md
@@ -0,0 +1,16 @@
+## getAll
+Returns all items as table
+
+#### Returns:
+1. `table` All items
+
+#### Usage:
+* Creates a default menubar with 3 entries and prints a table.
+```lua
+local mainFrame = basalt.createFrame()
+local aList = mainFrame:addList()
+aList:addItem("1. Entry")
+aList:addItem("2. Entry",colors.yellow)
+aList:addItem("3. Entry",colors.yellow,colors.green)
+basalt.debug(aList:getAll())
+```
\ No newline at end of file
diff --git a/docs/objects/List/getItem.md b/docs/objects/List/getItem.md
new file mode 100644
index 0000000..d6404d5
--- /dev/null
+++ b/docs/objects/List/getItem.md
@@ -0,0 +1,19 @@
+## getItem
+Returns a item by index
+
+#### Parameters:
+1. `number` The index which should be returned
+
+#### Returns:
+1. `table` The item table example: {text="1. Entry", bgCol=colors.black, fgCol=colors.white}
+
+#### Usage:
+* Creates a default list with 3 entries and edits the second one.
+```lua
+local mainFrame = basalt.createFrame()
+local aList = mainFrame:addList()
+aList:addItem("1. Entry")
+aList:addItem("2. Entry",colors.yellow)
+aList:addItem("3. Entry",colors.yellow,colors.green)
+basalt.debug(aList:getItem(2).text)
+```
\ No newline at end of file
diff --git a/docs/objects/List/getItemCount.md b/docs/objects/List/getItemCount.md
new file mode 100644
index 0000000..b7169ed
--- /dev/null
+++ b/docs/objects/List/getItemCount.md
@@ -0,0 +1,16 @@
+## getItemCount
+Returns the current item count
+
+#### Returns:
+1. `number` The item list count
+
+#### Usage:
+* Creates a default list with 3 entries and prints the current item count.
+```lua
+local mainFrame = basalt.createFrame()
+local aList = mainFrame:addList()
+aList:addItem("1. Entry")
+aList:addItem("2. Entry",colors.yellow)
+aList:addItem("3. Entry",colors.yellow,colors.green)
+basalt.debug(aList:getItemCount())
+```
\ No newline at end of file
diff --git a/docs/objects/List/getItemIndex.md b/docs/objects/List/getItemIndex.md
new file mode 100644
index 0000000..6fd2ae2
--- /dev/null
+++ b/docs/objects/List/getItemIndex.md
@@ -0,0 +1,17 @@
+## getItemIndex
+returns the item index of the currently selected item
+
+#### Returns:
+1. `number` The current index
+
+#### Usage:
+* Creates a default list with 3 entries selects the second entry and prints the currently selected index.
+```lua
+local mainFrame = basalt.createFrame()
+local aList = mainFrame:addList()
+aList:addItem("1. Entry")
+aList:addItem("2. Entry",colors.yellow)
+aList:addItem("3. Entry",colors.yellow,colors.green)
+aList:selectItem(2)
+basalt.debug(aList:getItemIndex())
+```
\ No newline at end of file
diff --git a/docs/objects/List/getOffset.md b/docs/objects/List/getOffset.md
new file mode 100644
index 0000000..ba9347d
--- /dev/null
+++ b/docs/objects/List/getOffset.md
@@ -0,0 +1,22 @@
+## getOffset
+Returns the current index offset
+
+#### Returns:
+1. `number` offset value
+
+#### Usage:
+* Creates a default dropdown with 6 entries and sets the offset to 3, also prints the current offset.
+```lua
+local mainFrame = basalt.createFrame()
+local aList = mainFrame:addList()
+ :addItem("1. Entry")
+ :addItem("2. Entry")
+ :addItem("3. Entry")
+ :addItem("4. Entry")
+ :addItem("5. Entry")
+ :addItem("6. Entry")
+ :addItem("7. Entry")
+ :addItem("8. Entry")
+ :setOffset(3)
+basalt.debug(aList:getOffset())
+```
\ No newline at end of file
diff --git a/docs/objects/List/removeItem.md b/docs/objects/List/removeItem.md
new file mode 100644
index 0000000..f28857c
--- /dev/null
+++ b/docs/objects/List/removeItem.md
@@ -0,0 +1,19 @@
+## removeItem
+Removes a item from the list
+
+#### Parameters:
+1. `number` The index which should get removed
+
+#### Returns:
+1. `object` The object in use
+
+#### Usage:
+* Creates a default list with 3 entries and removes the second one.
+```lua
+local mainFrame = basalt.createFrame()
+local aList = mainFrame:addList()
+aList:addItem("1. Entry")
+aList:addItem("2. Entry",colors.yellow)
+aList:addItem("3. Entry",colors.yellow,colors.green)
+aList:removeItem(2)
+```
\ No newline at end of file
diff --git a/docs/objects/List/selectItem.md b/docs/objects/List/selectItem.md
new file mode 100644
index 0000000..adf44f7
--- /dev/null
+++ b/docs/objects/List/selectItem.md
@@ -0,0 +1,19 @@
+## selectItem
+selects a item in the list (same as a player would click on a item)
+
+#### Parameters:
+1. `number` The index which should get selected
+
+#### Returns:
+1. `object` The object in use
+
+#### Usage:
+* Creates a default list with 3 entries and selects the second entry.
+```lua
+local mainFrame = basalt.createFrame()
+local aList = mainFrame:addList()
+aList:addItem("1. Entry")
+aList:addItem("2. Entry",colors.yellow)
+aList:addItem("3. Entry",colors.yellow,colors.green)
+aList:selectItem(2)
+```
\ No newline at end of file
diff --git a/docs/objects/List/setOffset.md b/docs/objects/List/setOffset.md
new file mode 100644
index 0000000..291a7a2
--- /dev/null
+++ b/docs/objects/List/setOffset.md
@@ -0,0 +1,32 @@
+## setOffset
+Sets the offset of the list (the same as you would scroll) - default is 0
+
+#### Parameters:
+1. `number` The offset value
+
+#### Returns:
+1. `object` The object in use
+
+#### Usage:
+* Creates a default list with 6 entries and sets the offset to 3.
+```lua
+local mainFrame = basalt.createFrame()
+local aList = mainFrame:addList()
+ :addItem("1. Entry")
+ :addItem("2. Entry")
+ :addItem("3. Entry")
+ :addItem("4. Entry")
+ :addItem("5. Entry")
+ :addItem("6. Entry")
+ :setOffset(3)
+```
+```xml
+
+ 1. Entry
+ 2. Entry
+ 3. Entry
+ 4. Entry
+ 5. Entry
+ 6. Entry
+
+```
\ No newline at end of file
diff --git a/docs/objects/List/setScrollable.md b/docs/objects/List/setScrollable.md
new file mode 100644
index 0000000..7fcf2e6
--- /dev/null
+++ b/docs/objects/List/setScrollable.md
@@ -0,0 +1,38 @@
+## setScrollable
+Makes it possible to scroll while the mouse is over the list
+
+#### Parameters:
+1. `boolean` If the list should be scrollable or not
+
+#### Returns:
+1. `object` The object in use
+
+#### Usage:
+* Creates a new list and makes it scrollable
+```lua
+local mainFrame = basalt.createFrame()
+local aList = mainFrame:addList():setScrollable(true)
+ :addItem("1. Entry")
+ :addItem("2. Entry")
+ :addItem("3. Entry")
+ :addItem("4. Entry")
+ :addItem("5. Entry")
+ :addItem("6. Entry")
+ :addItem("7. Entry")
+ :addItem("8. Entry")
+ :addItem("9. Entry")
+
+```
+```xml
+
+ 1. Entry
+ 2. Entry
+ 3. Entry
+ 4. Entry
+ 5. Entry
+ 6. Entry
+ 7. Entry
+ 8. Entry
+ 9. Entry
+
+```
\ No newline at end of file
diff --git a/docs/objects/List/setSelectedItem.md b/docs/objects/List/setSelectedItem.md
new file mode 100644
index 0000000..b60a71b
--- /dev/null
+++ b/docs/objects/List/setSelectedItem.md
@@ -0,0 +1,28 @@
+## setSelectedItem
+Sets the background and the foreground of the item which is currently selected
+
+#### Parameters:
+1. `number|color` The background color which should be used
+2. `number|color` The text color which should be used
+
+#### Returns:
+1. `object` The object in use
+
+#### Usage:
+* Creates a default list with 4 entries and sets the selection background color to green.
+```lua
+local mainFrame = basalt.createFrame()
+local aList = mainFrame:addList()
+aList:addItem("1. Entry")
+aList:addItem("2. Entry",colors.yellow)
+aList:addItem("3. Entry",colors.yellow,colors.green)
+aList:addItem("4. Entry")
+aList:setSelectedItem(colors.green, colors.red)
+```
+```xml
+
+ 1. Entry
+ 2. Entryyellow
+ 2. Entryyellowgreen
+
+```
\ No newline at end of file
diff --git a/docs/objects/Menubar.md b/docs/objects/Menubar.md
index 4990f0f..f8cd95c 100644
--- a/docs/objects/Menubar.md
+++ b/docs/objects/Menubar.md
@@ -1,337 +1,32 @@
-Menubars are like lists but instead of being vertical, they are horizontal. Imagine you are creating a Operating System and you would like to add a taskbar, menubars would be exactly what you need, because they are also scrollable, which means they have endless entry possibility.
+Menubars are like lists but instead of being vertical, they are horizontal. Imagine you are creating a Operating System and you would like to add a taskbar, menubars would be exactly what you need, because they are also scrollable, which means they can have endless entries.
-If you want to access values inside items this is how the table for single items is made (just a example):
+[Object](objects/Object.md) methods also apply for menubars.
+
+| | |
+|---|---|
+|[addItem](objects/Menubar/addItem.md)|Adds a new item into the list
+|[removeItem](objects/Menubar/removeItem.md)|Removes a item from the list
+|[editItem](objects/Menubar/editItem.md)|Changes a already existing item in the list
+|[getItem](objects/Menubar/getItem.md)|Returns a item by its index
+|[getItemCount](objects/Menubar/getItemCount.md)|Returns the item count
+|[getAll](objects/Menubar/getAll.md)|Returns the entire list as a table
+|[selectItem](objects/Menubar/selectItem.md)|Selects a item
+|[clear](objects/Menubar/clear.md)|Makes the entire list empty
+|[getItemIndex](objects/Menubar/getItemIndex.md)|Returns the currently active item index
+|[setSelectedItem](objects/Menubar/setSelectedItem.md)|Changes the default bg and fg, when the user selects a item
+|[setOffset](objects/Menubar/setOffset.md)|Changes the list offset
+|[getOffset](objects/Menubar/getOffset.md)|Returns the current offset
+|[setScrollable](objects/Menubar/setScrollable.md)|Makes the list scrollable
+|[setSpace](objects/Menubar/setSpace.md)|Adds space between the entries
+
+
+A item-table in menubars looks like the following example:
```lua
item = {
- text="1. Entry",
- bgCol=colors.black,
- fgCol=colors.white
- args = {}
+ text="1. Entry", -- the text its showing
+ bgCol=colors.black, -- the background color
+ fgCol=colors.white -- the foreground color
+ args = {} -- custom args you want to pass, which you will be able to access in for example onChange events
}
-```
-
-Remember menubar inherits from [Object](objects/Object.md)
-
-## addItem
-Adds a item into the menubar
-
-#### Parameters:
-1. `string` The entry name
-2. `number|color` unique default background color - optional
-3. `number|color` unique default text color - optional
-4. `any` any value - you could access this later in a :onChange() event (you need to use :getValue()) - optional
-
-#### Returns:
-1. `object` The object in use
-
-#### Usage:
-* Creates a default menubar with 3 entries
-```lua
-local mainFrame = basalt.createFrame()
-local aMenubar = mainFrame:addMenubar()
-aMenubar:addItem("1. Entry")
-aMenubar:addItem("2. Entry",colors.yellow)
-aMenubar:addItem("3. Entry",colors.yellow,colors.green)
-```
-```xml
-
-1. Entry
-2. Entryyellow
-3. Entryyellowgreen
-
-```
-
-## removeItem
-Removes a item from the menubar
-
-#### Parameters:
-1. `number` The index which should get removed
-
-#### Returns:
-1. `object` The object in use
-
-#### Usage:
-* Creates a default menubar with 3 entries and removes the second one.
-```lua
-local mainFrame = basalt.createFrame()
-local aMenubar = mainFrame:addMenubar()
-aMenubar:addItem("1. Entry")
-aMenubar:addItem("2. Entry",colors.yellow)
-aMenubar:addItem("3. Entry",colors.yellow,colors.green)
-aMenubar:removeItem(2)
-```
-
-## editItem
-Edits a item from the menubar
-
-#### Parameters:
-1. `number` The index which should be edited
-2. `string` The new item name
-3. `number` the new item background color - optional
-4. `number` The new item text color - optional
-5. `any` New additional information - optional
-
-#### Returns:
-1. `object` The object in use
-
-#### Usage:
-* Creates a default menubar with 3 entries and edits the second one.
-```lua
-local mainFrame = basalt.createFrame()
-local aMenubar = mainFrame:addMenubar()
-aMenubar:addItem("1. Entry")
-aMenubar:addItem("2. Entry",colors.yellow)
-aMenubar:addItem("3. Entry",colors.yellow,colors.green)
-aMenubar:editItem(2, "Still 2. Entry", colors.red)
-```
-
-## getItem
-Returns a item by index
-
-#### Parameters:
-1. `number` The index which should be returned
-
-#### Returns:
-1. `table` The item table example: {text="1. Entry", bgCol=colors.black, fgCol=colors.white}
-
-#### Usage:
-* Creates a default menubar with 3 entries and edits the second one.
-```lua
-local mainFrame = basalt.createFrame()
-local aMenubar = mainFrame:addMenubar()
-aMenubar:addItem("1. Entry")
-aMenubar:addItem("2. Entry",colors.yellow)
-aMenubar:addItem("3. Entry",colors.yellow,colors.green)
-basalt.debug(aMenubar:getItem(2).text)
-```
-
-## getItemCount
-Returns the current item count
-
-#### Returns:
-1. `number` The item list count
-
-#### Usage:
-* Creates a default menubar with 3 entries and prints the current item count.
-```lua
-local mainFrame = basalt.createFrame()
-local aMenubar = mainFrame:addMenubar()
-aMenubar:addItem("1. Entry")
-aMenubar:addItem("2. Entry",colors.yellow)
-aMenubar:addItem("3. Entry",colors.yellow,colors.green)
-basalt.debug(aMenubar:getItemCount())
-```
-
-## getAll
-Returns all items as table
-
-#### Returns:
-1. `table` All items
-
-#### Usage:
-* Creates a default menubar with 3 entries and prints a table.
-```lua
-local mainFrame = basalt.createFrame()
-local aMenubar = mainFrame:addMenubar()
-aMenubar:addItem("1. Entry")
-aMenubar:addItem("2. Entry",colors.yellow)
-aMenubar:addItem("3. Entry",colors.yellow,colors.green)
-basalt.debug(aMenubar:getAll())
-```
-
-## setSpace
-Sets the space between entries
-
-#### Parameters:
-1. `number` The space between each entry
-
-#### Returns:
-1. `object` The object in use
-
-#### Usage:
-* Creates a default menubar with 3 entries and changes the space to 3.
-```lua
-local mainFrame = basalt.createFrame()
-local aMenubar = mainFrame:addMenubar()
-aMenubar:addItem("1. Entry")
-aMenubar:addItem("2. Entry",colors.yellow)
-aMenubar:addItem("3. Entry",colors.yellow,colors.green)
-aMenubar:setSpace(3)
-```
-```xml
-
-1. Entry
-2. Entryyellow
-3. Entryyellowgreen
-
-```
-
-
-
-## setScrollable
-Makes the menubar scrollable. The menubar will be scrollable as soon as the menubar is to small for all the entries.
-
-#### Parameters:
-1. `boolean` if this menubar should be scrollable or not
-
-#### Returns:
-1. `object` The object in use
-
-#### Usage:
-* Creates a default menubar with 3 entries and makes it scrollable.
-```lua
-local mainFrame = basalt.createFrame()
-local aMenubar = mainFrame:addMenubar()
-aMenubar:addItem("1. Entry")
-aMenubar:addItem("2. Entry",colors.yellow)
-aMenubar:addItem("3. Entry",colors.yellow,colors.green)
-aMenubar:setScrollable(true)
-```
-```xml
-
-1. Entry
-2. Entryyellow
-3. Entryyellowgreen
-
-```
-
-## selectItem
-selects a item in the list (same as a player would click on a item)
-
-#### Parameters:
-1. `number` The index which should get selected
-
-#### Returns:
-1. `object` The object in use
-
-#### Usage:
-* Creates a default menubar with 3 entries and selects the second entry.
-```lua
-local mainFrame = basalt.createFrame()
-local aMenubar = mainFrame:addMenubar()
-aMenubar:addItem("1. Entry")
-aMenubar:addItem("2. Entry",colors.yellow)
-aMenubar:addItem("3. Entry",colors.yellow,colors.green)
-aMenubar:selectItem(2)
-```
-
-
-## clear
-Removes all items.
-
-#### Returns:
-1. `object` The object in use
-
-#### Usage:
-* Creates a default menubar with 3 entries and removes them immediatley. Which makes no sense.
-```lua
-local mainFrame = basalt.createFrame()
-local aMenubar = mainFrame:addMenubar()
-aMenubar:addItem("1. Entry")
-aMenubar:addItem("2. Entry",colors.yellow)
-aMenubar:addItem("3. Entry",colors.yellow,colors.green)
-aMenubar:clear()
-```
-
-## getItemIndex
-returns the item index of the currently selected item
-
-#### Returns:
-1. `number` The current index
-
-#### Usage:
-* Creates a default menubar with 3 entries selects the second entry and prints the currently selected index.
-```lua
-local mainFrame = basalt.createFrame()
-local aMenubar = mainFrame:addMenubar()
-aMenubar:addItem("1. Entry")
-aMenubar:addItem("2. Entry",colors.yellow)
-aMenubar:addItem("3. Entry",colors.yellow,colors.green)
-aMenubar:selectItem(2)
-basalt.debug(aMenubar:getItemIndex())
-```
-
-## setSelectedItem
-Sets the background and the foreground of the item which is currently selected
-
-#### Parameters:
-1. `number|color` The background color which should be used
-2. `number|color` The text color which should be used
-
-#### Returns:
-1. `object` The object in use
-
-#### Usage:
-* Creates a default menubar with 4 entries and sets the selection background color to green.
-```lua
-local mainFrame = basalt.createFrame()
-local aMenubar = mainFrame:addMenubar()
-aMenubar:addItem("1. Entry")
-aMenubar:addItem("2. Entry")
-aMenubar:addItem("3. Entry")
-aMenubar:addItem("4. Entry")
-aMenubar:setSelectedItem(colors.green, colors.yellow)
-```
-```xml
-
-1. Entry
-2. Entry
-3. Entry
-4. Entry
-
-```
-
-## setOffset
-Sets the offset of the menubar (the same as you would scroll) - default is 0
-
-#### Parameters:
-1. `number` The offset value
-
-#### Returns:
-1. `object` The object in use
-
-#### Usage:
-* Creates a default menubar with 6 entries and sets the offset to 3.
-```lua
-local mainFrame = basalt.createFrame()
-local aMenubar = mainFrame:addMenubar()
-aMenubar:addItem("1. Entry")
-aMenubar:addItem("2. Entry")
-aMenubar:addItem("3. Entry")
-aMenubar:addItem("4. Entry")
-aMenubar:addItem("5. Entry")
-aMenubar:addItem("6. Entry")
-aMenubar:setOffset(3)
-```
-```xml
-
-1. Entry
-2. Entry
-3. Entry
-4. Entry
-5. Entry
-6. Entry
-
-```
-
-## getOffset
-returns the current offset
-
-#### Returns:
-1. `number` Current offset
-
-#### Usage:
-* Creates a default menubar with 6 entries and sets the offset to 3, prints the current offset.
-```lua
-local mainFrame = basalt.createFrame()
-local aMenubar = mainFrame:addMenubar()
-aMenubar:addItem("1. Entry")
-aMenubar:addItem("2. Entry")
-aMenubar:addItem("3. Entry")
-aMenubar:addItem("4. Entry")
-aMenubar:addItem("5. Entry")
-aMenubar:addItem("6. Entry")
-aMenubar:getOffset(3)
-basalt.debug(aMenubar:getOffset())
-```
+```
\ No newline at end of file
diff --git a/docs/objects/Menubar/addItem.md b/docs/objects/Menubar/addItem.md
new file mode 100644
index 0000000..31aac68
--- /dev/null
+++ b/docs/objects/Menubar/addItem.md
@@ -0,0 +1,28 @@
+## addItem
+Adds a item into the list
+
+#### Parameters:
+1. `string` The entry name
+2. `number|color` unique default background color - optional
+3. `number|color` unique default text color - optional
+4. `any` any value - you could access this later in a :onChange() event (you need to use :getValue()) - optional
+
+#### Returns:
+1. `object` The object in use
+
+#### Usage:
+* Creates a default menubar with 3 entries
+```lua
+local mainFrame = basalt.createFrame()
+local aMenubar = mainFrame:addMenubar()
+ :addItem("1. Entry")
+ :addItem("2. Entry",colors.yellow)
+ :addItem("3. Entry",colors.yellow,colors.green)
+```
+```xml
+
+ 1. Entry
+ 2. Entryyellow
+ 3. Entryyellowgreen
+
+```
\ No newline at end of file
diff --git a/docs/objects/Menubar/clear.md b/docs/objects/Menubar/clear.md
new file mode 100644
index 0000000..d394237
--- /dev/null
+++ b/docs/objects/Menubar/clear.md
@@ -0,0 +1,16 @@
+## clear
+Removes all items.
+
+#### Returns:
+1. `object` The object in use
+
+#### Usage:
+* Creates a default menubar with 3 entries and removes them immediatley. Which makes no sense.
+```lua
+local mainFrame = basalt.createFrame()
+local aMenubar = mainFrame:addMenubar()
+ :addItem("1. Entry")
+ :addItem("2. Entry",colors.yellow)
+ :addItem("3. Entry",colors.yellow,colors.green)
+aMenubar:clear()
+```
diff --git a/docs/objects/Menubar/editItem.md b/docs/objects/Menubar/editItem.md
new file mode 100644
index 0000000..d22f1ae
--- /dev/null
+++ b/docs/objects/Menubar/editItem.md
@@ -0,0 +1,23 @@
+## editItem
+Edits a item from the menubar
+
+#### Parameters:
+1. `number` The index which should be edited
+2. `string` The new item name
+3. `number` the new item background color - optional
+4. `number` The new item text color - optional
+5. `any` New additional information - optional
+
+#### Returns:
+1. `object` The object in use
+
+#### Usage:
+* Creates a default menubar with 3 entries and edits the second one.
+```lua
+local mainFrame = basalt.createFrame()
+local aMenubar = mainFrame:addMenubar()
+ :addItem("1. Entry")
+ :addItem("2. Entry",colors.yellow)
+ :addItem("3. Entry",colors.yellow,colors.green)
+aMenubar:editItem(2, "Still 2. Entry", colors.red)
+```
\ No newline at end of file
diff --git a/docs/objects/Menubar/getAll.md b/docs/objects/Menubar/getAll.md
new file mode 100644
index 0000000..bf4b6e4
--- /dev/null
+++ b/docs/objects/Menubar/getAll.md
@@ -0,0 +1,16 @@
+## getAll
+Returns all items as table
+
+#### Returns:
+1. `table` All items
+
+#### Usage:
+* Creates a default menubar with 3 entries and prints a table.
+```lua
+local mainFrame = basalt.createFrame()
+local aMenubar = mainFrame:addMenubar()
+ :addItem("1. Entry")
+ :addItem("2. Entry",colors.yellow)
+ :addItem("3. Entry",colors.yellow,colors.green)
+basalt.debug(aMenubar:getAll())
+```
\ No newline at end of file
diff --git a/docs/objects/Menubar/getItem.md b/docs/objects/Menubar/getItem.md
new file mode 100644
index 0000000..83c3ffd
--- /dev/null
+++ b/docs/objects/Menubar/getItem.md
@@ -0,0 +1,19 @@
+## getItem
+Returns a item by index
+
+#### Parameters:
+1. `number` The index which should be returned
+
+#### Returns:
+1. `table` The item table example: {text="1. Entry", bgCol=colors.black, fgCol=colors.white}
+
+#### Usage:
+* Creates a default menubar with 3 entries and edits the second one.
+```lua
+local mainFrame = basalt.createFrame()
+local aMenubar = mainFrame:addMeubar()
+ :addItem("1. Entry")
+ :addItem("2. Entry",colors.yellow)
+ :addItem("3. Entry",colors.yellow,colors.green)
+basalt.debug(aMenubar:getItem(2).text)
+```
\ No newline at end of file
diff --git a/docs/objects/Menubar/getItemCount.md b/docs/objects/Menubar/getItemCount.md
new file mode 100644
index 0000000..9f814d9
--- /dev/null
+++ b/docs/objects/Menubar/getItemCount.md
@@ -0,0 +1,16 @@
+## getItemCount
+Returns the current item count
+
+#### Returns:
+1. `number` The item list count
+
+#### Usage:
+* Creates a default menubar with 3 entries and prints the current item count.
+```lua
+local mainFrame = basalt.createFrame()
+local aMenubar = mainFrame:addMenubar()
+ :addItem("1. Entry")
+ :addItem("2. Entry",colors.yellow)
+ :addItem("3. Entry",colors.yellow,colors.green)
+basalt.debug(aMenubar:getItemCount())
+```
\ No newline at end of file
diff --git a/docs/objects/Menubar/getItemIndex.md b/docs/objects/Menubar/getItemIndex.md
new file mode 100644
index 0000000..d2c2570
--- /dev/null
+++ b/docs/objects/Menubar/getItemIndex.md
@@ -0,0 +1,17 @@
+## getItemIndex
+returns the item index of the currently selected item
+
+#### Returns:
+1. `number` The current index
+
+#### Usage:
+* Creates a default menubar with 3 entries selects the second entry and prints the currently selected index.
+```lua
+local mainFrame = basalt.createFrame()
+local aMenubar = mainFrame:addMenubar()
+ :addItem("1. Entry")
+ :addItem("2. Entry",colors.yellow)
+ :addItem("3. Entry",colors.yellow,colors.green)
+ :selectItem(2)
+basalt.debug(aMenubar:getItemIndex())
+```
\ No newline at end of file
diff --git a/docs/objects/Menubar/getOffset.md b/docs/objects/Menubar/getOffset.md
new file mode 100644
index 0000000..361ea26
--- /dev/null
+++ b/docs/objects/Menubar/getOffset.md
@@ -0,0 +1,22 @@
+## getOffset
+Returns the current index offset
+
+#### Returns:
+1. `number` offset value
+
+#### Usage:
+* Creates a default menubar with 6 entries and sets the offset to 3, also prints the current offset.
+```lua
+local mainFrame = basalt.createFrame()
+local aMenubar = mainFrame:addMenubar()
+ :addItem("1. Entry")
+ :addItem("2. Entry")
+ :addItem("3. Entry")
+ :addItem("4. Entry")
+ :addItem("5. Entry")
+ :addItem("6. Entry")
+ :addItem("7. Entry")
+ :addItem("8. Entry")
+ :setOffset(3)
+basalt.debug(aMenubar:getOffset())
+```
\ No newline at end of file
diff --git a/docs/objects/Menubar/removeItem.md b/docs/objects/Menubar/removeItem.md
new file mode 100644
index 0000000..28f68bd
--- /dev/null
+++ b/docs/objects/Menubar/removeItem.md
@@ -0,0 +1,19 @@
+## removeItem
+Removes a item from the menubar
+
+#### Parameters:
+1. `number` The index which should get removed
+
+#### Returns:
+1. `object` The object in use
+
+#### Usage:
+* Creates a default menubar with 3 entries and removes the second one.
+```lua
+local mainFrame = basalt.createFrame()
+local aMenubar = mainFrame:addMenubar()
+ :addItem("1. Entry")
+ :addItem("2. Entry",colors.yellow)
+ :addItem("3. Entry",colors.yellow,colors.green)
+ :removeItem(2)
+```
\ No newline at end of file
diff --git a/docs/objects/Menubar/selectItem.md b/docs/objects/Menubar/selectItem.md
new file mode 100644
index 0000000..95239b2
--- /dev/null
+++ b/docs/objects/Menubar/selectItem.md
@@ -0,0 +1,19 @@
+## selectItem
+selects a item in the menubar (same as a player would click on a item)
+
+#### Parameters:
+1. `number` The index which should get selected
+
+#### Returns:
+1. `object` The object in use
+
+#### Usage:
+* Creates a default menubar with 3 entries and selects the second entry.
+```lua
+local mainFrame = basalt.createFrame()
+local aMenubar = mainFrame:addMenubar()
+ :addItem("1. Entry")
+ :addItem("2. Entry",colors.yellow)
+ :addItem("3. Entry",colors.yellow,colors.green)
+ :selectItem(2)
+```
\ No newline at end of file
diff --git a/docs/objects/Menubar/setOffset.md b/docs/objects/Menubar/setOffset.md
new file mode 100644
index 0000000..7f5abfd
--- /dev/null
+++ b/docs/objects/Menubar/setOffset.md
@@ -0,0 +1,32 @@
+## setOffset
+Sets the offset of the menubar (the same as you would scroll) - default is 0
+
+#### Parameters:
+1. `number` The offset value
+
+#### Returns:
+1. `object` The object in use
+
+#### Usage:
+* Creates a default menubar with 6 entries and sets the offset to 3.
+```lua
+local mainFrame = basalt.createFrame()
+local aMenubar = mainFrame:addMenubar()
+ :addItem("1. Entry")
+ :addItem("2. Entry")
+ :addItem("3. Entry")
+ :addItem("4. Entry")
+ :addItem("5. Entry")
+ :addItem("6. Entry")
+ :setOffset(3)
+```
+```xml
+
+ 1. Entry
+ 2. Entry
+ 3. Entry
+ 4. Entry
+ 5. Entry
+ 6. Entry
+
+```
\ No newline at end of file
diff --git a/docs/objects/Menubar/setScrollable.md b/docs/objects/Menubar/setScrollable.md
new file mode 100644
index 0000000..54831d5
--- /dev/null
+++ b/docs/objects/Menubar/setScrollable.md
@@ -0,0 +1,38 @@
+## setScrollable
+Makes it possible to scroll while the mouse is over the menubar
+
+#### Parameters:
+1. `boolean` If the menubar should be scrollable or not
+
+#### Returns:
+1. `object` The object in use
+
+#### Usage:
+* Creates a new menubar and makes it scrollable
+```lua
+local mainFrame = basalt.createFrame()
+local aMenubar = mainFrame:addMenubar():setScrollable(true)
+ :addItem("1. Entry")
+ :addItem("2. Entry")
+ :addItem("3. Entry")
+ :addItem("4. Entry")
+ :addItem("5. Entry")
+ :addItem("6. Entry")
+ :addItem("7. Entry")
+ :addItem("8. Entry")
+ :addItem("9. Entry")
+
+```
+```xml
+
+ 1. Entry
+ 2. Entry
+ 3. Entry
+ 4. Entry
+ 5. Entry
+ 6. Entry
+ 7. Entry
+ 8. Entry
+ 9. Entry
+
+```
\ No newline at end of file
diff --git a/docs/objects/Menubar/setSelectedItem.md b/docs/objects/Menubar/setSelectedItem.md
new file mode 100644
index 0000000..ca1a127
--- /dev/null
+++ b/docs/objects/Menubar/setSelectedItem.md
@@ -0,0 +1,28 @@
+## setSelectedItem
+Sets the background and the foreground of the item which is currently selected
+
+#### Parameters:
+1. `number|color` The background color which should be used
+2. `number|color` The text color which should be used
+
+#### Returns:
+1. `object` The object in use
+
+#### Usage:
+* Creates a default menubar with 4 entries and sets the selection background color to green.
+```lua
+local mainFrame = basalt.createFrame()
+local aMenubar = mainFrame:addMenubar()
+ :addItem("1. Entry")
+ :addItem("2. Entry",colors.yellow)
+ :addItem("3. Entry",colors.yellow,colors.green)
+ :addItem("4. Entry")
+ :setSelectedItem(colors.green, colors.red)
+```
+```xml
+
+ 1. Entry
+ 2. Entryyellow
+ 2. Entryyellowgreen
+
+```
\ No newline at end of file
diff --git a/docs/objects/Object.md b/docs/objects/Object.md
index 86bb4f0..43c4021 100644
--- a/docs/objects/Object.md
+++ b/docs/objects/Object.md
@@ -1,395 +1,46 @@
-This is the base class for all visual objects. Which means, if you create a button, label, frame or something else (no timers, threads or animations) the following methods apply:
-
-## show
-Shows the object (only if the parent frame is already visible)
-#### Returns:
-1. `object` The object in use
-
-#### Usage:
-* Shows a frame
-```lua
-local mainFrame = basalt.createFrame()
-local button = mainFrame:addButton()
-button:show()
-```
-```xml
-
-```
-
-## hide
-Hides the object
-
-#### Returns:
-1. `object` The object in use
-
-#### Usage:
-* Hides a frame
-```lua
-local mainFrame = basalt.createFrame()
-local button = mainFrame:addButton():setText("Close"):onClick(function() mainFrame:hide() end)
-```
-```xml
-
-```
-
-## setPosition
-Changes the position relative to its parent frame
-#### Parameters:
-1. `number` x coordinate
-2. `number` y coordinate
-3. `boolean` Whether it will add/remove to the current coordinates instead of setting them
-
-#### Returns:
-1. `object` The object in use
-
-#### 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
-
-```
-
-## 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
-
-#### Returns:
-1. `object` The object in use
-
-#### Usage:
-* Creates a frame, and sets its background color to `colors.gray`
-```lua
-local mainFrame = basalt.createFrame():setBackground(colors.gray)
-```
-```xml
-
-```
-
-## setForeground
-Changes the object text color
-#### Parameters:
-1. `number|color` Foreground color
-
-#### Returns:
-1. `object` The object in use
-
-#### Usage:
-* Creates a frame, and sets its foreground color to `colors.green`
-```lua
-local mainFrame = basalt.createFrame():setForeground(colors.green)
-```
-```xml
-
-```
-
-## setSize
-Changes the object size
-#### Parameters:
-1. `number` width
-2. `number` height
-
-#### Returns:
-1. `object` The object in use
-
-#### 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
-
-```
-
-## 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:
-1. `object` The object in use
-
-#### Usage:
-* Sets the button to the focused object
-```lua
-local mainFrame = basalt.createFrame()
-local aButton = mainFrame:addButton():setFocus()
-```
-
-## 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:
-1. `number` z-index
-
-#### Returns:
-1. `object` The object in use
-
-#### 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
-
-
-```
-
-## setParent
-Sets the parent frame of the object
-#### Parameters:
-1. `frame` The to-be parent frame
-
-#### Returns:
-1. `object` The object in use
-
-#### 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()
-local aButton = mainFrame:addButton():onClick(
- function()
- aRandomFrame:setParent(mainFrame)
- end
-)
-```
-
-## isFocused
-Returns if the object is currently the focused object of the parent frame
-
-#### Returns:
-1. `boolean` Whether the object is focused
-
-#### 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
-```
-
-## getAnchorPosition
-Converts the x and y coordinates into the anchor coordinates of the object
-
-#### Parameters:
-1. `number|nil` x
-2. `number|nil` y, if nothing it uses the object's x, y
-
-#### Returns:
-1. `number` x
-2. `number` y
-
-#### Usage:
-* Prints the anchor position to the debug console
-```lua
-local mainFrame = basalt.createFrame():setSize(15,15)
-local aButton = mainFrame:addButton()
- :setAnchor("bottomRight")
- :setSize(8,1)
- :setPosition(1,1)
-basalt.debug(aButton:getAnchorPosition()) -- returns 7,14 (framesize - own size) instead of 1,1
-```
-
-## setAnchor
-Sets the anchor of the object
-
-#### Parameters:
-1. `string` Anchor sides `("topLeft" "top", "topRight", "right", "bottomRight", "bottom", "bottomLeft", "left", "center")`
-
-#### Returns:
-1. `object` The object in use
-
-#### Usage:
-* Sets the button to have an anchor of `bottomRight`
-```lua
-local mainFrame = basalt.createFrame():show()
-local aButton = mainFrame:addButton()
- :setAnchor("bottomRight")
- :setSize(8,1)
- :setPosition(-8,1)
-```
-```xml
-
-```
-
-## getAbsolutePosition
-Converts the relative coordinates into absolute coordinates
-#### Parameters:
-1. `number|nil` x
-2. `number|nil` y
-
-#### Returns:
-1. `object` The object in use
-
-#### 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
-```
-
-## setValue
-Sets the value of that object (input, label, checkbox, textfield, scrollbar,...)
-#### Parameters:
-1. `any` Value to set the object to
-
-#### Returns:
-1. `object` The object in use
-
-#### Usage:
-* Creates a checkbox and ticks it
-```lua
-local mainFrame = basalt.createFrame()
-local aCheckbox = mainFrame:addCheckbox():setValue(true)
-```
-```xml
-
-```
-
-## getValue
-Returns the currently saved value
-#### Returns:
-1. `any` Object's value
-
-#### 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
-```
-
-## getHeight/getWidth
-Returns the respective height/width of the object
-#### Returns:
-1. `number` height/width
-
-#### Usage:
-* Prints the height of the object to the debug console
-```lua
-local mainFrame = basalt.createFrame()
-local aButton = mainFrame:addButton():setSize(5,8)
-basalt.debug(aButton:getHeight()) -- returns 8
-```
-
-## isVisible
-Returns if the object is currently visible
-#### Returns:
-1. `boolean`
-
-#### 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
-```
-
-## getName
-Returns the given name of the object
-
-#### Returns:
-1. `string` name
-
-#### Usage:
-* Prints name of object to debug window
-```lua
-local mainFrame = basalt.createFrame()
-basalt.debug(mainFrame:getName()) -- returns myFirstFrame
-```
-
-## setShadow
-Sets the shadow color - default: colors.black
-
-#### Parameters:
-1. `number|color` Shadow color
-
-#### Returns:
-1. `object` The object in use
-
-#### Usage:
-* Sets the shadow to green and shows it:
-```lua
-local mainFrame = basalt.createFrame()
-local subFrame = mainFrame:addFrame()
- :setMoveable()
- :setSize(18,6)
- :setShadow(colors.green)
- :showShadow(true)
-```
-```xml
-
-```
-
-## showShadow
-Shows or hides the shadow
-
-#### Parameters:
-1. `boolean` Whether it should show or hide the shadow
-
-#### Returns:
-1. `object` The object in use
-
-#### Usage:
-* Shows the shadow:
-```lua
-local mainFrame = basalt.createFrame()
-local subFrame = mainFrame:addFrame()
- :setMoveable()
- :setSize(18,6)
- :showShadow(true)
-```
-```xml
-
-```
-
-## setBorder
-Sets the border color - default: colors.black
-
-#### Parameters:
-1. `number|color` Border color
-
-#### Returns:
-1. `object` The object in use
-
-#### Usage:
-* Sets the border to green and shows it:
-```lua
-local mainFrame = basalt.createFrame()
-local subFrame = mainFrame:addFrame()
- :setMoveable()
- :setSize(18,6)
- :setBorder(colors.green)
- :showBorder("left", "top", "right", "bottom")
-```
-```xml
-
-```
-
-## showBorder
-Shows or hides the border
-
-#### Parameters:
-1. `strings` Whether it should show or hide the border on the specific sides ("left", "top", "right", "bottom")
-
-#### Returns:
-1. `object` The object in use
-
-#### Usage:
-* Shows the border:
-```lua
-local mainFrame = basalt.createFrame()
-local subFrame = mainFrame:addFrame()
- :setMoveable()
- :setSize(18,6)
- :showBorder("left", "top", "bottom")
-```
-```xml
-
-```
\ No newline at end of file
+This is the base class for all visual objects. It covers positioning, sizing, showing/hiding and much more.
+
+By default a freshly created object is visible and automatically listens to all incoming events.
+Its default position is always 1, 1 (based on it's parent frame). The default anchor is also topLeft.
+
+| | |
+|---|---|
+|[show](objects/Object/show.md)|Makes the object visible
+|[hide](objects/Object/hide.md)|Makes the object invisible
+|[isVisible](objects/Object/isVisible.md)|Returns if the object is currently visible
+|[enable](objects/Object/enable.md)|Listens to incoming events
+|[disable](objects/Object/disable.md)|Ignores all incoming events
+|[setPosition](objects/Object/setPosition.md)|Changes the position (x,y)
+|[getPosition](objects/Object/getPosition.md)|Returns the current position
+|[setBackground](objects/Object/setBackground.md)|Changes the object's background
+|[setForeground](objects/Object/setForeground.md)|Changes the object's text color
+|[setSize](objects/Object/setSize.md)|Changes the object to a new size
+|[getSize](objects/Object/getSize.md)|Returns the width and height
+|[setFocus](objects/Object/setFocus.md)|Changes the object to be the focused object
+|[isFocused](objects/Object/isFocused.md)|Returns if the object is currently focused
+|[setZIndex](objects/Object/setZIndex.md)|Changes the z-index
+|[setParent](objects/Object/setParent.md)|Changes the parent of that object
+|[getAnchorPosition](objects/Object/getAnchorPosition.md)|Returns the relative x and y coordinates of that object
+|[setAnchor](objects/Object/setAnchor.md)|Sets the current anchor
+|[getAbsolutePosition](objects/Object/getAbsolutePosition.md)|Returns the absolute x and y coordinates of that object
+|[setValue](objects/Object/setValue.md)|Changes the stored value
+|[getValue](objects/Object/getValue.md)|Returns the currently stored value
+|[getName](objects/Object/getName.md)|Returns the name (or in other words: id) of that object
+|[setShadow](objects/Object/setShadow.md)|Changes the shadow of that object
+|[setBorder](objects/Object/setBorder.md)|Changes the border lines
+
+# Events
+
+| | |
+|---|---|
+|[onClick](objects/Object/onClick.md)|Fires as soon as the object gets clicked
+|[onClickUp](objects/Object/onClickUp.md)|Fires as soon as the mouse button gets released on the object
+|[onScroll](objects/Object/onScroll.md)|Fires as soon as you scroll with the mousewheel
+|[onDrag](objects/Object/onDrag.md)|Fires as soon as the object is beeing dragged
+|[onKey](objects/Object/onKey.md)|Fires when the object is focused and a keyboard key has been clicked
+|[onKeyUp](objects/Object/onKeyUp.md)|Fires when the object is focused and a keyboard key has been released
+|[onChange](objects/Object/onChange.md)|Fires when the object value has been changed
+|[onResize](objects/Object/onResize.md)|Fires when the object got resized
+|[onReposition](objects/Object/onReposition.md)|Fires when the object has been repositioned
+|[onGetFocus](objects/Object/onGetFocus.md)|Fires when the object is focused
+|[onLoseFocus](objects/Object/onLoseFocus.md)|Fires when the object lost it's focus
\ No newline at end of file
diff --git a/docs/objects/Object/disable.md b/docs/objects/Object/disable.md
new file mode 100644
index 0000000..e69de29
diff --git a/docs/objects/Object/enable.md b/docs/objects/Object/enable.md
new file mode 100644
index 0000000..e69de29
diff --git a/docs/objects/Object/getAbsolutePosition.md b/docs/objects/Object/getAbsolutePosition.md
new file mode 100644
index 0000000..aa89388
--- /dev/null
+++ b/docs/objects/Object/getAbsolutePosition.md
@@ -0,0 +1,16 @@
+## getAbsolutePosition
+Converts the relative coordinates into absolute coordinates
+#### Parameters:
+1. `number|nil` x
+2. `number|nil` y
+
+#### Returns:
+1. `object` The object in use
+
+#### 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
new file mode 100644
index 0000000..e335b71
--- /dev/null
+++ b/docs/objects/Object/getAnchorPosition.md
@@ -0,0 +1,21 @@
+## getAnchorPosition
+Converts the x and y coordinates into the anchor coordinates of the object
+
+#### Parameters:
+1. `number|nil` x
+2. `number|nil` y, if nothing it uses the object's x, y
+
+#### Returns:
+1. `number` x
+2. `number` y
+
+#### Usage:
+* Prints the anchor position to the debug console
+```lua
+local mainFrame = basalt.createFrame():setSize(15,15)
+local aButton = mainFrame:addButton()
+ :setAnchor("bottomRight")
+ :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/getName.md b/docs/objects/Object/getName.md
new file mode 100644
index 0000000..7866617
--- /dev/null
+++ b/docs/objects/Object/getName.md
@@ -0,0 +1,17 @@
+## getName
+Returns the given name of the object
+
+#### Returns:
+1. `string` name
+
+#### Usage:
+* Prints name of object to debug window
+```lua
+local main = basalt.createFrame()
+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
new file mode 100644
index 0000000..e69de29
diff --git a/docs/objects/Object/getSize.md b/docs/objects/Object/getSize.md
new file mode 100644
index 0000000..e69de29
diff --git a/docs/objects/Object/getValue.md b/docs/objects/Object/getValue.md
new file mode 100644
index 0000000..11eab7b
--- /dev/null
+++ b/docs/objects/Object/getValue.md
@@ -0,0 +1,12 @@
+## getValue
+Returns the currently saved value
+#### Returns:
+1. `any` Object's value
+
+#### 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
new file mode 100644
index 0000000..5f12ef1
--- /dev/null
+++ b/docs/objects/Object/hide.md
@@ -0,0 +1,15 @@
+## hide
+Hides the object
+
+#### Returns:
+1. `object` The object in use
+
+#### 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
new file mode 100644
index 0000000..63fa335
--- /dev/null
+++ b/docs/objects/Object/isFocused.md
@@ -0,0 +1,13 @@
+## isFocused
+Returns if the object is currently the focused object of the parent frame
+
+#### Returns:
+1. `boolean` Whether the object is focused
+
+#### 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
new file mode 100644
index 0000000..e825383
--- /dev/null
+++ b/docs/objects/Object/isVisible.md
@@ -0,0 +1,12 @@
+## isVisible
+Returns if the object is currently visible
+#### Returns:
+1. `boolean`
+
+#### 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
new file mode 100644
index 0000000..0b7e788
--- /dev/null
+++ b/docs/objects/Object/onChange.md
@@ -0,0 +1,28 @@
+# 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:
+
+```lua
+local basalt = require("basalt")
+
+local main = basalt.createFrame()
+local aInput = main:addInput():setPosition(3,3)
+local aCheckbox = main:addCheckbox():setPosition(3,5)
+
+local function checkInput(input)
+ if(string.lower(input:getValue())=="hello")then
+ basalt.debug("Hello back!")
+ end
+end
+
+local function checkCheckbox(checkbox)
+ if(checkbox:getValue()==true)then -- or if(checkbox:getValue())then
+ basalt.debug("Checkbox is active, let's do something!")
+ end
+end
+
+aInput:onChange(checkInput)
+aCheckbox:onChange(checkCheckbox)
+```
\ No newline at end of file
diff --git a/docs/objects/Object/onClick.md b/docs/objects/Object/onClick.md
new file mode 100644
index 0000000..1ccbbe4
--- /dev/null
+++ b/docs/objects/Object/onClick.md
@@ -0,0 +1,20 @@
+# onClick
+`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:
+
+```lua
+local basalt = require("basalt")
+
+local main = basalt.createFrame()
+local button = main:addButton()
+ :setPosition(3,3)
+ :setSize(12,3)
+ :setText("Click")
+
+function buttonOnClick()
+ basalt.debug("Button got clicked!")
+end
+button:onClick(buttonOnClick)
+```
\ No newline at end of file
diff --git a/docs/objects/Object/onClickUp.md b/docs/objects/Object/onClickUp.md
new file mode 100644
index 0000000..8067182
--- /dev/null
+++ b/docs/objects/Object/onClickUp.md
@@ -0,0 +1,25 @@
+# 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:
+
+```lua
+local basalt = require("basalt")
+
+local main = basalt.createFrame()
+local button = main:addButton()
+ :setPosition(3,3)
+ :setSize(12,3)
+ :setText("Click")
+
+function buttonOnClick(self, button, x, y)
+ basalt.debug("Button got clicked!")
+end
+button:onClick(buttonOnClick)
+
+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
new file mode 100644
index 0000000..9589cd7
--- /dev/null
+++ b/docs/objects/Object/onDrag.md
@@ -0,0 +1,20 @@
+# onDrag
+`onDrag(self, event, button, x, y, xOffset, yOffset)`
+The computercraft event which triggers this method is `mouse_drag`.
+
+Here is a example on how to add a onDrag event to your button:
+
+```lua
+local basalt = require("basalt")
+
+local main = basalt.createFrame()
+local button = main:addButton()
+ :setPosition(3,3)
+ :setSize(12,3)
+ :setText("Click")
+
+function buttonOnDrag(self, button, x, y, xOffset, yOffset)
+ basalt.debug("Someone drags me (i know i wont reposition myself)!")
+end
+button:onDrag(buttonOnDrag)
+```
diff --git a/docs/objects/Object/onGetFocus.md b/docs/objects/Object/onGetFocus.md
new file mode 100644
index 0000000..10d21a0
--- /dev/null
+++ b/docs/objects/Object/onGetFocus.md
@@ -0,0 +1,16 @@
+# onGetFocus
+`onGetFocus(self)`
+This event gets triggered as soon as the object is the currently focused object.
+
+```lua
+local basalt = require("basalt")
+
+local main = basalt.createFrame()
+local aButton = main:addButton()
+ :setPosition(3,3)
+ :onGetFocus(
+ function(self)
+ basalt.debug("Welcome back!")
+ end
+ )
+```
diff --git a/docs/objects/Object/onKey.md b/docs/objects/Object/onKey.md
new file mode 100644
index 0000000..550fa77
--- /dev/null
+++ b/docs/objects/Object/onKey.md
@@ -0,0 +1,21 @@
+# 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:
+
+```lua
+local basalt = require("basalt")
+
+local main = basalt.createFrame()
+local subFrame = main:addFrame()
+ :setPosition(3,3)
+ :setSize(18,6)
+
+function openSubFrame(self, event, key)
+ if(key==keys.c)then
+ subFrame:show()
+ 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
new file mode 100644
index 0000000..dce83db
--- /dev/null
+++ b/docs/objects/Object/onKeyUp.md
@@ -0,0 +1,21 @@
+# 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:
+
+```lua
+local basalt = require("basalt")
+
+local main = basalt.createFrame()
+local subFrame = main:addFrame()
+ :setPosition(3,3)
+ :setSize(18,6)
+
+function openSubFrame(self, event, key)
+ if(key==keys.c)then
+ subFrame:show()
+ end
+end
+main:onKeyUp(openSubFrame)
+```
\ No newline at end of file
diff --git a/docs/objects/Object/onLoseFocus.md b/docs/objects/Object/onLoseFocus.md
new file mode 100644
index 0000000..1515620
--- /dev/null
+++ b/docs/objects/Object/onLoseFocus.md
@@ -0,0 +1,16 @@
+# onLoseFocus
+`onLoseFocus(self)`
+This event gets triggered as soon as the object loses its focus.
+
+```lua
+local basalt = require("basalt")
+
+local main = basalt.createFrame()
+local aButton = main:addButton()
+ :setPosition(3,3)
+ :onLoseFocus(
+ function(self)
+ basalt.debug("Please come back...")
+ end
+ )
+```
\ No newline at end of file
diff --git a/docs/objects/Object/onReposition.md b/docs/objects/Object/onReposition.md
new file mode 100644
index 0000000..e69de29
diff --git a/docs/objects/Object/onResize.md b/docs/objects/Object/onResize.md
new file mode 100644
index 0000000..dae0ba0
--- /dev/null
+++ b/docs/objects/Object/onResize.md
@@ -0,0 +1,19 @@
+# onResize
+`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:
+
+```lua
+local basalt = require("basalt")
+
+local main = basalt.createFrame()
+local aButton = main:addButton():setPosition(3,3)
+
+local function onButtonResize(self)
+ local width = main:getWidth()
+ self:setSize(width, 3)
+end
+
+aButton:onResize(onButtonResize)
+```
\ No newline at end of file
diff --git a/docs/objects/Object/onScroll.md b/docs/objects/Object/onScroll.md
new file mode 100644
index 0000000..b2558f3
--- /dev/null
+++ b/docs/objects/Object/onScroll.md
@@ -0,0 +1,20 @@
+# 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:
+
+```lua
+local basalt = require("basalt")
+
+local main = basalt.createFrame()
+local button = main:addButton()
+ :setPosition(3,3)
+ :setSize(12,3)
+ :setText("Click")
+
+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/setAnchor.md b/docs/objects/Object/setAnchor.md
new file mode 100644
index 0000000..a8febad
--- /dev/null
+++ b/docs/objects/Object/setAnchor.md
@@ -0,0 +1,21 @@
+## setAnchor
+Sets the anchor of the object
+
+#### Parameters:
+1. `string` Anchor sides `("topLeft" "top", "topRight", "right", "bottomRight", "bottom", "bottomLeft", "left", "center")`
+
+#### Returns:
+1. `object` The object in use
+
+#### Usage:
+* Sets the button to have an anchor of `bottomRight`
+```lua
+local mainFrame = basalt.createFrame():show()
+local aButton = mainFrame:addButton()
+ :setAnchor("bottomRight")
+ :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
new file mode 100644
index 0000000..4834da5
--- /dev/null
+++ b/docs/objects/Object/setBackground.md
@@ -0,0 +1,16 @@
+## 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
+
+#### Returns:
+1. `object` The object in use
+
+#### Usage:
+* Creates a frame, and sets its background color to `colors.gray`
+```lua
+local mainFrame = basalt.createFrame():setBackground(colors.gray)
+```
+```xml
+
+```
\ No newline at end of file
diff --git a/docs/objects/Object/setBorder.md b/docs/objects/Object/setBorder.md
new file mode 100644
index 0000000..d1609bc
--- /dev/null
+++ b/docs/objects/Object/setBorder.md
@@ -0,0 +1,23 @@
+## setBorder
+Sets the border of that objects, if false the border will be removed
+Default: false
+
+#### Parameters:
+1. `number|color` Border color
+2. `string` optional - sides. If you don't set sides, all 4 sides will have a border
+
+#### Returns:
+1. `object` The object in use
+
+#### Usage:
+* Sets the border to green and shows it:
+```lua
+local mainFrame = basalt.createFrame()
+local subFrame = mainFrame:addFrame()
+ :setMovable()
+ :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
new file mode 100644
index 0000000..f861284
--- /dev/null
+++ b/docs/objects/Object/setFocus.md
@@ -0,0 +1,13 @@
+## 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:
+1. `object` The object in use
+
+#### 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
new file mode 100644
index 0000000..d75777b
--- /dev/null
+++ b/docs/objects/Object/setForeground.md
@@ -0,0 +1,16 @@
+## setForeground
+Changes the object text color
+#### Parameters:
+1. `number|color` Foreground color
+
+#### Returns:
+1. `object` The object in use
+
+#### 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
new file mode 100644
index 0000000..aa50e44
--- /dev/null
+++ b/docs/objects/Object/setParent.md
@@ -0,0 +1,19 @@
+## setParent
+Sets the parent frame of the object
+#### Parameters:
+1. `frame` The to-be parent frame
+
+#### Returns:
+1. `object` The object in use
+
+#### 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()
+local aButton = mainFrame:addButton():onClick(
+ function()
+ aRandomFrame:setParent(mainFrame)
+ end
+)
+```
\ No newline at end of file
diff --git a/docs/objects/Object/setPosition.md b/docs/objects/Object/setPosition.md
new file mode 100644
index 0000000..26e3ecd
--- /dev/null
+++ b/docs/objects/Object/setPosition.md
@@ -0,0 +1,19 @@
+## setPosition
+Changes the position relative to its parent frame
+#### Parameters:
+1. `number` x coordinate
+2. `number` y coordinate
+3. `boolean` Whether it will add/remove to the current coordinates instead of setting them
+
+#### Returns:
+1. `object` The object in use
+
+#### 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
+
+```
\ No newline at end of file
diff --git a/docs/objects/Object/setShadow.md b/docs/objects/Object/setShadow.md
new file mode 100644
index 0000000..32a6726
--- /dev/null
+++ b/docs/objects/Object/setShadow.md
@@ -0,0 +1,22 @@
+## setShadow
+Sets the shadow color - default: false
+
+#### Parameters:
+1. `number|color` Shadow color
+
+#### Returns:
+1. `object` The object in use
+
+#### Usage:
+* Sets the shadow to green and shows it:
+```lua
+local mainFrame = basalt.createFrame()
+local subFrame = mainFrame:addFrame()
+ :setMovable()
+ :setSize(18,6)
+ :setShadow(colors.green)
+```
+Or:
+```xml
+
+```
\ No newline at end of file
diff --git a/docs/objects/Object/setSize.md b/docs/objects/Object/setSize.md
new file mode 100644
index 0000000..347e63d
--- /dev/null
+++ b/docs/objects/Object/setSize.md
@@ -0,0 +1,18 @@
+## setSize
+Changes the object size
+#### Parameters:
+1. `number` width
+2. `number` height
+
+#### Returns:
+1. `object` The object in use
+
+#### 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
new file mode 100644
index 0000000..2050bcd
--- /dev/null
+++ b/docs/objects/Object/setValue.md
@@ -0,0 +1,17 @@
+## setValue
+Sets the value of that object (input, label, checkbox, textfield, scrollbar,...)
+#### Parameters:
+1. `any` Value to set the object to
+
+#### Returns:
+1. `object` The object in use
+
+#### 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
new file mode 100644
index 0000000..e1e9bba
--- /dev/null
+++ b/docs/objects/Object/setZIndex.md
@@ -0,0 +1,19 @@
+## 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:
+1. `number` z-index
+
+#### Returns:
+1. `object` The object in use
+
+#### 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
new file mode 100644
index 0000000..20fd15f
--- /dev/null
+++ b/docs/objects/Object/show.md
@@ -0,0 +1,15 @@
+## show
+Shows the object (only if the parent frame is already visible)
+#### Returns:
+1. `object` The object in use
+
+#### Usage:
+* Shows a frame
+```lua
+local mainFrame = basalt.createFrame()
+local button = mainFrame:addButton()
+button:show()
+```
+```xml
+
+```
\ No newline at end of file
diff --git a/docs/objects/Pane.md b/docs/objects/Pane.md
index 6dedd25..f0d9c23 100644
--- a/docs/objects/Pane.md
+++ b/docs/objects/Pane.md
@@ -1,9 +1,8 @@
-Panes are very simple sizeable background objects.
+With panes you are able to create background without any functionality
-The following list is only available to panes:
-Remember Pane also inherits from [Object](objects/Object.md)
+Because panes don't have any unique functionality, there is also no method list for them.
-Pane doesn't have any custom functionallity. If you want to change the color/position or size, just check out the [object](https://github.com/NoryiE/basalt/wiki/Object) wikipage.
+[Object](objects/Object.md) methods also apply for panes.
## Example:
diff --git a/docs/objects/Program.md b/docs/objects/Program.md
index 3bc2ba2..97b2d50 100644
--- a/docs/objects/Program.md
+++ b/docs/objects/Program.md
@@ -1,167 +1,14 @@
+Program objects are here for opening other executable programs in your main program. You can execute worms, shell or any custom program you've made.
-Program objects are here for opening other executable programs in your main program. You can execute worms, shell or any custom program you've made.
-
-Remember Program inherits from [Object](objects/Object.md)
-
-
-## getStatus
-returns the current process status
-
-#### Returns:
-1. `string` current status ("running", "normal, "suspended", or "dead")
-
-#### Usage:
-* Prints current status
-```lua
-local mainFrame = basalt.createFrame()
-local aProgram = mainFrame:addProgram()
-basalt.debug(aProgram:getStatus())
-```
-
-## execute
-Executes the given path or program
-
-#### Parameters:
-1. `string|function` the path to your file as string, or function which should be called
-
-#### Returns:
-1. `object` The object in use
-
-#### Usage:
-* Executes worm
-```lua
-local mainFrame = basalt.createFrame()
-local aProgram = mainFrame:addProgram()
-aProgram:execute("rom/programs/fun/worm.lua") -- executes worm
-```
-```xml
-
-```
-
-## stop
-Stops a currently running program
-
-#### Returns:
-1. `object` The object in use
-
-#### Usage:
-* Stops worm by clicking a button
-```lua
-local mainFrame = basalt.createFrame()
-local aProgram = mainFrame:addProgram()
-aProgram:execute("rom/programs/fun/worm.lua") -- executes worm
-mainFrame:addButton():setText("Pause"):onClick(function() aProgram:stop() end):show()
-```
-
-## pause
-pauses the current program (prevents the program from receiving events)
-
-#### Parameters:
-1. `boolean` true, false or nothing
-
-#### Returns:
-1. `object` The object in use
-
-#### Usage:
-* Pauses worm by clicking a button
-```lua
-local mainFrame = basalt.createFrame():show()
-local aProgram = mainFrame:addProgram():execute("rom/programs/shell.lua"):show()
-mainFrame:addButton():setText("Pause"):onClick(function() aProgram:pause(true) end):show()
-```
-
-## isPaused
-returns if the program is paused
-
-#### Returns:
-1. `boolean` pause status
-
-#### Usage:
-* Prints the pause status of the program
-```lua
-local mainFrame = basalt.createFrame():show()
-local aProgram = mainFrame:addProgram():execute("rom/programs/shell.lua"):show()
-basalt.debug(aProgram:isPaused())
-```
-
-## injectEvent
-injects a event into the program manually. For example you could inject w a s and d for worm, by clicking buttons.
-
-#### Parameters:
-1. `string` event
-2. `any` parameter
-3. `any` parameter
-4. `any` parameter
-5. `any` parameter
-6. `boolean` if this is true, the injected event will be executed even if the program is paused
-
-#### Returns:
-1. `object` The object in use
-
-#### Usage:
-* injects a event by clicking a button
-```lua
-local mainFrame = basalt.createFrame():show()
-local aProgram = mainFrame:addProgram():execute("rom/programs/shell.lua"):show()
-mainFrame:addButton():setText("inject"):onClick(function() aProgram:injectEvent("char", "w") end):show()
-```
-
-## injectEvents
-Injects multiple events
-
-#### Parameters:
-1. `table` a table, items should be {event="event", args={para1, para2, para3, para4}}
-
-#### Returns:
-1. `object` The object in use
-
-#### Usage:
-* injects a multiple char events by clicking a button
-
-```lua
-local mainFrame = basalt.createFrame():show()
-local aProgram = mainFrame:addProgram():execute("rom/programs/shell.lua"):show()
-
-local events = {
-{event="char", args={"h"}},
-{event="char", args={"e"}},
-{event="char", args={"y"}}
-}
-mainFrame:addButton():setText("inject"):onClick(function() aProgram:injectEvents(events) end):show()
-```
-
-
-## getQueuedEvents
-If the program is paused, incomming events will be inserted into a queued events table. As soon as the program is unpaused, the queued events table will be empty
-
-#### Returns:
-1. `table` a table - {event="event", args={"a", "b",...}}
-
-#### Usage:
-* prints the queued events table
-```lua
-local mainFrame = basalt.createFrame():show()
-local aProgram = mainFrame:addProgram():execute("rom/programs/shell.lua"):show()
-mainFrame:addButton():setText("inject"):onClick(function() basalt.debug(aProgram:getQueuedEvents()) end):show()
-```
-
-## updateQueuedEvents
-Here you can manipulate the queued events table
-
-#### Parameters:
-1. `table` a table, items should be {event="event", args={para1, para2, para3, para4}}
-
-#### Returns:
-1. `object` The object in use
-
-```lua
-local mainFrame = basalt.createFrame():show()
-local aProgram = mainFrame:addProgram():execute("rom/programs/shell.lua"):show()
-
-mainFrame:addButton():setText("inject"):onClick(function()
-local events = aProgram:getQueuedEvents()
-table.insert(events,1,{event="char", args={"w"}}
-aProgram:updateQueuedEvents(events)
-end):show()
-```
+[Object](objects/Object.md) methods also apply for programs.
+| | |
+|---|---|
+|[getStatus](objects/Program/getStatus.md)|Returns the current program status
+|[execute](objects/Program/execute.md)|Executes a program
+|[stop](objects/Program/stop.md)|Stops the currently running program
+|[pause](objects/Program/pause.md)|Pauses the currently running program
+|[isPaused](objects/Program/isPaused.md)|Returns if the program is paused
+|[injectEvent](objects/Program/injectEvent.md)|Injects a event into the program
+|[injectEvents](objects/Program/injectEvents.md)|Injects a table of events
+|[getQueuedEvents](objects/Program/getQueuedEvents.md)|Returns currently queued events
diff --git a/docs/objects/Program/execute.md b/docs/objects/Program/execute.md
new file mode 100644
index 0000000..5272b6a
--- /dev/null
+++ b/docs/objects/Program/execute.md
@@ -0,0 +1,19 @@
+## execute
+Executes the given path or program
+
+#### Parameters:
+1. `string|function` the path to your file as string, or function which should be called
+
+#### Returns:
+1. `object` The object in use
+
+#### Usage:
+* Executes worm
+```lua
+local mainFrame = basalt.createFrame()
+local aProgram = mainFrame:addProgram()
+aProgram:execute("rom/programs/fun/worm.lua") -- executes worm
+```
+```xml
+
+```
diff --git a/docs/objects/Program/getQueuedEvents.md b/docs/objects/Program/getQueuedEvents.md
new file mode 100644
index 0000000..807607d
--- /dev/null
+++ b/docs/objects/Program/getQueuedEvents.md
@@ -0,0 +1,34 @@
+## getQueuedEvents
+If the program is paused, incomming events will be inserted into a queued events table. As soon as the program is unpaused, the queued events table will be empty
+
+#### Returns:
+1. `table` a table - {event="event", args={"a", "b",...}}
+
+#### Usage:
+* prints the queued events table
+```lua
+local mainFrame = basalt.createFrame():show()
+local aProgram = mainFrame:addProgram():execute("rom/programs/shell.lua"):show()
+mainFrame:addButton():setText("inject"):onClick(function() basalt.debug(aProgram:getQueuedEvents()) end):show()
+```
+
+## updateQueuedEvents
+Here you can manipulate the queued events table
+
+#### Parameters:
+1. `table` a table, items should be {event="event", args={para1, para2, para3, para4}}
+
+#### Returns:
+1. `object` The object in use
+
+```lua
+local mainFrame = basalt.createFrame():show()
+local aProgram = mainFrame:addProgram():execute("rom/programs/shell.lua"):show()
+
+mainFrame:addButton():setText("inject"):onClick(function()
+local events = aProgram:getQueuedEvents()
+table.insert(events,1,{event="char", args={"w"}}
+aProgram:updateQueuedEvents(events)
+end):show()
+```
+
diff --git a/docs/objects/Program/getStatus.md b/docs/objects/Program/getStatus.md
new file mode 100644
index 0000000..e7bca2e
--- /dev/null
+++ b/docs/objects/Program/getStatus.md
@@ -0,0 +1,13 @@
+## getStatus
+returns the current process status
+
+#### Returns:
+1. `string` current status ("running", "normal, "suspended", or "dead")
+
+#### Usage:
+* Prints current status
+```lua
+local mainFrame = basalt.createFrame()
+local aProgram = mainFrame:addProgram()
+basalt.debug(aProgram:getStatus())
+```
\ No newline at end of file
diff --git a/docs/objects/Program/injectEvent.md b/docs/objects/Program/injectEvent.md
new file mode 100644
index 0000000..ce2e7eb
--- /dev/null
+++ b/docs/objects/Program/injectEvent.md
@@ -0,0 +1,21 @@
+## injectEvent
+injects a event into the program manually. For example you could inject w a s and d for worm, by clicking buttons.
+
+#### Parameters:
+1. `string` event
+2. `any` parameter
+3. `any` parameter
+4. `any` parameter
+5. `any` parameter
+6. `boolean` if this is true, the injected event will be executed even if the program is paused
+
+#### Returns:
+1. `object` The object in use
+
+#### Usage:
+* injects a event by clicking a button
+```lua
+local mainFrame = basalt.createFrame():show()
+local aProgram = mainFrame:addProgram():execute("rom/programs/shell.lua"):show()
+mainFrame:addButton():setText("inject"):onClick(function() aProgram:injectEvent("char", "w") end):show()
+```
\ No newline at end of file
diff --git a/docs/objects/Program/injectEvents.md b/docs/objects/Program/injectEvents.md
new file mode 100644
index 0000000..67a36d2
--- /dev/null
+++ b/docs/objects/Program/injectEvents.md
@@ -0,0 +1,23 @@
+## injectEvents
+Injects multiple events
+
+#### Parameters:
+1. `table` a table, items should be {event="event", args={para1, para2, para3, para4}}
+
+#### Returns:
+1. `object` The object in use
+
+#### Usage:
+* injects a multiple char events by clicking a button
+
+```lua
+local mainFrame = basalt.createFrame():show()
+local aProgram = mainFrame:addProgram():execute("rom/programs/shell.lua"):show()
+
+local events = {
+{event="char", args={"h"}},
+{event="char", args={"e"}},
+{event="char", args={"y"}}
+}
+mainFrame:addButton():setText("inject"):onClick(function() aProgram:injectEvents(events) end):show()
+```
\ No newline at end of file
diff --git a/docs/objects/Program/isPaused.md b/docs/objects/Program/isPaused.md
new file mode 100644
index 0000000..1222ee0
--- /dev/null
+++ b/docs/objects/Program/isPaused.md
@@ -0,0 +1,13 @@
+## isPaused
+returns if the program is paused
+
+#### Returns:
+1. `boolean` pause status
+
+#### Usage:
+* Prints the pause status of the program
+```lua
+local mainFrame = basalt.createFrame():show()
+local aProgram = mainFrame:addProgram():execute("rom/programs/shell.lua"):show()
+basalt.debug(aProgram:isPaused())
+```
\ No newline at end of file
diff --git a/docs/objects/Program/pause.md b/docs/objects/Program/pause.md
new file mode 100644
index 0000000..d7e8736
--- /dev/null
+++ b/docs/objects/Program/pause.md
@@ -0,0 +1,16 @@
+## pause
+pauses the current program (prevents the program from receiving events)
+
+#### Parameters:
+1. `boolean` true, false or nothing
+
+#### Returns:
+1. `object` The object in use
+
+#### Usage:
+* Pauses worm by clicking a button
+```lua
+local mainFrame = basalt.createFrame():show()
+local aProgram = mainFrame:addProgram():execute("rom/programs/shell.lua"):show()
+mainFrame:addButton():setText("Pause"):onClick(function() aProgram:pause(true) end):show()
+```
\ No newline at end of file
diff --git a/docs/objects/Program/stop.md b/docs/objects/Program/stop.md
new file mode 100644
index 0000000..551500d
--- /dev/null
+++ b/docs/objects/Program/stop.md
@@ -0,0 +1,14 @@
+## stop
+Stops a currently running program
+
+#### Returns:
+1. `object` The object in use
+
+#### Usage:
+* Stops worm by clicking a button
+```lua
+local mainFrame = basalt.createFrame()
+local aProgram = mainFrame:addProgram()
+aProgram:execute("rom/programs/fun/worm.lua") -- executes worm
+mainFrame:addButton():setText("Pause"):onClick(function() aProgram:stop() end):show()
+```
\ No newline at end of file
diff --git a/docs/objects/Progressbar.md b/docs/objects/Progressbar.md
index bbf3551..bad9a66 100644
--- a/docs/objects/Progressbar.md
+++ b/docs/objects/Progressbar.md
@@ -1,134 +1,13 @@
Progressbars are objects to visually display the current state of your progression. They always go from 0 to 100 (%) - no matter how big they are. which means if you
want to add some energy progress you have to do simple maths: currentValue / maxValue * 100
-Here are all possible functions available for progessbars. Remember progressbar inherits from [Object](objects/Object.md)
+[Object](objects/Object.md) methods also apply for progressbars.
-## setDirection
-Sets the direction in which the bar should be expanding.
-
-#### Parameters:
-1. `number` x direction (0 = left to right, 1 = top to bottom, 2 = right to left and 3 = bottom to top)
-
-#### Returns:
-1. `object` The object in use
-
-#### Usage:
-* Creates a progressbar and sets the direction from bottom to top
-```lua
-local mainFrame = basalt.createFrame()
-local aProgressbar = mainFrame:addProgressbar()
-aProgressbar:setDirection(3)
-```
-```xml
-
-```
-
-## setProgress
-This is the function you need to call if you want the progression to change.
-
-#### Parameters:
-1. `number` a number from 0 to 100
-
-#### Returns:
-1. `object` The object in use
-
-#### Usage:
-* Creates a progressbar and sets the current progress to 50
-```lua
-local mainFrame = basalt.createFrame()
-local aProgressbar = mainFrame:addProgressbar()
-aProgressbar:setProgress(50)
-```
-
-## getProgress
-Returns the current progress status
-
-#### Returns:
-1. `number` progress (0-100)
-
-#### Usage:
-* Creates a progressbar, sets the current progress to 50 and prints the current progress
-```lua
-local mainFrame = basalt.createFrame()
-local aProgressbar = mainFrame:addProgressbar()
-aProgressbar:setProgress(50)
-basalt.debug(aProgressbar:getProgress())
-```
-
-## setProgressBar
-This function will change the visual display of your progress bar
-
-#### Parameters:
-1. `number|color` the expanding progress bar color
-2. `char` optional - the bar symbol - default is " " (space)
-3. `number|color` optional - the bar symbol color
-
-#### Returns:
-1. `object` The object in use
-
-#### Usage:
-* Creates a progressbar and sets the progressbar color to green
-```lua
-local mainFrame = basalt.createFrame()
-local aProgressbar = mainFrame:addProgressbar()
-aProgressbar:setProgressBar(colors.green, colors.yellow, colors.red)
-```
-```xml
-
-```
-
-## setBackgroundSymbol
-Will change the default background symbol (default is " " - space)
-
-#### Parameters:
-1. `char` the background symbol
-
-#### Returns:
-1. `object` The object in use
-
-#### Usage:
-* Creates a progressbar and sets the progressbar background symbol to X
-```lua
-local mainFrame = basalt.createFrame()
-local aProgressbar = mainFrame:addProgressbar()
-aProgressbar:setBackgroundSymbol("X")
-```
-```xml
-
-```
-
-# Events
-
-## onProgressDone
-`onProgressDone(self)`
-A custom event which gets triggered as soon as the progress reaches 100.
-
-Here is a example on how to add a onProgressDone event to your progressbar:
-
-```lua
-local basalt = require("Basalt")
-
-local mainFrame = basalt.createFrame()
-local aProgressbar = mainFrame:addProgressbar()
-
-function progressDone()
- basalt.debug("The Progressbar reached 100%!")
-end
-aProgressbar:onProgressDone(progressDone)
-```
-
-Here is also a example how this is done with xml:
-
-```lua
-local basalt = require("Basalt")
-
-local mainFrame = basalt.createFrame()
-
-basalt.setVariable("progressDone", function()
- basalt.debug("The Progressbar reached 100%!")
-end)
-```
-```xml
-
-```
+| | |
+|---|---|
+|[setDirection](objects/Progressbar/setDirection.md)|Sets the progress direction
+|[setProgress](objects/Progressbar/setProgress.md)|Sets the current progress
+|[getProgress](objects/Progressbar/getProgress.md)|Returns the current progress
+|[setProgressBar](objects/Progressbar/setProgressBar.md)|Changes the progress design
+|[setBackgroundSymbol](objects/Progressbar/setBackgroundSymbol.md)|Sets the background symbol
diff --git a/docs/objects/Progressbar/getProgress.md b/docs/objects/Progressbar/getProgress.md
new file mode 100644
index 0000000..0f99979
--- /dev/null
+++ b/docs/objects/Progressbar/getProgress.md
@@ -0,0 +1,14 @@
+## getProgress
+Returns the current progress status
+
+#### Returns:
+1. `number` progress (0-100)
+
+#### Usage:
+* Creates a progressbar, sets the current progress to 50 and prints the current progress
+```lua
+local mainFrame = basalt.createFrame()
+local aProgressbar = mainFrame:addProgressbar()
+aProgressbar:setProgress(50)
+basalt.debug(aProgressbar:getProgress())
+```
\ No newline at end of file
diff --git a/docs/objects/Progressbar/setBackgroundSymbol.md b/docs/objects/Progressbar/setBackgroundSymbol.md
new file mode 100644
index 0000000..cef8223
--- /dev/null
+++ b/docs/objects/Progressbar/setBackgroundSymbol.md
@@ -0,0 +1,19 @@
+## setBackgroundSymbol
+This will change the background symbol (default is " " - space)
+
+#### Parameters:
+1. `char` the background symbol
+
+#### Returns:
+1. `object` The object in use
+
+#### Usage:
+* Creates a progressbar and sets the progressbar background symbol to X
+```lua
+local mainFrame = basalt.createFrame()
+local aProgressbar = mainFrame:addProgressbar()
+aProgressbar:setBackgroundSymbol("X")
+```
+```xml
+
+```
\ No newline at end of file
diff --git a/docs/objects/Progressbar/setDirection.md b/docs/objects/Progressbar/setDirection.md
new file mode 100644
index 0000000..808d994
--- /dev/null
+++ b/docs/objects/Progressbar/setDirection.md
@@ -0,0 +1,19 @@
+## setDirection
+Sets the direction in which the bar should be expanding.
+
+#### Parameters:
+1. `number` x direction (0 = left to right, 1 = top to bottom, 2 = right to left and 3 = bottom to top)
+
+#### Returns:
+1. `object` The object in use
+
+#### Usage:
+* Creates a progressbar and sets the direction from bottom to top
+```lua
+local mainFrame = basalt.createFrame()
+local aProgressbar = mainFrame:addProgressbar()
+aProgressbar:setDirection(3)
+```
+```xml
+
+```
\ No newline at end of file
diff --git a/docs/objects/Progressbar/setProgress.md b/docs/objects/Progressbar/setProgress.md
new file mode 100644
index 0000000..4a0faa2
--- /dev/null
+++ b/docs/objects/Progressbar/setProgress.md
@@ -0,0 +1,16 @@
+## setProgress
+This is the function you need to call if you want the progression to change.
+
+#### Parameters:
+1. `number` a number from 0 to 100
+
+#### Returns:
+1. `object` The object in use
+
+#### Usage:
+* Creates a progressbar and sets the current progress to 50
+```lua
+local mainFrame = basalt.createFrame()
+local aProgressbar = mainFrame:addProgressbar()
+aProgressbar:setProgress(50)
+```
\ No newline at end of file
diff --git a/docs/objects/Progressbar/setProgressBar.md b/docs/objects/Progressbar/setProgressBar.md
new file mode 100644
index 0000000..7075af7
--- /dev/null
+++ b/docs/objects/Progressbar/setProgressBar.md
@@ -0,0 +1,21 @@
+## setProgressBar
+This function will change the visual display of your progress bar
+
+#### Parameters:
+1. `number|color` the expanding progress bar color
+2. `char` optional - the bar symbol - default is " " (space)
+3. `number|color` optional - the bar symbol color
+
+#### Returns:
+1. `object` The object in use
+
+#### Usage:
+* Creates a progressbar and sets the progressbar color to green
+```lua
+local mainFrame = basalt.createFrame()
+local aProgressbar = mainFrame:addProgressbar()
+aProgressbar:setProgressBar(colors.green, colors.yellow, colors.red)
+```
+```xml
+
+```
\ No newline at end of file
diff --git a/docs/objects/Radio.md b/docs/objects/Radio.md
index 41f1079..d3f1cbe 100644
--- a/docs/objects/Radio.md
+++ b/docs/objects/Radio.md
@@ -1,229 +1,28 @@
-Radios are objects which you can freely place, and the user is then able to select a single item.
+Radios are objects which you can freely place. The user is then able to select a item from the radio-list.
-If you want to access values inside items this is how the table for single items is made (just a example):
+[Object](objects/Object.md) methods also apply for radios.
+
+| | |
+|---|---|
+|[addItem](objects/List/addItem.md)|Adds a new item into the list
+|[removeItem](objects/List/removeItem.md)|Removes a item from the list
+|[editItem](objects/List/editItem.md)|Changes a already existing item in the list
+|[getItem](objects/List/getItem.md)|Returns a item by its index
+|[getItemCount](objects/List/getItemCount.md)|Returns the item count
+|[getAll](objects/List/getAll.md)|Returns the entire list as a table
+|[selectItem](objects/List/selectItem.md)|Selects a item
+|[clear](objects/List/clear.md)|Makes the entire list empty
+|[getItemIndex](objects/List/getItemIndex.md)|Returns the currently active item index
+|[setSelectedItem](objects/List/setSelectedItem.md)|Changes the default bg and fg, when the user selects a item
+
+
+A item-table in lists looks like the following example:
```lua
item = {
- text="1. Entry",
- bgCol=colors.black,
- fgCol=colors.white
- args = {}
+ text="1. Entry", -- the text its showing
+ bgCol=colors.black, -- the background color
+ fgCol=colors.white -- the foreground color
+ args = {} -- custom args you want to pass, which you will be able to access in for example onChange events
}
```
-
-Remember Radios also inherits from [Object](objects/Object.md)
-
-## addItem
-Adds a item to the radio
-
-#### Parameters:
-1. `string` The entry name
-2. `number` x position
-3. `number` y position
-2. `number|color` unique default background color - optional
-3. `number|color` unique default text color - optional
-4. `any` any value - you could access this later in a :onChange() event (you need to use :getValue()) - optional
-
-#### Returns:
-1. `object` The object in use
-
-#### Usage:
-* Creates a default radio with 3 entries
-```lua
-local mainFrame = basalt.createFrame()
-local aRadio = mainFrame:addRadio()
-aRadio:addItem("1. Entry",5,2)
-aRadio:addItem("2. Entry",5,4,colors.yellow)
-aRadio:addItem("3. Entry",5,6,colors.yellow,colors.green)
-```
-```xml
-
- 1. Entry52
- 2. Entry54yellow
- 3. Entry56yellowgreen
-
-```
-
-## removeItem
-Removes a item from the radio
-
-#### Parameters:
-1. `number` The index which should get removed
-
-#### Returns:
-1. `object` The object in use
-
-#### Usage:
-* Creates a default radio with 3 entries and removes the second one.
-```lua
-local mainFrame = basalt.createFrame()
-local aRadio = mainFrame:addRadio()
-aRadio:addItem("1. Entry",5,2)
-aRadio:addItem("2. Entry",5,4,colors.yellow)
-aRadio:addItem("3. Entry",5,6,colors.yellow,colors.green)
-aRadio:removeItem(2)
-```
-
-## editItem
-Edits a item from the radio
-
-#### Parameters:
-1. `number` The index which should be edited
-2. `string` The new item name
-3. `number` the new x position
-4. `number` the new y position
-3. `number|color` the new item background color - optional
-4. `number|color` The new item text color - optional
-5. `any` New additional information - optional
-
-#### Returns:
-1. `object` The object in use
-
-#### Usage:
-* Creates a default radio with 3 entries and changes the second one.
-```lua
-local mainFrame = basalt.createFrame()
-local aRadio = mainFrame:addRadio()
-aRadio:addItem("1. Entry",5,2)
-aRadio:addItem("2. Entry",5,4,colors.yellow)
-aRadio:addItem("3. Entry",5,6,colors.yellow,colors.green)
-aRadio:editItem(2, "Still 2. Entry", 5, 4, colors.red)
-```
-
-## getItem
-Returns a item by index
-
-#### Parameters:
-1. `number` The index which should be returned
-
-#### Returns:
-1. `table` The item table example: {text="1. Entry", bgCol=colors.black, fgCol=colors.white}
-
-#### Usage:
-* Creates a default radio with 3 entries and edits the second one.
-```lua
-local mainFrame = basalt.createFrame()
-local aRadio = mainFrame:addRadio()
-aRadio:addItem("1. Entry",5,2)
-aRadio:addItem("2. Entry",5,4,colors.yellow)
-aRadio:addItem("3. Entry",5,6,colors.yellow,colors.green)
-basalt.debug(aRadio:getItem(2).text)
-```
-
-## getItemCount
-Returns the current item count
-
-#### Returns:
-1. `number` The item radio count
-
-#### Usage:
-* Creates a default radio with 3 entries and prints the current item count.
-```lua
-local mainFrame = basalt.createFrame()
-local aRadio = mainFrame:addRadio()
-aRadio:addItem("1. Entry",5,2)
-aRadio:addItem("2. Entry",5,4,colors.yellow)
-aRadio:addItem("3. Entry",5,6,colors.yellow,colors.green)
-basalt.debug(aRadio:getItemCount())
-```
-
-## getAll
-Returns all items as table
-
-#### Returns:
-1. `table` All items
-
-#### Usage:
-* Creates a default menubar with 3 entries and prints a table.
-```lua
-local mainFrame = basalt.createFrame()
-local aRadio = mainFrame:addRadio()
-aRadio:addItem("1. Entry",5,2)
-aRadio:addItem("2. Entry",5,4,colors.yellow)
-aRadio:addItem("3. Entry",5,6,colors.yellow,colors.green)
-basalt.debug(aRadio:getAll())
-```
-
-## selectItem
-selects a item in the radio (same as a player would click on a item)
-
-#### Parameters:
-1. `number` The index which should get selected
-
-#### Returns:
-1. `object` The object in use
-
-#### Usage:
-* Creates a default radio with 3 entries and selects the second entry.
-```lua
-local mainFrame = basalt.createFrame()
-local aRadio = mainFrame:addRadio()
-aRadio:addItem("1. Entry",5,2)
-aRadio:addItem("2. Entry",5,4,colors.yellow)
-aRadio:addItem("3. Entry",5,6,colors.yellow,colors.green)
-aRadio:selectItem(2)
-```
-
-## clear
-Removes all items.
-
-#### Returns:
-1. `object` The object in use
-
-#### Usage:
-* Creates a default radio with 3 entries and removes them immediatley. Which makes no sense.
-```lua
-local mainFrame = basalt.createFrame()
-local aRadio = mainFrame:addRadio()
-aRadio:addItem("1. Entry",5,2)
-aRadio:addItem("2. Entry",5,4,colors.yellow)
-aRadio:addItem("3. Entry",5,6,colors.yellow,colors.green)
-aRadio:clear()
-```
-
-## getItemIndex
-returns the item index of the currently selected item
-
-#### Returns:
-1. `number` The current index
-
-#### Usage:
-* Creates a default radio with 3 entries selects the second entry and prints the currently selected index.
-```lua
-local mainFrame = basalt.createFrame()
-local aRadio = mainFrame:addRadio()
-aRadio:addItem("1. Entry",5,2)
-aRadio:addItem("2. Entry",5,4,colors.yellow)
-aRadio:addItem("3. Entry",5,6,colors.yellow,colors.green)
-aRadio:selectItem(2)
-basalt.debug(aRadio:getItemIndex())
-```
-
-## setSelectedItem
-Sets the background and the foreground of the item which is currently selected
-
-#### Parameters:
-1. `number|color` The background color which should be used
-2. `number|color` The text color which should be used
-
-#### Returns:
-1. `object` The object in use
-
-#### Usage:
-* Creates a default radio with 4 entries and sets the selection background color to green.
-```lua
-local mainFrame = basalt.createFrame()
-local aRadio = mainFrame:addRadio()
-aRadio:addItem("1. Entry",5,2)
-aRadio:addItem("2. Entry",5,4,colors.yellow)
-aRadio:addItem("3. Entry",5,6,colors.yellow,colors.green)
-aRadio:addItem("4. Entry",5,8)
-aRadio:setSelectedItem(colors.green, colors.red)
-```
-```xml
-
- 1. Entry52
- 2. Entry54yellow
- 3. Entry56yellowgreen
-
-```
\ No newline at end of file
diff --git a/docs/objects/Radio/addItem.md b/docs/objects/Radio/addItem.md
new file mode 100644
index 0000000..0dd6fa0
--- /dev/null
+++ b/docs/objects/Radio/addItem.md
@@ -0,0 +1,30 @@
+## addItem
+Adds a item to the radio
+
+#### Parameters:
+1. `string` The entry name
+2. `number` x position
+3. `number` y position
+2. `number|color` unique default background color - optional
+3. `number|color` unique default text color - optional
+4. `any` any value - you could access this later in a :onChange() event (you need to use :getValue()) - optional
+
+#### Returns:
+1. `object` The object in use
+
+#### Usage:
+* Creates a default radio with 3 entries
+```lua
+local mainFrame = basalt.createFrame()
+local aRadio = mainFrame:addRadio()
+aRadio:addItem("1. Entry",5,2)
+aRadio:addItem("2. Entry",5,4,colors.yellow)
+aRadio:addItem("3. Entry",5,6,colors.yellow,colors.green)
+```
+```xml
+
+ 1. Entry52
+ 2. Entry54yellow
+ 3. Entry56yellowgreen
+
+```
\ No newline at end of file
diff --git a/docs/objects/Radio/clear.md b/docs/objects/Radio/clear.md
new file mode 100644
index 0000000..8ae66d2
--- /dev/null
+++ b/docs/objects/Radio/clear.md
@@ -0,0 +1,16 @@
+## clear
+Removes all items.
+
+#### Returns:
+1. `object` The object in use
+
+#### Usage:
+* Creates a default radio with 3 entries and removes them immediatley. Which makes no sense.
+```lua
+local mainFrame = basalt.createFrame()
+local aRadio = mainFrame:addRadio()
+aRadio:addItem("1. Entry",5,2)
+aRadio:addItem("2. Entry",5,4,colors.yellow)
+aRadio:addItem("3. Entry",5,6,colors.yellow,colors.green)
+aRadio:clear()
+```
\ No newline at end of file
diff --git a/docs/objects/Radio/editItem.md b/docs/objects/Radio/editItem.md
new file mode 100644
index 0000000..dc26839
--- /dev/null
+++ b/docs/objects/Radio/editItem.md
@@ -0,0 +1,25 @@
+## editItem
+Edits a item from the radio
+
+#### Parameters:
+1. `number` The index which should be edited
+2. `string` The new item name
+3. `number` the new x position
+4. `number` the new y position
+3. `number|color` the new item background color - optional
+4. `number|color` The new item text color - optional
+5. `any` New additional information - optional
+
+#### Returns:
+1. `object` The object in use
+
+#### Usage:
+* Creates a default radio with 3 entries and changes the second one.
+```lua
+local mainFrame = basalt.createFrame()
+local aRadio = mainFrame:addRadio()
+aRadio:addItem("1. Entry",5,2)
+aRadio:addItem("2. Entry",5,4,colors.yellow)
+aRadio:addItem("3. Entry",5,6,colors.yellow,colors.green)
+aRadio:editItem(2, "Still 2. Entry", 5, 4, colors.red)
+```
\ No newline at end of file
diff --git a/docs/objects/Radio/getAll.md b/docs/objects/Radio/getAll.md
new file mode 100644
index 0000000..a759aff
--- /dev/null
+++ b/docs/objects/Radio/getAll.md
@@ -0,0 +1,16 @@
+## getAll
+Returns all items as table
+
+#### Returns:
+1. `table` All items
+
+#### Usage:
+* Creates a default menubar with 3 entries and prints a table.
+```lua
+local mainFrame = basalt.createFrame()
+local aRadio = mainFrame:addRadio()
+aRadio:addItem("1. Entry",5,2)
+aRadio:addItem("2. Entry",5,4,colors.yellow)
+aRadio:addItem("3. Entry",5,6,colors.yellow,colors.green)
+basalt.debug(aRadio:getAll())
+```
\ No newline at end of file
diff --git a/docs/objects/Radio/getItem.md b/docs/objects/Radio/getItem.md
new file mode 100644
index 0000000..a3ff6e8
--- /dev/null
+++ b/docs/objects/Radio/getItem.md
@@ -0,0 +1,19 @@
+## getItem
+Returns a item by index
+
+#### Parameters:
+1. `number` The index which should be returned
+
+#### Returns:
+1. `table` The item table example: {text="1. Entry", bgCol=colors.black, fgCol=colors.white}
+
+#### Usage:
+* Creates a default radio with 3 entries and edits the second one.
+```lua
+local mainFrame = basalt.createFrame()
+local aRadio = mainFrame:addRadio()
+aRadio:addItem("1. Entry",5,2)
+aRadio:addItem("2. Entry",5,4,colors.yellow)
+aRadio:addItem("3. Entry",5,6,colors.yellow,colors.green)
+basalt.debug(aRadio:getItem(2).text)
+```
\ No newline at end of file
diff --git a/docs/objects/Radio/getItemCount.md b/docs/objects/Radio/getItemCount.md
new file mode 100644
index 0000000..473de4d
--- /dev/null
+++ b/docs/objects/Radio/getItemCount.md
@@ -0,0 +1,16 @@
+## getItemCount
+Returns the current item count
+
+#### Returns:
+1. `number` The item radio count
+
+#### Usage:
+* Creates a default radio with 3 entries and prints the current item count.
+```lua
+local mainFrame = basalt.createFrame()
+local aRadio = mainFrame:addRadio()
+aRadio:addItem("1. Entry",5,2)
+aRadio:addItem("2. Entry",5,4,colors.yellow)
+aRadio:addItem("3. Entry",5,6,colors.yellow,colors.green)
+basalt.debug(aRadio:getItemCount())
+```
\ No newline at end of file
diff --git a/docs/objects/Radio/getItemIndex.md b/docs/objects/Radio/getItemIndex.md
new file mode 100644
index 0000000..230af6a
--- /dev/null
+++ b/docs/objects/Radio/getItemIndex.md
@@ -0,0 +1,17 @@
+## getItemIndex
+returns the item index of the currently selected item
+
+#### Returns:
+1. `number` The current index
+
+#### Usage:
+* Creates a default radio with 3 entries selects the second entry and prints the currently selected index.
+```lua
+local mainFrame = basalt.createFrame()
+local aRadio = mainFrame:addRadio()
+aRadio:addItem("1. Entry",5,2)
+aRadio:addItem("2. Entry",5,4,colors.yellow)
+aRadio:addItem("3. Entry",5,6,colors.yellow,colors.green)
+aRadio:selectItem(2)
+basalt.debug(aRadio:getItemIndex())
+```
\ No newline at end of file
diff --git a/docs/objects/Radio/removeItem.md b/docs/objects/Radio/removeItem.md
new file mode 100644
index 0000000..bf2bc3b
--- /dev/null
+++ b/docs/objects/Radio/removeItem.md
@@ -0,0 +1,19 @@
+## removeItem
+Removes a item from the radio
+
+#### Parameters:
+1. `number` The index which should get removed
+
+#### Returns:
+1. `object` The object in use
+
+#### Usage:
+* Creates a default radio with 3 entries and removes the second one.
+```lua
+local mainFrame = basalt.createFrame()
+local aRadio = mainFrame:addRadio()
+aRadio:addItem("1. Entry",5,2)
+aRadio:addItem("2. Entry",5,4,colors.yellow)
+aRadio:addItem("3. Entry",5,6,colors.yellow,colors.green)
+aRadio:removeItem(2)
+```
\ No newline at end of file
diff --git a/docs/objects/Radio/selectItem.md b/docs/objects/Radio/selectItem.md
new file mode 100644
index 0000000..a434769
--- /dev/null
+++ b/docs/objects/Radio/selectItem.md
@@ -0,0 +1,19 @@
+## selectItem
+selects a item in the radio (same as a player would click on a item)
+
+#### Parameters:
+1. `number` The index which should get selected
+
+#### Returns:
+1. `object` The object in use
+
+#### Usage:
+* Creates a default radio with 3 entries and selects the second entry.
+```lua
+local mainFrame = basalt.createFrame()
+local aRadio = mainFrame:addRadio()
+aRadio:addItem("1. Entry",5,2)
+aRadio:addItem("2. Entry",5,4,colors.yellow)
+aRadio:addItem("3. Entry",5,6,colors.yellow,colors.green)
+aRadio:selectItem(2)
+```
\ No newline at end of file
diff --git a/docs/objects/Radio/setSelectedItem.md b/docs/objects/Radio/setSelectedItem.md
new file mode 100644
index 0000000..7eed21d
--- /dev/null
+++ b/docs/objects/Radio/setSelectedItem.md
@@ -0,0 +1,28 @@
+## setSelectedItem
+Sets the background and the foreground of the item which is currently selected
+
+#### Parameters:
+1. `number|color` The background color which should be used
+2. `number|color` The text color which should be used
+
+#### Returns:
+1. `object` The object in use
+
+#### Usage:
+* Creates a default radio with 4 entries and sets the selection background color to green.
+```lua
+local mainFrame = basalt.createFrame()
+local aRadio = mainFrame:addRadio()
+aRadio:addItem("1. Entry",5,2)
+aRadio:addItem("2. Entry",5,4,colors.yellow)
+aRadio:addItem("3. Entry",5,6,colors.yellow,colors.green)
+aRadio:addItem("4. Entry",5,8)
+aRadio:setSelectedItem(colors.green, colors.red)
+```
+```xml
+
+ 1. Entry52
+ 2. Entry54yellow
+ 3. Entry56yellowgreen
+
+```
\ No newline at end of file
diff --git a/docs/objects/Slider.md b/docs/objects/Slider.md
index 7059bba..b05488b 100644
--- a/docs/objects/Slider.md
+++ b/docs/objects/Slider.md
@@ -1,108 +1,13 @@
-Sliders are objects, the user can scroll vertically or horizontally, this will change a value, which you can access by :getValue().
+Sliders are objects where the user can scroll vertically or horizontally, this will change a value, which you can access by :getValue().
-Remember slider also inherits from [Object](objects/Object.md)
+[Object](objects/Object.md) methods also apply for sliders.
-## setSymbol
-Changes the slider symbol, default is " "
-
-#### Parameters:
-1. `string` symbol
-
-#### Returns:
-1. `object` The object in use
-
-#### Usage:
-* Creates a new slider and changes the symbol to X
-```lua
-local mainFrame = basalt.createFrame()
-local slider = mainFrame:addSlider():setSymbol("X")
-```
-```xml
-
-```
-
-## setBackgroundSymbol
-Changes the symbol in the background, default is "\140"
-
-#### Parameters:
-1. `string` symbol
-
-#### Returns:
-1. `object` The object in use
-
-#### Usage:
-* Creates a new slider and changes the background symbol to X
-```lua
-local mainFrame = basalt.createFrame()
-local slider = mainFrame:addSlider():setBackgroundSymbol("X")
-```
-```xml
-
-```
-
-## setBarType
-Changes the slider to be vertical or horizontal, default is horizontal
-
-#### Parameters:
-1. `string` vertical or horizontal
-
-#### Returns:
-1. `object` The object in use
-
-#### Usage:
-* Creates a new slider and changes the bar type to horizontal
-```lua
-local mainFrame = basalt.createFrame()
-local slider = mainFrame:addSlider():setBarType("vertical")
-```
-```xml
-
-```
-
-## setMaxValue
-the default max value is always the width (if horizontal) or height (if vertical), if you change the max value the bar will always calculate the value based on its width or height - example: you set the max value to 100, the height is 10 and it is a vertical bar, this means if the bar is on top, the value is 10, if the bar goes one below, it is 20 and so on.
-
-#### Parameters:
-1. `number` maximum
-
-#### Returns:
-1. `object` The object in use
-
-#### Usage:
-* Creates a new slider and changes the max value to 20
-```lua
-local mainFrame = basalt.createFrame()
-local slider = mainFrame:addSlider():setMaxValue(20)
-```
-```xml
-
-```
-
-## setIndex
-Changes the current index to your choice, for example you could create a button which scrolls up to 1 by using :setIndex(1)
-
-#### Parameters:
-1. `number` the index
-
-#### Returns:
-1. `object` The object in use
-
-#### Usage:
-* Creates a new slider and changes the index to 1 as soon as the button got clicked
-```lua
-local mainFrame = basalt.createFrame()
-local slider = mainFrame:addSlider():setMaxValue(20)
-local button = mainFrame:addButton(function()
- slider:setIndex(1)
-end)
-```
-```xml
-
-```
-
-## getIndex
-Returns the current index
-
-#### Returns:
-1. `number` index
+| | |
+|---|---|
+|[setSymbol](objects/Slider/setSymbol.md)|Sets the slider symbol
+|[setBackgroundSymbol](objects/Slider/setBackgroundSymbol.md)|Sets the background symbol
+|[setBarType](objects/Slider/setBarType.md)|Sets the bar type (vertical or horizontal)
+|[setMaxValue](objects/Slider/setMaxValue.md)|Sets the maximum value
+|[setIndex](objects/Slider/setIndex.md)|Sets the current index
+|[getIndex](objects/Slider/getIndex.md)|Returns the index
diff --git a/docs/objects/Slider/getIndex.md b/docs/objects/Slider/getIndex.md
new file mode 100644
index 0000000..320d465
--- /dev/null
+++ b/docs/objects/Slider/getIndex.md
@@ -0,0 +1,5 @@
+## getIndex
+Returns the current index
+
+#### Returns:
+1. `number` index
diff --git a/docs/objects/Slider/setBackgroundSymbol.md b/docs/objects/Slider/setBackgroundSymbol.md
new file mode 100644
index 0000000..9f91dcd
--- /dev/null
+++ b/docs/objects/Slider/setBackgroundSymbol.md
@@ -0,0 +1,18 @@
+## setBackgroundSymbol
+Changes the symbol in the background, default is "\140"
+
+#### Parameters:
+1. `string` symbol
+
+#### Returns:
+1. `object` The object in use
+
+#### Usage:
+* Creates a new slider and changes the background symbol to X
+```lua
+local mainFrame = basalt.createFrame()
+local slider = mainFrame:addSlider():setBackgroundSymbol("X")
+```
+```xml
+
+```
\ No newline at end of file
diff --git a/docs/objects/Slider/setBarType.md b/docs/objects/Slider/setBarType.md
new file mode 100644
index 0000000..54c0461
--- /dev/null
+++ b/docs/objects/Slider/setBarType.md
@@ -0,0 +1,18 @@
+## setBarType
+Changes the slider to be vertical or horizontal, default is horizontal
+
+#### Parameters:
+1. `string` vertical or horizontal
+
+#### Returns:
+1. `object` The object in use
+
+#### Usage:
+* Creates a new slider and changes the bar type to horizontal
+```lua
+local mainFrame = basalt.createFrame()
+local slider = mainFrame:addSlider():setBarType("vertical")
+```
+```xml
+
+```
\ No newline at end of file
diff --git a/docs/objects/Slider/setIndex.md b/docs/objects/Slider/setIndex.md
new file mode 100644
index 0000000..1fc9925
--- /dev/null
+++ b/docs/objects/Slider/setIndex.md
@@ -0,0 +1,21 @@
+## setIndex
+Changes the current index to your choice, for example you could create a button which scrolls up to 1 by using :setIndex(1)
+
+#### Parameters:
+1. `number` the index
+
+#### Returns:
+1. `object` The object in use
+
+#### Usage:
+* Creates a new slider and changes the index to 1 as soon as the button got clicked
+```lua
+local mainFrame = basalt.createFrame()
+local slider = mainFrame:addSlider():setMaxValue(20)
+local button = mainFrame:addButton(function()
+ slider:setIndex(1)
+end)
+```
+```xml
+
+```
\ No newline at end of file
diff --git a/docs/objects/Slider/setMaxValue.md b/docs/objects/Slider/setMaxValue.md
new file mode 100644
index 0000000..9e3b043
--- /dev/null
+++ b/docs/objects/Slider/setMaxValue.md
@@ -0,0 +1,18 @@
+## setMaxValue
+the default max value is always the width (if horizontal) or height (if vertical), if you change the max value the bar will always calculate the value based on its width or height - example: you set the max value to 100, the height is 10 and it is a vertical bar, this means if the bar is on top, the value is 10, if the bar goes one below, it is 20 and so on.
+
+#### Parameters:
+1. `number` maximum
+
+#### Returns:
+1. `object` The object in use
+
+#### Usage:
+* Creates a new slider and changes the max value to 20
+```lua
+local mainFrame = basalt.createFrame()
+local slider = mainFrame:addSlider():setMaxValue(20)
+```
+```xml
+
+```
\ No newline at end of file
diff --git a/docs/objects/Slider/setSymbol.md b/docs/objects/Slider/setSymbol.md
new file mode 100644
index 0000000..e7e5208
--- /dev/null
+++ b/docs/objects/Slider/setSymbol.md
@@ -0,0 +1,18 @@
+## setSymbol
+Changes the slider symbol, default is " "
+
+#### Parameters:
+1. `string` symbol
+
+#### Returns:
+1. `object` The object in use
+
+#### Usage:
+* Creates a new slider and changes the symbol to X
+```lua
+local mainFrame = basalt.createFrame()
+local slider = mainFrame:addSlider():setSymbol("X")
+```
+```xml
+
+```
\ No newline at end of file
diff --git a/docs/objects/Textfield.md b/docs/objects/Textfield.md
index b944336..02d1920 100644
--- a/docs/objects/Textfield.md
+++ b/docs/objects/Textfield.md
@@ -1,161 +1,15 @@
-Textfields are objects, where the user can write something on multiple lines. it act's like the default edit script (without coloring)
+Textfields are objects, where the user can write something in multiple lines. It behaves like the default edit script
-Remember textfield inherits from [Object](objects/Object.md)
+[Object](objects/Object.md) methods also apply for textfields.
-## getLines
-Returns all lines
+| | |
+|---|---|
+|[getLines](objects/Textfield/getLines.md)|
+|[getLine](objects/Textfield/getLine.md)|
+|[editLine](objects/Textfield/editLine.md)|
+|[addLine](objects/Textfield/addLine.md)|
+|[removeLine](objects/Textfield/removeLine.md)|
+|[getTextCursor](objects/Textfield/getTextCursor.md)|
+|[addKeywords](objects/Textfield/addKeywords.md)|
+|[addRule](objects/Textfield/addRule.md)|
-#### Returns:
-1. `table` lines
-
-#### Usage:
-* Prints all lines
-```lua
-local mainFrame = basalt.createFrame("myFirstFrame"):show()
-local aTextfield = mainFrame:addTextfield("myFirstTextfield"):show()
-basalt.debug(aTextfield:getLines())
-```
-
-## getLine
-Returns the line on index position
-
-#### Parameteres:
-1. `number` index
-
-#### Returns:
-1. `string` line
-
-#### Usage:
-* Prints one line
-```lua
-local mainFrame = basalt.createFrame("myFirstFrame"):show()
-local aTextfield = mainFrame:addTextfield("myFirstTextfield"):show()
-basalt.debug(aTextfield:getLine(1))
-```
-
-## editLine
-Edits the line on index position
-
-#### Parameteres:
-1. `number` index
-2. `string` text
-
-#### Returns:
-1. `object` The object in use
-
-#### Usage:
-* Edits the line
-```lua
-local mainFrame = basalt.createFrame("myFirstFrame"):show()
-local aTextfield = mainFrame:addTextfield("myFirstTextfield"):show()
-basalt.debug(aTextfield:editLine(1, "Hello!"))
-```
-
-## addLine
-Adds a line on index position
-
-#### Parameteres:
-1. `string` text
-2. `number` index
-
-#### Returns:
-1. `object` The object in use
-
-#### Usage:
-* Adds a line
-```lua
-local mainFrame = basalt.createFrame("myFirstFrame"):show()
-local aTextfield = mainFrame:addTextfield("myFirstTextfield"):show()
-basalt.debug(aTextfield:addLine("Hello!", 1))
-```
-```xml
-
-
- Hello!
-
-
-```
-
-## removeLine
-Removes the line on index position
-
-#### Parameteres:
-1. `number` index
-2. `string` text
-
-#### Returns:
-1. `object` The object in use
-
-#### Usage:
-* Removes a line
-```lua
-local mainFrame = basalt.createFrame("myFirstFrame"):show()
-local aTextfield = mainFrame:addTextfield("myFirstTextfield"):show()
-basalt.debug(aTextfield:removeLine())
-```
-
-## getTextCursor
-Gets text cursor position
-
-#### Returns:
-1. `number` x position
-2. `number` y position
-
-## addKeywords
-Adds keywords for special coloring
-
-#### Parameteres:
-1. `number|color` color of your choice
-2. `table` a list of keywords which should be colored example: {"if", "else", "then", "while", "do"}
-
-#### Returns:
-1. `object` The object in use
-
-#### Usage:
-* Changes the color of some words to purple
-```lua
-local mainFrame = basalt.createFrame()
-local aTextfield = mainFrame:addTextfield():addKeywords(colors.purple, {"if", "else", "then", "while", "do", "hello"})
-```
-```xml
-
-
-
- if
- else
- then
- while
- do
- hello
-
-
-
-```
-
-## addRule
-Adds a new rule for special coloring
-
-#### Parameteres:
-1. `string` a pattern - check out this page: (https://riptutorial.com/lua/example/20315/lua-pattern-matching)
-2. `number|color` text color
-3. `number|color` background color - optional
-
-#### Returns:
-1. `object` The object in use
-
-#### Usage:
-* Changes the color of all numbers
-```lua
-local mainFrame = basalt.createFrame()
-local aTextfield = mainFrame:addTextfield():addRule("%d", colors.lightBlue)
-```
-```xml
-
-
-
- %d
- lightBlue
-
-
-
-```
\ No newline at end of file
diff --git a/docs/objects/Textfield/addKeywords.md b/docs/objects/Textfield/addKeywords.md
new file mode 100644
index 0000000..a6fea47
--- /dev/null
+++ b/docs/objects/Textfield/addKeywords.md
@@ -0,0 +1,30 @@
+## addKeywords
+Adds keywords for special coloring
+
+#### Parameteres:
+1. `number|color` color of your choice
+2. `table` a list of keywords which should be colored example: {"if", "else", "then", "while", "do"}
+
+#### Returns:
+1. `object` The object in use
+
+#### Usage:
+* Changes the color of some words to purple
+```lua
+local mainFrame = basalt.createFrame()
+local aTextfield = mainFrame:addTextfield():addKeywords(colors.purple, {"if", "else", "then", "while", "do", "hello"})
+```
+```xml
+
+
+
+ if
+ else
+ then
+ while
+ do
+ hello
+
+
+
+```
\ No newline at end of file
diff --git a/docs/objects/Textfield/addLine.md b/docs/objects/Textfield/addLine.md
new file mode 100644
index 0000000..6109f0c
--- /dev/null
+++ b/docs/objects/Textfield/addLine.md
@@ -0,0 +1,24 @@
+## addLine
+Adds a line on index position
+
+#### Parameteres:
+1. `string` text
+2. `number` index
+
+#### Returns:
+1. `object` The object in use
+
+#### Usage:
+* Adds a line
+```lua
+local mainFrame = basalt.createFrame("myFirstFrame"):show()
+local aTextfield = mainFrame:addTextfield("myFirstTextfield"):show()
+basalt.debug(aTextfield:addLine("Hello!", 1))
+```
+```xml
+
+
+ Hello!
+
+
+```
\ No newline at end of file
diff --git a/docs/objects/Textfield/addRule.md b/docs/objects/Textfield/addRule.md
new file mode 100644
index 0000000..c808ab9
--- /dev/null
+++ b/docs/objects/Textfield/addRule.md
@@ -0,0 +1,27 @@
+## addRule
+Adds a new rule for special coloring
+
+#### Parameteres:
+1. `string` a pattern - check out this page: (https://riptutorial.com/lua/example/20315/lua-pattern-matching)
+2. `number|color` text color
+3. `number|color` background color - optional
+
+#### Returns:
+1. `object` The object in use
+
+#### Usage:
+* Changes the color of all numbers
+```lua
+local mainFrame = basalt.createFrame()
+local aTextfield = mainFrame:addTextfield():addRule("%d", colors.lightBlue)
+```
+```xml
+
+
+
+ %d
+ lightBlue
+
+
+
+```
\ No newline at end of file
diff --git a/docs/objects/Textfield/editLine.md b/docs/objects/Textfield/editLine.md
new file mode 100644
index 0000000..f08a176
--- /dev/null
+++ b/docs/objects/Textfield/editLine.md
@@ -0,0 +1,17 @@
+## editLine
+Edits the line on index position
+
+#### Parameteres:
+1. `number` index
+2. `string` text
+
+#### Returns:
+1. `object` The object in use
+
+#### Usage:
+* Edits the line
+```lua
+local mainFrame = basalt.createFrame("myFirstFrame"):show()
+local aTextfield = mainFrame:addTextfield("myFirstTextfield"):show()
+basalt.debug(aTextfield:editLine(1, "Hello!"))
+```
\ No newline at end of file
diff --git a/docs/objects/Textfield/getLine.md b/docs/objects/Textfield/getLine.md
new file mode 100644
index 0000000..ec3dc21
--- /dev/null
+++ b/docs/objects/Textfield/getLine.md
@@ -0,0 +1,16 @@
+## getLine
+Returns the line on index position
+
+#### Parameteres:
+1. `number` index
+
+#### Returns:
+1. `string` line
+
+#### Usage:
+* Prints one line
+```lua
+local mainFrame = basalt.createFrame("myFirstFrame"):show()
+local aTextfield = mainFrame:addTextfield("myFirstTextfield"):show()
+basalt.debug(aTextfield:getLine(1))
+```
\ No newline at end of file
diff --git a/docs/objects/Textfield/getLines.md b/docs/objects/Textfield/getLines.md
new file mode 100644
index 0000000..a76bbc4
--- /dev/null
+++ b/docs/objects/Textfield/getLines.md
@@ -0,0 +1,13 @@
+## getLines
+Returns all lines
+
+#### Returns:
+1. `table` lines
+
+#### Usage:
+* Prints all lines
+```lua
+local mainFrame = basalt.createFrame("myFirstFrame"):show()
+local aTextfield = mainFrame:addTextfield("myFirstTextfield"):show()
+basalt.debug(aTextfield:getLines())
+```
\ No newline at end of file
diff --git a/docs/objects/Textfield/getTextCursor.md b/docs/objects/Textfield/getTextCursor.md
new file mode 100644
index 0000000..734b5e9
--- /dev/null
+++ b/docs/objects/Textfield/getTextCursor.md
@@ -0,0 +1,6 @@
+## getTextCursor
+Gets text cursor position
+
+#### Returns:
+1. `number` x position
+2. `number` y position
\ No newline at end of file
diff --git a/docs/objects/Textfield/removeLine.md b/docs/objects/Textfield/removeLine.md
new file mode 100644
index 0000000..ec31544
--- /dev/null
+++ b/docs/objects/Textfield/removeLine.md
@@ -0,0 +1,17 @@
+## removeLine
+Removes the line on index position
+
+#### Parameteres:
+1. `number` index
+2. `string` text
+
+#### Returns:
+1. `object` The object in use
+
+#### Usage:
+* Removes a line
+```lua
+local mainFrame = basalt.createFrame("myFirstFrame"):show()
+local aTextfield = mainFrame:addTextfield("myFirstTextfield"):show()
+basalt.debug(aTextfield:removeLine())
+```
\ No newline at end of file
diff --git a/docs/objects/Thread.md b/docs/objects/Thread.md
index 080a07e..ee7d44e 100644
--- a/docs/objects/Thread.md
+++ b/docs/objects/Thread.md
@@ -1,65 +1,7 @@
-Threads are being executed simultaneously.
-
+## Methods
-## start
-starts a new thread and executes the function
-#### Parameters:
-1. `function` the function which should be executed
-
-#### Returns:
-1. `object` The object in use
-
-#### Usage:
-* Starts a new thread
-```lua
-local mainFrame = basalt.createFrame()
-local aThread = mainFrame:addThread()
-local function randomThreadFunction()
- while true do
- basalt.debug("Thread is active")
- os.sleep(1) -- a sleep/coroutine.yield() or pullEvent is required otherwise we will never come back to the main program (error)
- end
-end
-aThread:start(randomThreadfunction)
-```
-you are also able to start threads via xml:
-```lua
- basalt.setVariable("myThread", function() while true do os.sleep(1) end end)
-```
-```xml
-
-```
-
-## stop
-stops the thread
-
-#### Returns:
-1. `object` The object in use
-
-#### Usage:
-* Stops the current running thread by clicking on a button
-```lua
-local mainFrame = basalt.createFrame()
-local aThread = mainFrame:addThread()
-local function randomThreadFunction()
- while true do
- basalt.debug("Thread is active")
- os.sleep(1) -- a sleep/coroutine.yield() or pullEvent is required otherwise we will never come back to the main program (error)
- end
-end
-aThread:start(randomThreadfunction)
-local aButton = mainFrame:addButton():setText("Stop Thread"):onClick(function() aThread:stop() end)
-```
-
-## getStatus
-gets the current thread status
-
-#### Returns:
-1. `string` current status - ("running", "normal", "suspended", "dead")
-
-#### Usage:
-```lua
-local mainFrame = basalt.createFrame()
-local aThread = mainFrame:addThread()
-basalt.debug(aThread:getStatus())
-```
+| | |
+|---|---|
+|[start](objects/Thread/start.md)|starts a new thread and executes the function
+|[stop](objects/Thread/stop.md)|stops the currently running thread
+|[getStatus](objects/Thread/getStatus.md)|Returns the current thread status
diff --git a/docs/objects/Thread/getStatus.md b/docs/objects/Thread/getStatus.md
new file mode 100644
index 0000000..1c91d0d
--- /dev/null
+++ b/docs/objects/Thread/getStatus.md
@@ -0,0 +1,12 @@
+## getStatus
+Returns the current thread status
+
+#### Returns:
+1. `string` current status - ("running", "normal", "suspended", "dead")
+
+#### Usage:
+```lua
+local mainFrame = basalt.createFrame()
+local aThread = mainFrame:addThread()
+basalt.debug(aThread:getStatus())
+```
diff --git a/docs/objects/Thread/start.md b/docs/objects/Thread/start.md
new file mode 100644
index 0000000..d632d48
--- /dev/null
+++ b/docs/objects/Thread/start.md
@@ -0,0 +1,28 @@
+## start
+starts a new thread and executes the function
+#### Parameters:
+1. `function` the function which should be executed
+
+#### Returns:
+1. `object` The object in use
+
+#### Usage:
+* Starts a new thread
+```lua
+local mainFrame = basalt.createFrame()
+local aThread = mainFrame:addThread()
+local function randomThreadFunction()
+ while true do
+ basalt.debug("Thread is active")
+ os.sleep(1) -- a sleep/coroutine.yield() or pullEvent is required otherwise we will never come back to the main program (error)
+ end
+end
+aThread:start(randomThreadfunction)
+```
+you are also able to start threads via xml:
+```lua
+ basalt.setVariable("myThread", function() while true do os.sleep(1) end end)
+```
+```xml
+
+```
\ No newline at end of file
diff --git a/docs/objects/Thread/stop.md b/docs/objects/Thread/stop.md
new file mode 100644
index 0000000..db500f4
--- /dev/null
+++ b/docs/objects/Thread/stop.md
@@ -0,0 +1,20 @@
+## stop
+stops the currently running thread
+
+#### Returns:
+1. `object` The object in use
+
+#### Usage:
+* Stops the current running thread by clicking on a button
+```lua
+local mainFrame = basalt.createFrame()
+local aThread = mainFrame:addThread()
+local function randomThreadFunction()
+ while true do
+ basalt.debug("Thread is active")
+ os.sleep(1) -- a sleep/coroutine.yield() or pullEvent is required otherwise we will never come back to the main program (error)
+ end
+end
+aThread:start(randomThreadfunction)
+local aButton = mainFrame:addButton():setText("Stop Thread"):onClick(function() aThread:stop() end)
+```
\ No newline at end of file
diff --git a/docs/objects/Timer.md b/docs/objects/Timer.md
index 72dfdc3..d18f106 100644
--- a/docs/objects/Timer.md
+++ b/docs/objects/Timer.md
@@ -1,84 +1,13 @@
-Timers can call your functions delay and repeat it as often as you wish
-
+## Methods
-## setTime
-sets the time the timer should wait after calling your function
+| | |
+|---|---|
+|[setTime](objects/Timer/setTime.md)|Sets the time the timer should wait after calling your function
+|[start](objects/Timer/start.md)|Starts the timer
+|[cancel](objects/Timer/cancel.md)|Cancels the timer
-#### Parameters:
-1. `number` the time to delay
-2. `number` how often it should be repeated -1 is infinite
+## Events
-#### Returns:
-1. `object` The object
-
-```lua
-local mainFrame = basalt.createFrame()
-local aTimer = mainFrame:addTimer()
-aTimer:setTime(2)
-```
-```xml
-
-```
-
-## start
-Starts the timer
-
-#### Returns:
-1. `object` The object
-
-```lua
-local mainFrame = basalt.createFrame()
-local aTimer = mainFrame:addTimer()
-aTimer:setTime(2):start()
-```
-```xml
-
-```
-
-## cancel
-Cancels the timer
-
-#### Returns:
-1. `object` The object
-
-```lua
-local mainFrame = basalt.createFrame()
-local aTimer = mainFrame:addTimer()
-aTimer:setTime(2):start()
-aTimer:cancel()
-```
-
-# Events
-
-## onCall
-`onCall(self)`
-A custom event which gets triggered as soon as the current timer has finished
-
-Here is a example on how to add a onCall event to your timer:
-
-```lua
-local basalt = require("Basalt")
-
-local mainFrame = basalt.createFrame()
-local aTimer = mainFrame:addTimer()
-
-function call()
- basalt.debug("The timer has finished!")
-end
-aTimer:onCall(call)
-```
-
-Here is also a example how this is done with xml:
-
-```lua
-local basalt = require("Basalt")
-
-local mainFrame = basalt.createFrame()
-
-basalt.setVariable("call", function()
- basalt.debug("The timer has finished!")
-end)
-```
-```xml
-
-```
\ No newline at end of file
+| | |
+|---|---|
+|[onCall](objects/Timer/onCall.md)|A custom event which gets triggered as soon as the current timer has finished
\ No newline at end of file
diff --git a/docs/objects/Timer/cancel.md b/docs/objects/Timer/cancel.md
new file mode 100644
index 0000000..8d90c1e
--- /dev/null
+++ b/docs/objects/Timer/cancel.md
@@ -0,0 +1,12 @@
+## cancel
+Cancels the timer
+
+#### Returns:
+1. `object` The object
+
+```lua
+local mainFrame = basalt.createFrame()
+local aTimer = mainFrame:addTimer()
+aTimer:setTime(2):start()
+aTimer:cancel()
+```
\ No newline at end of file
diff --git a/docs/objects/Timer/onCall.md b/docs/objects/Timer/onCall.md
new file mode 100644
index 0000000..93c978f
--- /dev/null
+++ b/docs/objects/Timer/onCall.md
@@ -0,0 +1,35 @@
+## onCall
+`onCall(self)`
+A custom event which gets triggered as soon as the current timer has finished
+
+
+Here is a example on how to add a onCall event to your timer:
+
+```lua
+local basalt = require("basalt")
+
+local mainFrame = basalt.createFrame()
+local aTimer = mainFrame:addTimer()
+
+function call()
+ basalt.debug("The timer has finished!")
+end
+aTimer:onCall(call)
+ :setTime(2)
+ :start()
+```
+
+Here is also a example how this is done with xml:
+
+```lua
+local basalt = require("basalt")
+
+local mainFrame = basalt.createFrame()
+
+basalt.setVariable("call", function()
+ basalt.debug("The timer has finished!")
+end)
+```
+```xml
+
+```
\ No newline at end of file
diff --git a/docs/objects/Timer/setTime.md b/docs/objects/Timer/setTime.md
new file mode 100644
index 0000000..5ed5cde
--- /dev/null
+++ b/docs/objects/Timer/setTime.md
@@ -0,0 +1,18 @@
+## setTime
+sets the time the timer should wait after calling your function
+
+#### Parameters:
+1. `number` the time to delay
+2. `number` how often it should be repeated -1 is infinite
+
+#### Returns:
+1. `object` The object
+
+```lua
+local mainFrame = basalt.createFrame()
+local aTimer = mainFrame:addTimer()
+aTimer:setTime(2)
+```
+```xml
+
+```
\ No newline at end of file
diff --git a/docs/objects/Timer/start.md b/docs/objects/Timer/start.md
new file mode 100644
index 0000000..1639572
--- /dev/null
+++ b/docs/objects/Timer/start.md
@@ -0,0 +1,14 @@
+## start
+Starts the timer
+
+#### Returns:
+1. `object` The object
+
+```lua
+local mainFrame = basalt.createFrame()
+local aTimer = mainFrame:addTimer()
+aTimer:setTime(2):start()
+```
+```xml
+
+```
\ No newline at end of file
diff --git a/docs/tips/buttonColoring.md b/docs/tips/buttonColoring.md
new file mode 100644
index 0000000..c423f0e
--- /dev/null
+++ b/docs/tips/buttonColoring.md
@@ -0,0 +1,80 @@
+Here i will explain to you how you can add some coloring to your buttons in certain events. This is not only for buttons possible but also for all the other visual objects
+
+But first, i want to explain to you that you can also add the same event-type multiple times:
+```lua
+local function buttonColoring(self, event, button, x, y)
+-- here you can add some coloring for your button - for example:
+ self:setBackground(colors.black)
+end
+local function buttonLogic(self, event, button, x, y)
+-- here you can add some logic for your button
+ basalt.debug("Some logic")
+end
+local button = main:addButton()
+button:onClick(buttonColoring):onClick(buttonLogic) -- yes this would work, if not its a bug!
+```
+This means you can create a function wich handles only the coloring side of your button, and if your button also needs some logic you just create another function for that and add it to your button.
+
+
+Now let's create a function where we pass a button object as an argument on which we set up the coloring
+```lua
+local basalt = require("basalt")
+local main = basalt.createFrame()
+local button = main:addButton()
+ :setPosition(3,3)
+ :setSize(12,3)
+ :setText("Click me")
+ :setBackground(colors.gray)
+ :setForeground(colors.black)
+
+local button2 = main:addButton()
+ :setPosition(25,3)
+ :setSize(16,3)
+ :setText("Another Btn")
+ :setBackground(colors.gray)
+ :setForeground(colors.black)
+
+local function setupButtonColoring(self, event, button, x, y)
+ self:onClick(function()
+ self:setBackground(colors.black)
+ self:setForeground(colors.lightGray)
+ end)
+ self:onClickUp(function()
+ self:setBackground(colors.gray)
+ self:setForeground(colors.black)
+ end)
+ self:onLoseFocus(function()
+ self:setBackground(colors.gray)
+ self:setForeground(colors.black)
+ end)
+end
+
+setupButtonColoring(button)
+setupButtonColoring(button2)
+
+basalt.autoUpdate()
+```
+
+Now you got a button which changes the color when you click on it.
+
+
+There is also another way of doing it, but this is time based, which means it does not check if the user is holding the mousebutton down.
+```lua
+local basalt = require("basalt")
+
+local main = basalt.createFrame()
+local button = main:addButton()
+ :setPosition(3,3)
+ :setSize(12,3)
+ :setText("Click me")
+ :setBackground(colors.gray)
+ :setForeground(colors.black)
+
+button:onClick(basalt.schedule(function()
+ button:setBackground(colors.black)
+ sleep(0.5)
+ button:setBackground(colors.gray)
+ end))
+```
+
+Here you are using basalt.schedule, which will start the function in a coroutine
\ No newline at end of file
diff --git a/docs/tips/buttons.md b/docs/tips/buttons.md
deleted file mode 100644
index 477fb96..0000000
--- a/docs/tips/buttons.md
+++ /dev/null
@@ -1,41 +0,0 @@
-Here I want to explain to you how you would create a button with the default color gray, and as long as the user is clicking on the button it will change its color to black (the default frame-background is lightGray).
-
-To make this possible the button needs 1 onClick event, 1 onClickUp event and 1 onLoseFocus event.
-
-Very interesting sidetip: events can hold multiple functions!
-**Example snippet:**
-```lua
-local function buttonColoring()
--- here you can add some coloring for your button
-end
-local function buttonLogic()
--- here you can add some logic for your button
-end
-local button = mainFrame:addButton("ExampleButton"):show()
-button:onClick(buttonColoring):onClick(buttonLogic) -- yes this would work, if not its a bug!
-```
-
-This means you can create a function wich handles only the coloring side of your button, and if your button also needs some logic you just create your own unique function for that and add it to your button.
-
-With this knowledge we create now a function where we pass a button-object as parameter and this will setup the coloring of our button:
-
-**Example snippet:**
-```lua
-local basalt = dofile("basalt.lua")
-local mainFrame = basalt.createFrame("mainFrame"):show()
-local button = mainFrame:addButton("firstButton"):setPosition(3,3):setSize(12,3):setText("Click me"):setBackground(colors.gray):setForeground(colors.black):show()
-
-local button2 = mainFrame:addButton("secondButton"):setPosition(25,3):setSize(16,3):setText("Another Btn"):setBackground(colors.gray):setForeground(colors.black):show()
-
-local function setupButtonColoring(btn)
-btn:onClick(function() btn:setBackground(colors.black) btn:setForeground(colors.lightGray) end)
-btn:onClickUp(function() btn:setBackground(colors.gray) btn:setForeground(colors.black) end)
-btn:onLoseFocus(function() btn:setBackground(colors.gray) btn:setForeground(colors.black) end)
-end
-setupButtonColoring(button)
-setupButtonColoring(button2)
-
-basalt.autoUpdate()
-```
-
-Now you've got a function which sets your buttons up.
\ No newline at end of file
diff --git a/docs/tips/design.md b/docs/tips/design.md
index 3d6efb4..84be104 100644
--- a/docs/tips/design.md
+++ b/docs/tips/design.md
@@ -1,82 +1,112 @@
Hello! This page contains some tips on how to create cool designs with Basalt
-To understand this page, it is recommended to familiarize yourself with [Animations](../objects/Animation.md) as animations are important for creating complex designs
+To understand this page, it is recommended to familiarize yourself with [Animations](../objects/Animation.md) as animations are important for creating cool looking designs
-Let us begin with simple things:
-
-## Recolor objects
-
-Let's create a Button:
+## Animation-move
+Here i will show you how you can move objects by using the animation object.
```lua
-local basalt = require("Basalt")
-local mainFrame = basalt.createFrame():setBackground(colors.black):show()
-local aButton = mainFrame:addButton():setSize(10, 3):setText("Beautiful"):setBackground(colors.gray):show()
-```
+local basalt = require("basalt")
-Here lets make use of the event system:
-```lua
-local function changeButtonColor(self,event,typ,x,y)
- if(event=="mouse_click")then
- self:setBackground(colors.lightGray)
- end
- if(event=="mouse_up")then
- self:setBackground(colors.gray)
- end
-end
+local main = basalt.createFrame()
+local sub = main:addFrame():setSize("parent.w - 2",12):setPosition("-parent.w",4)
+ sub:addLabel()
+ :setText("Cool Title")
+ :setBackground(colors.black)
+ :setForeground(colors.lightGray)
+ :setSize("parent.w", 1)
-local function buttonLogic()
- -- here you can do some logic when button gets the mouse_up event
-end
+local button = sub:addButton()
+ :setBackground(colors.black)
+ :setForeground(colors.lightGray)
+ :setPosition(-12,9)
+local button2 = sub:addButton()
+ :setBackground(colors.black)
+ :setForeground(colors.lightGray)
+ :setPosition("parent.w + 12",9)
-aButton:onClick(changeButtonColor) -- button color change on click
-aButton:onClickUp(changeButtonColor) -- button color change on click up
-aButton:onClickUp(buttonLogic) -- button logic on click up
-aButton:onLoseFocus(function(self) self:setBackground(colors.gray) end) -- if user is clicking on the button and dragging out of button size this event will change the bg color back to gray
-```
+local anim = main:addAnimation()
+ :setObject(sub)
+ :move(2,4,1.5)
+ :setObject(button)
+ :move(2,9,1,1.5):
+ setObject(button2)
+ :move(sub:getWidth()-12,9,1,1.5)
+ :play()
-## Fade In/Out Objects
-instead of recoloring we are also able to slowly reposition the button, something like fade in:
-```lua
-local buttonAnimation = mainFrame:addAnimation()
-local function fadeButtonIn(btn)
- if(btn.x < 5)then
- btn:setPosition(1,0,"r")
- else
- buttonAnimation:cancel() -- here you cancel the loop
- end
-end
-
-buttonAnimation:wait(0.1):add(function() fadeButtonIn(aButton) end):play(true) -- with play(true) you will create a infinite loop
-```
-This is also possible with entire frames and its children objects. So keep that in mind if you want to create something like a bigger panel to the right or a menu bar
-
-## How To use XML
-Here is a example on how to create a cool looking frame by using xml:
-```xml
-
-
-
-
-
-
-
-
-
-
-
-
- This is line 1.
- And this is line 2.
-
-
-
-
-```
-in your lua code you just have to add this layout to your frame:
-```lua
-local basalt = require("Basalt")
-
-basalt.createFrame():addLayout("example.xml")
basalt.autoUpdate()
```
+
+As you can see, you only need 1 animation but you can still move 3 objects.
+
+## Animation-offset
+Here is a example which changes the offset on your base frame. It shows you, how you could create multiple pages and switch between them in a cool looking way:
+```lua
+local basalt = require("basalt")
+
+local main = basalt.createFrame()
+local mainAnim = main:addAnimation()
+
+local frames = {
+ main:addFrame():setPosition(1,2):setSize("parent.w", "parent.h-1"):setBackground(colors.lightGray),
+ main:addFrame():setPosition("parent.w+1",2):setSize("parent.w", "parent.h-1"):setBackground(colors.lightGray),
+ main:addFrame():setPosition("parent.w*2+1",2):setSize("parent.w", "parent.h-1"):setBackground(colors.lightGray),
+ main:addFrame():setPosition("parent.w*3+1",2):setSize("parent.w", "parent.h-1"):setBackground(colors.lightGray),
+}
+
+frames[1]:addLabel():setText("This is frame 1")
+frames[2]:addLabel():setText("This is frame 2")
+frames[3]:addLabel():setText("This is frame 3")
+frames[4]:addLabel():setText("This is frame 4")
+
+local menubar = main:addMenubar():ignoreOffset()
+ :addItem("Page 1",nil,nil,1)
+ :addItem("Page 2",nil,nil,2)
+ :addItem("Page 3",nil,nil,3)
+ :addItem("Page 4",nil,nil,4)
+ :setSpace(3)
+ :setSize("parent.w",1)
+ :onChange(function(self, value)
+ mainAnim:clear()
+ :cancel()
+ :setObject(main)
+ :offset(value.args[1] * main:getWidth() - main:getWidth(), 0, 2)
+ :play()
+ end)
+
+
+basalt.autoUpdate()
+```
+
+## Visually showing
+Here I'll show you how to visually show the user when something isn't working. this is just one example that you can apply to other topics as well.
+```lua
+local basalt = require("basalt")
+
+local password = "12345"
+
+local main = basalt.createFrame()
+
+main:addLabel():setText("Password:"):setPosition(2,2)
+local input = main:addInput():setInputType("password"):setPosition(2,3):setSize(24,1)
+local submit = main:addButton():setPosition(2,5):setText("Submit")
+submit:onClick(basalt.schedule(function()
+ if(password==input:getValue())then
+ basalt.debug("Password correct!")
+ else
+ basalt.debug("Wrong password!")
+ submit:setBackground(colors.red)
+ sleep(0.05)
+ submit:setPosition(3,5)
+ sleep(0.05)
+ submit:setPosition(2,5)
+ sleep(0.05)
+ submit:setPosition(1,5)
+ sleep(0.05)
+ submit:setPosition(2,5)
+ submit:setBackground(colors.gray)
+ end
+end))
+
+basalt.autoUpdate()
+```
\ No newline at end of file
diff --git a/docs/tips/events.md b/docs/tips/events.md
deleted file mode 100644
index b7c3814..0000000
--- a/docs/tips/events.md
+++ /dev/null
@@ -1,34 +0,0 @@
-
-## Short way of adding functions to events
-Not everyone knows that a function (or in other words a method) does not need to have a name. Instead of a function name you are also able to add the function itself as a argument.
-
-Both do the exact same thing:
-```lua
-local function clickButton()
- basalt.debug("I got clicked!")
-end
-button:onClick(clickButton)
-```
-
-```lua
-button:onClick(function()
- basalt.debug("I got clicked!")
-end)
-```
-
-## Using isKeyDown for shortcuts
-there is also a function with which you can check if the user is holding a key down, it is called `basalt.isKeyDown()`. It's especially useful for click events.
-Let us say you want a button to execute something, but if you are holding ctrl down, something in the execution should get changed. This is how you would
-achieve that:
-
-```lua
-button:onClick(function()
- if(basalt.isKeyDown(keys.leftCtrl)then
- basalt.debug("Ctrl is down!")
- else
- basalt.debug("Ctrl is up!")
- end
-end)
-```
-
-Make sure to always use the available `keys` table: https://computercraft.info/wiki/Keys_(API)
diff --git a/docs/tips/logic.md b/docs/tips/logic.md
index 96ba24b..909031c 100644
--- a/docs/tips/logic.md
+++ b/docs/tips/logic.md
@@ -1,56 +1,70 @@
You question yourself how you can execute your own logic while basalt is also active? There are multiple ways of doing that:
-## Method 1:
-Using parallel.waitForAll
+## Parallel
+Using parallel.waitForAll or parallel.waitForAny
```lua
-local basalt = dofile("basalt.lua")
+local basalt = require("basalt")
-local mainFrame = basalt.createFrame("mainFrame"):show()-- lets create a frame and a button without functionality
-mainFrame:addButton("aButton"):onClick(function() end):show()
+local main = basalt.createFrame() -- we need a base frame
+main:addButton() -- just a button
+ :onClick(function()
+ basalt.debug("Button got clicked")
+ end)
local function yourCustomHandler()
while true do
-- add your logic here
- os.sleep(1) -- you need something which calls coroutine.yield(), yes os.sleep does that os.pullEvent() aswell
+ os.sleep(1) -- you need something which calls coroutine.yield(), yes os.sleep() does that and os.pullEvent() too
end
end
-parallel.waitForAll(basalt.autoUpdate, yourCustomHandler) -- here it will handle your function (yourCustomHandler) and basalts handlers at the time
+parallel.waitForAll(basalt.autoUpdate, yourCustomHandler) -- here it will handle your function (yourCustomHandler) and basalt's handlers at the same time using parallel's API
```
-You can read [here (tweaked.cc)](https://tweaked.cc/module/parallel.html) what exactly parallel.waitForAll() does
+[Here (tweaked.cc)](https://tweaked.cc/module/parallel.html) you can find out more about the parallel API.
-## Method 2:
-Using threads
+## Threads
+Using basalt's thread implementation.
```lua
-local basalt = dofile("basalt.lua")
+local basalt = require("basalt")
-local mainFrame = basalt.createFrame("mainFrame"):show()-- lets create a frame, a button without functionality and a thread
-mainFrame:addButton("aButton"):onClick(function() end):show()
-local thread = mainFrame:addThread("customHandlerExecutingThread")
+local main = basalt.createFrame() -- we need a base frame
+main:addButton() -- just a button
+ :onClick(function()
+ basalt.debug("Button got clicked")
+ end)
+
+local thread = mainFrame:addThread() -- here we create a thread
local function yourCustomHandler()
while true do
-- add your logic here
- os.sleep(1) -- you need something which calls coroutine.yield(), yes os.sleep does that os.pullEvent() aswell
+ os.sleep(1) -- you need something which calls coroutine.yield(), yes os.sleep() does that and os.pullEvent() too
end
end
-thread:start(yourCustomHandler) -- this will create a coroutine and starts the coroutine, os.sleep does the rest, so you just have to call start once.
+thread:start(yourCustomHandler) -- here we start the thread and pass the function which you want to run.
```
-## Method 3:
-Using timers
+## Timers
+Using basalt's implementation of timers.
+Remember, timers don't run asynchronly which means if you're using sleep somewhere this will freeze basalt's event system too.
```lua
-local basalt = dofile("basalt.lua")
+local basalt = require("basalt")
-local mainFrame = basalt.createFrame("mainFrame"):show()-- lets create a frame, a button without functionality and a timer
-mainFrame:addButton("aButton"):onClick(function() end):show()
-local timer = mainFrame:addTimer("customHandlerExecutingTimer")
+local main = basalt.createFrame() -- we need a base frame
+main:addButton() -- just a button
+ :onClick(function()
+ basalt.debug("Button got clicked")
+ end)
+
+local timer = mainFrame:addTimer() -- here we will create the timer object
local function yourCustomHandler()
-- add your logic here
end
-timer:onCall(yourCustomHandler):setTime(1, -1):start() -- this will call your function every second until you :cancel() the timer
+timer:onCall(yourCustomHandler)
+ :setTime(1, -1)
+ :start() -- this will call your function every second until you :cancel() the timer
```
\ No newline at end of file