updated param and return headers
This commit is contained in:
@@ -9,8 +9,8 @@ Sets the displayed button text
|
||||
local mainFrame = basalt.createFrame("myFirstFrame"):show()
|
||||
local aButton = mainFrame:addButton("myFirstButton"):setText("Click"):show() -- you could also use :setValue() instead of :setText() - no difference
|
||||
```
|
||||
**Arguments:** string text<br>
|
||||
**returns:** self<br>
|
||||
#### Parameters: string text<br>
|
||||
#### Returns: self<br>
|
||||
|
||||
# Examples
|
||||
Add a onClick event:
|
||||
|
||||
@@ -20,8 +20,8 @@ aDropdown:addItem("1. Entry")
|
||||
aDropdown:addItem("2. Entry",colors.yellow)
|
||||
aDropdown:addItem("3. Entry",colors.yellow,colors.green)
|
||||
```
|
||||
**parameters:** string text, number bgcolor, number fgcolor, any ... - (text is the displayed text, bgcolor and fgcolors the colors of background/text and args (...) is something dynamic, you wont see them but if you require some more information per item you can use that)<br>
|
||||
**returns:** self<br>
|
||||
#### Parameters: string text, number bgcolor, number fgcolor, any ... - (text is the displayed text, bgcolor and fgcolors the colors of background/text and args (...) is something dynamic, you wont see them but if you require some more information per item you can use that)<br>
|
||||
#### Returns: self<br>
|
||||
|
||||
## removeItem
|
||||
Removes a item from the dropdown
|
||||
@@ -34,8 +34,8 @@ aDropdown:addItem("2. Entry",colors.yellow)
|
||||
aDropdown:addItem("3. Entry",colors.yellow,colors.green)
|
||||
aDropdown:removeItem(2)
|
||||
```
|
||||
**parameters:** number index<br>
|
||||
**returns:** self<br>
|
||||
#### Parameters: number index<br>
|
||||
#### Returns: self<br>
|
||||
|
||||
## editItem
|
||||
Edits a item on the dropdown
|
||||
@@ -48,8 +48,8 @@ aDropdown:addItem("2. Entry",colors.yellow)
|
||||
aDropdown:addItem("3. Entry",colors.yellow,colors.green)
|
||||
aDropdown:editItem(3,"3. Edited Entry",colors.yellow,colors.green)
|
||||
```
|
||||
**parameters:** number index, string text, number bgcolor, number fgcolor, any ...<br>
|
||||
**returns:** self<br>
|
||||
#### Parameters: number index, string text, number bgcolor, number fgcolor, any ...<br>
|
||||
#### Returns: self<br>
|
||||
|
||||
## setScrollable
|
||||
Makes the dropdown scrollable
|
||||
@@ -62,8 +62,8 @@ aDropdown:addItem("2. Entry",colors.yellow)
|
||||
aDropdown:addItem("3. Entry",colors.yellow,colors.green)
|
||||
aDropdown:setScrollable(true)
|
||||
```
|
||||
**parameters:** boolean isScrollable<br>
|
||||
**returns:** self<br>
|
||||
#### Parameters: boolean isScrollable<br>
|
||||
#### Returns: self<br>
|
||||
|
||||
## selectItem
|
||||
selects a item in the dropdown (same as a player would click on a item)
|
||||
@@ -76,8 +76,8 @@ aDropdown:addItem("2. Entry",colors.yellow)
|
||||
aDropdown:addItem("3. Entry",colors.yellow,colors.green)
|
||||
aDropdown:selectItem(1)
|
||||
```
|
||||
**parameters:** number index<br>
|
||||
**returns:** self<br>
|
||||
#### Parameters: number index<br>
|
||||
#### Returns: self<br>
|
||||
|
||||
## clear
|
||||
clears the entire list (dropdown)
|
||||
@@ -90,8 +90,8 @@ aDropdown:addItem("2. Entry",colors.yellow)
|
||||
aDropdown:addItem("3. Entry",colors.yellow,colors.green)
|
||||
aDropdown:clear()
|
||||
```
|
||||
**parameters:** -<br>
|
||||
**returns:** self<br>
|
||||
#### Parameters: -<br>
|
||||
#### Returns: self<br>
|
||||
|
||||
## getItemIndex
|
||||
returns the item index of the currently selected item
|
||||
@@ -104,8 +104,8 @@ aDropdown:addItem("2. Entry",colors.yellow)
|
||||
aDropdown:addItem("3. Entry",colors.yellow,colors.green)
|
||||
aDropdown:getItemIndex()
|
||||
```
|
||||
**parameters:** -<br>
|
||||
**returns:** number index<br>
|
||||
#### Parameters: -<br>
|
||||
#### Returns: number index<br>
|
||||
|
||||
## setSelectedItem
|
||||
Sets the background of the item which is currently selected
|
||||
@@ -118,8 +118,8 @@ aDropdown:addItem("2. Entry",colors.yellow)
|
||||
aDropdown:addItem("3. Entry",colors.yellow,colors.green)
|
||||
aDropdown:setSelectedItem(colors.green, colors.blue)
|
||||
```
|
||||
**parameters:** number bgcolor, number fgcolor, boolean isActive (isActive means if different colors for selected item should be used)<br>
|
||||
**returns:** self<br>
|
||||
#### Parameters: number bgcolor, number fgcolor, boolean isActive (isActive means if different colors for selected item should be used)<br>
|
||||
#### Returns: self<br>
|
||||
|
||||
## setOffset
|
||||
sets the dropdown offset (will automatically change if scrolling is active)
|
||||
@@ -132,8 +132,8 @@ aDropdown:addItem("2. Entry",colors.yellow)
|
||||
aDropdown:addItem("3. Entry",colors.yellow,colors.green)
|
||||
aDropdown:setOffset(3)
|
||||
```
|
||||
**parameters:** number offsetValue<br>
|
||||
**returns:** self<br>
|
||||
#### Parameters: number offsetValue<br>
|
||||
#### Returns: self<br>
|
||||
|
||||
## getOffset
|
||||
returns the current offset
|
||||
@@ -146,8 +146,8 @@ aDropdown:addItem("2. Entry",colors.yellow)
|
||||
aDropdown:addItem("3. Entry",colors.yellow,colors.green)
|
||||
aDropdown:getOffset()
|
||||
```
|
||||
**parameters:** -<br>
|
||||
**returns:** number offsetValue<br>
|
||||
#### Parameters: -<br>
|
||||
#### Returns: number offsetValue<br>
|
||||
|
||||
## getOffset
|
||||
returns the current offset
|
||||
@@ -160,8 +160,8 @@ aDropdown:addItem("2. Entry",colors.yellow)
|
||||
aDropdown:addItem("3. Entry",colors.yellow,colors.green)
|
||||
aDropdown:getOffset()
|
||||
```
|
||||
**parameters:** -<br>
|
||||
**returns:** number offsetValue<br>
|
||||
#### Parameters: -<br>
|
||||
#### Returns: number offsetValue<br>
|
||||
|
||||
## setDropdownSize
|
||||
sets the dropdown size (if you click on the button)
|
||||
@@ -174,5 +174,5 @@ aDropdown:addItem("2. Entry",colors.yellow)
|
||||
aDropdown:addItem("3. Entry",colors.yellow,colors.green)
|
||||
aDropdown:setDropdownSize(12, 4)
|
||||
```
|
||||
**parameters:** number width, number height<br>
|
||||
**returns:** self<br>
|
||||
#### Parameters: number width, number height<br>
|
||||
#### Returns: self<br>
|
||||
@@ -11,8 +11,8 @@ loads a image into the memory.
|
||||
local mainFrame = basalt.createFrame("myFirstFrame"):show()
|
||||
local aImage = mainFrame:addImage("myFirstImage"):loadImage("randomImage.nfp"):show()
|
||||
```
|
||||
**Arguments:** string path<br>
|
||||
**returns:** self<br>
|
||||
#### Parameters: string path<br>
|
||||
#### Returns: self<br>
|
||||
|
||||
|
||||
## loadBlittleImage -- not finished yet
|
||||
@@ -21,8 +21,8 @@ loads a blittle image into the memory.
|
||||
local mainFrame = basalt.createFrame("myFirstFrame"):show()
|
||||
local aImage = mainFrame:addImage("myFirstImage"):loadBlittleImage("blittleImage.blt"):show()
|
||||
```
|
||||
**Arguments:** string path<br>
|
||||
**returns:** self<br>
|
||||
#### Parameters: string path<br>
|
||||
#### Returns: self<br>
|
||||
|
||||
## shrink
|
||||
If you were loading a normal (paint) image into the memory, this function would shrink it to a
|
||||
@@ -31,6 +31,6 @@ blittle image and immediatly draws it (if it's visible)
|
||||
local mainFrame = basalt.createFrame("myFirstFrame"):show()
|
||||
local aImage = mainFrame:addImage("myFirstImage"):loadBlittleImage("randomImage.nfp"):shrink():show()
|
||||
```
|
||||
**Arguments:** -<br>
|
||||
**returns:** self<br>
|
||||
#### Parameters: -<br>
|
||||
#### Returns: self<br>
|
||||
|
||||
|
||||
@@ -9,5 +9,5 @@ changes the input type
|
||||
local mainFrame = basalt.createFrame("myFirstFrame"):show()
|
||||
local aInput = mainFrame:addInput("myFirstInput"):setInputType("password"):show()
|
||||
```
|
||||
**parameters:** string value ("text", "password", "number")<br>
|
||||
**returns:** self<br>
|
||||
#### Parameters: string value ("text", "password", "number")<br>
|
||||
#### Returns: self<br>
|
||||
|
||||
@@ -11,8 +11,8 @@ sets the text which gets displayed.
|
||||
local mainFrame = basalt.createFrame("myFirstFrame"):show()
|
||||
local aInput = mainFrame:addLabel("myFirstLabel"):setText("Hello lovely basalt community!"):show()
|
||||
```
|
||||
**arguments:** string text<br>
|
||||
**returns:** self<br>
|
||||
#### Parameters: string text<br>
|
||||
#### Returns: self<br>
|
||||
|
||||
## setFontSize
|
||||
sets the font size of that text.
|
||||
@@ -20,8 +20,8 @@ sets the font size of that text.
|
||||
local mainFrame = basalt.createFrame("myFirstFrame"):show()
|
||||
local aInput = mainFrame:addLabel("myFirstLabel"):setText("Hello"):setFontSize(2):show()
|
||||
```
|
||||
**arguments:** number size (1 = default, 2 = big, 3 = bigger, 4 = huge)<br>
|
||||
**returns:** self<br>
|
||||
#### Parameters: number size (1 = default, 2 = big, 3 = bigger, 4 = huge)<br>
|
||||
#### Returns: self<br>
|
||||
|
||||
## getFontSize
|
||||
returns the fontsize
|
||||
@@ -30,5 +30,5 @@ local mainFrame = basalt.createFrame("myFirstFrame"):show()
|
||||
local aInput = mainFrame:addLabel("myFirstLabel"):setText("Hello"):setFontSize(2):show()
|
||||
basalt.debug(aInput:getFontSize()) -- returns 2
|
||||
```
|
||||
**arguments:** <br>
|
||||
**returns:** number<br>
|
||||
#### Parameters: <br>
|
||||
#### Returns: number<br>
|
||||
|
||||
@@ -21,8 +21,8 @@ aList:addItem("1. Entry")
|
||||
aList:addItem("2. Entry",colors.yellow)
|
||||
aList:addItem("3. Entry",colors.yellow,colors.green)
|
||||
```
|
||||
**parameters:** string text, number bgcolor, number fgcolor, any ... - (text is the displayed text, bgcolor and fgcolors the colors of background/text and args (...) is something dynamic, you wont see them but if you require some more information per item you can use that)<br>
|
||||
**returns:** self<br>
|
||||
#### Parameters: string text, number bgcolor, number fgcolor, any ... - (text is the displayed text, bgcolor and fgcolors the colors of background/text and args (...) is something dynamic, you wont see them but if you require some more information per item you can use that)<br>
|
||||
#### Returns: self<br>
|
||||
|
||||
## removeItem
|
||||
Removes a item from the list
|
||||
@@ -35,8 +35,8 @@ aList:addItem("2. Entry",colors.yellow)
|
||||
aList:addItem("3. Entry",colors.yellow,colors.green)
|
||||
aList:removeItem(2)
|
||||
```
|
||||
**parameters:** number index<br>
|
||||
**returns:** self<br>
|
||||
#### Parameters: number index<br>
|
||||
#### Returns: self<br>
|
||||
|
||||
## editItem
|
||||
Edits a item on the list
|
||||
@@ -49,8 +49,8 @@ aList:addItem("2. Entry",colors.yellow)
|
||||
aList:addItem("3. Entry",colors.yellow,colors.green)
|
||||
aList:editItem(3,"3. Edited Entry",colors.yellow,colors.green)
|
||||
```
|
||||
**parameters:** number index, string text, number bgcolor, number fgcolor, any ...<br>
|
||||
**returns:** self<br>
|
||||
#### Parameters: number index, string text, number bgcolor, number fgcolor, any ...<br>
|
||||
#### Returns: self<br>
|
||||
|
||||
## setScrollable
|
||||
Makes the list scrollable
|
||||
@@ -63,8 +63,8 @@ aList:addItem("2. Entry",colors.yellow)
|
||||
aList:addItem("3. Entry",colors.yellow,colors.green)
|
||||
aList:setScrollable(true)
|
||||
```
|
||||
**parameters:** boolean isScrollable<br>
|
||||
**returns:** self<br>
|
||||
#### Parameters: boolean isScrollable<br>
|
||||
#### Returns: self<br>
|
||||
|
||||
## selectItem
|
||||
selects a item in the list (same as a player would click on a item)
|
||||
@@ -77,8 +77,8 @@ aList:addItem("2. Entry",colors.yellow)
|
||||
aList:addItem("3. Entry",colors.yellow,colors.green)
|
||||
aList:selectItem(1)
|
||||
```
|
||||
**parameters:** number index<br>
|
||||
**returns:** self<br>
|
||||
#### Parameters: number index<br>
|
||||
#### Returns: self<br>
|
||||
|
||||
## clear
|
||||
clears the entire list
|
||||
@@ -91,8 +91,8 @@ aDropdown:addItem("2. Entry",colors.yellow)
|
||||
aDropdown:addItem("3. Entry",colors.yellow,colors.green)
|
||||
aDropdown:clear()
|
||||
```
|
||||
**parameters:** -<br>
|
||||
**returns:** self<br>
|
||||
#### Parameters: -<br>
|
||||
#### Returns: self<br>
|
||||
|
||||
## getItemIndex
|
||||
returns the item index of the currently selected item
|
||||
@@ -105,8 +105,8 @@ aDropdown:addItem("2. Entry",colors.yellow)
|
||||
aDropdown:addItem("3. Entry",colors.yellow,colors.green)
|
||||
aDropdown:getItemIndex()
|
||||
```
|
||||
**parameters:** -<br>
|
||||
**returns:** number index<br>
|
||||
#### Parameters: -<br>
|
||||
#### Returns: number index<br>
|
||||
|
||||
## setSelectedItem
|
||||
Sets the background of the item which is currently selected
|
||||
@@ -119,8 +119,8 @@ aList:addItem("2. Entry",colors.yellow)
|
||||
aList:addItem("3. Entry",colors.yellow,colors.green)
|
||||
aList:setSelectedItem(colors.green, colors.blue)
|
||||
```
|
||||
**parameters:** number bgcolor, number fgcolor, boolean isActive (isActive means if different colors for selected item should be used)<br>
|
||||
**returns:** self<br>
|
||||
#### Parameters: number bgcolor, number fgcolor, boolean isActive (isActive means if different colors for selected item should be used)<br>
|
||||
#### Returns: self<br>
|
||||
|
||||
## setOffset
|
||||
sets the list offset (will automatically change if scrolling is active)
|
||||
@@ -133,8 +133,8 @@ aList:addItem("2. Entry",colors.yellow)
|
||||
aList:addItem("3. Entry",colors.yellow,colors.green)
|
||||
aList:setOffset(3)
|
||||
```
|
||||
**parameters:** number offsetValue<br>
|
||||
**returns:** self<br>
|
||||
#### Parameters: number offsetValue<br>
|
||||
#### Returns: self<br>
|
||||
|
||||
## getOffset
|
||||
returns the current offset
|
||||
@@ -147,5 +147,5 @@ aList:addItem("2. Entry",colors.yellow)
|
||||
aList:addItem("3. Entry",colors.yellow,colors.green)
|
||||
aList:getOffset()
|
||||
```
|
||||
**parameters:** -<br>
|
||||
**returns:** number offsetValue<br>
|
||||
#### Parameters: -<br>
|
||||
#### Returns: number offsetValue<br>
|
||||
@@ -7,8 +7,8 @@ local mainFrame = basalt.createFrame("myFirstFrame"):show()
|
||||
local button = mainFrame:addButton("myFirstButton")
|
||||
button:show()
|
||||
```
|
||||
**parameters:** -<br>
|
||||
**returns:** self<br>
|
||||
#### Parameters: -<br>
|
||||
#### Returns: self<br>
|
||||
|
||||
## hide
|
||||
hides the object
|
||||
@@ -17,16 +17,16 @@ local mainFrame = basalt.createFrame("myFirstFrame"):show()
|
||||
local button = mainFrame:addButton("myFirstButton"):setText("Close"):onClick(function() mainFrame:hide() end)
|
||||
button:show()
|
||||
```
|
||||
**parameters:** -<br>
|
||||
**returns:** self<br>
|
||||
#### Parameters: -<br>
|
||||
#### Returns: self<br>
|
||||
|
||||
## setPosition
|
||||
Changes the position relative to its parent frame
|
||||
```lua
|
||||
local mainFrame = basalt.createFrame("myFirstFrame"):setPosition(2,3)
|
||||
```
|
||||
**parameters:** number x, number y[, boolean relative], if relative is set to true it will add/remove instead of set x, y<br>
|
||||
**returns:** self<br>
|
||||
#### Parameters: number x, number y[, boolean relative], if relative is set to true it will add/remove instead of set x, y<br>
|
||||
#### Returns: self<br>
|
||||
|
||||
|
||||
|
||||
@@ -35,24 +35,24 @@ Changes the object background color
|
||||
```lua
|
||||
local mainFrame = basalt.createFrame("myFirstFrame"):setBackground(colors.lightGray)
|
||||
```
|
||||
**parameters:** number color<br>
|
||||
**returns:** self<br>
|
||||
#### Parameters: number color<br>
|
||||
#### Returns: self<br>
|
||||
|
||||
## setForeground
|
||||
Changes the object text color
|
||||
```lua
|
||||
local mainFrame = basalt.createFrame("myFirstFrame"):setForeground(colors.black)
|
||||
```
|
||||
**parameters:** number color<br>
|
||||
**returns:** self<br>
|
||||
#### Parameters: number color<br>
|
||||
#### Returns: self<br>
|
||||
|
||||
## setSize
|
||||
Changes the object size
|
||||
```lua
|
||||
local mainFrame = basalt.createFrame("myFirstFrame"):setSize(15,5)
|
||||
```
|
||||
**parameters:** number width, number length<br>
|
||||
**returns:** self<br>
|
||||
#### Parameters: number width, number length<br>
|
||||
#### Returns: self<br>
|
||||
|
||||
## setFocus
|
||||
sets the object to be the focused object.
|
||||
@@ -62,8 +62,8 @@ the foreground, you have to use :setFocus()
|
||||
local mainFrame = basalt.createFrame("myFirstFrame"):show()
|
||||
local aButton = mainFrame:addButton("myFirstButton"):setFocus():show()
|
||||
```
|
||||
**parameters:** -<br>
|
||||
**returns:** self<br>
|
||||
#### Parameters: -<br>
|
||||
#### Returns: self<br>
|
||||
|
||||
## setZIndex
|
||||
changes the z index (higher z index do have higher draw/event priority) 10 is more important than 5 or 1. You are also able to add multiple objects to the same z index, which means if you create a couple of buttons, you set their z index to 10, everything below 10 is less important, everything above 10 is more important. On the same z index: the last object which gets created is the most important one.
|
||||
@@ -71,8 +71,8 @@ changes the z index (higher z index do have higher draw/event priority) 10 is mo
|
||||
local mainFrame = basalt.createFrame("myFirstFrame"):show()
|
||||
local aButton = mainFrame:addButton("myFirstButton"):setZIndex(1):show()
|
||||
```
|
||||
**parameters:** number index<br>
|
||||
**returns:** self<br>
|
||||
#### Parameters: number index<br>
|
||||
#### Returns: self<br>
|
||||
|
||||
## setParent
|
||||
changes the frame parent of that object
|
||||
@@ -81,8 +81,8 @@ local mainFrame = basalt.createFrame("myFirstFrame"):show()
|
||||
local aRandomFrame = basalt.createFrame("aRandomFrame"):show()
|
||||
local aButton = mainFrame:addButton("myFirstButton"):onClick(function() aRandomFrame:setParent(mainFrame) end):show()
|
||||
```
|
||||
**parameters:** frame object<br>
|
||||
**returns:** self<br>
|
||||
#### Parameters: frame object<br>
|
||||
#### Returns: self<br>
|
||||
|
||||
## isFocused
|
||||
returns if the object is currently the focused object of the parent frame
|
||||
@@ -92,8 +92,8 @@ local mainFrame = basalt.createFrame("myFirstFrame"):show()
|
||||
local aButton = mainFrame:addButton("myFirstButton"):show()
|
||||
basalt.debug(aButton:isFocused()) -- shows true or false as a debug message
|
||||
```
|
||||
**parameters:** -<br>
|
||||
**returns:** boolean<br>
|
||||
#### Parameters: -<br>
|
||||
#### Returns: boolean<br>
|
||||
|
||||
## getAnchorPosition
|
||||
converts the x,y coordinates into the anchor coordinates of that object
|
||||
@@ -103,8 +103,8 @@ local mainFrame = basalt.createFrame("myFirstFrame"):setSize(15,15):show()
|
||||
local aButton = mainFrame:addButton("myFirstButton"):setAnchor("right","bottom"):setSize(8,1):setPosition(1,1):show()
|
||||
basalt.debug(aButton:getAnchorPosition()) -- returns 7,14 (framesize - own size) instead of 1,1
|
||||
```
|
||||
**parameters:** number x, number y - or nothing (if nothing it uses the object's x, y)<br>
|
||||
**returns:** number x, number y (converted)<br>
|
||||
#### Parameters: number x, number y - or nothing (if nothing it uses the object's x, y)<br>
|
||||
#### Returns: number x, number y (converted)<br>
|
||||
|
||||
## setAnchor
|
||||
sets the anchor of that object
|
||||
@@ -113,8 +113,8 @@ sets the anchor of that object
|
||||
local mainFrame = basalt.createFrame("myFirstFrame"):setAnchor("right"):show()
|
||||
local aButton = mainFrame:addButton("myFirstButton"):setAnchor("bottom","right"):setSize(8,1):setPosition(1,1):show()
|
||||
```
|
||||
**parameters:** string sides - ("left", "right", "top", "bottom") you can stack positions like so ..:setAnchor("right", "bottom")<br>
|
||||
**returns:** self<br>
|
||||
#### Parameters: string sides - ("left", "right", "top", "bottom") you can stack positions like so ..:setAnchor("right", "bottom")<br>
|
||||
#### Returns: self<br>
|
||||
|
||||
## getAbsolutePosition
|
||||
converts the relative coordinates into absolute coordinates
|
||||
@@ -123,8 +123,8 @@ local mainFrame = basalt.createFrame("myFirstFrame"):setPosition(3,3):show()
|
||||
local aButton = mainFrame:addButton("myFirstButton"):setSize(8,1):setPosition(4,2):show()
|
||||
basalt.debug(aButton:getAbsolutePosition()) -- returns 7,5 (frame coords + own coords) instead of 4,2
|
||||
```
|
||||
**parameters:** number x, number y - or nothing (if nothing it uses the object's x, y)<br>
|
||||
**returns:** self<br>
|
||||
#### Parameters: number x, number y - or nothing (if nothing it uses the object's x, y)<br>
|
||||
#### Returns: self<br>
|
||||
|
||||
## setTextAlign
|
||||
sets the text align of the object (for example buttons)
|
||||
@@ -132,8 +132,8 @@ sets the text align of the object (for example buttons)
|
||||
local mainFrame = basalt.createFrame("myFirstFrame"):show()
|
||||
local aButton = mainFrame:addButton("myFirstButton"):setSize(12,3):setTextAlign("right", "center"):setText("Dont't..."):show()
|
||||
```
|
||||
**parameters:** string horizontal, string vertical - ("left", "center", "right")<br>
|
||||
**returns:** self<br>
|
||||
#### Parameters: string horizontal, string vertical - ("left", "center", "right")<br>
|
||||
#### Returns: self<br>
|
||||
|
||||
## setValue
|
||||
sets the value of that object (input, label, checkbox, textfield, scrollbar,...)
|
||||
@@ -141,8 +141,8 @@ sets the value of that object (input, label, checkbox, textfield, scrollbar,...)
|
||||
local mainFrame = basalt.createFrame("myFirstFrame"):show()
|
||||
local aCheckbox = mainFrame:addCheckbox("myFirstCheckbox"):setValue(true):show()
|
||||
```
|
||||
**parameters:** any value<br>
|
||||
**returns:** self<br>
|
||||
#### Parameters: any value<br>
|
||||
#### Returns: self<br>
|
||||
|
||||
## getValue
|
||||
returns the currently saved value
|
||||
@@ -151,8 +151,8 @@ local mainFrame = basalt.createFrame("myFirstFrame"):show()
|
||||
local aCheckbox = mainFrame:addCheckbox("myFirstCheckbox"):setValue(true):show()
|
||||
basalt.debug(aCheckbox:getValue()) -- returns true
|
||||
```
|
||||
**parameters:**-<br>
|
||||
**returns:** any value<br>
|
||||
#### Parameters:-<br>
|
||||
#### Returns: any value<br>
|
||||
|
||||
## getHeight/getWidth
|
||||
returns the height or width
|
||||
@@ -161,8 +161,8 @@ local mainFrame = basalt.createFrame("myFirstFrame"):show()
|
||||
local aButton = mainFrame:addButton("myFirstButton"):setSize(5,8):show()
|
||||
basalt.debug(aButton:getHeight()) -- returns 8
|
||||
```
|
||||
**parameters:**-<br>
|
||||
**returns:** number height/width<br>
|
||||
#### Parameters:-<br>
|
||||
#### Returns: number height/width<br>
|
||||
|
||||
## isVisible
|
||||
returns if the object is currently visible
|
||||
@@ -171,8 +171,8 @@ local mainFrame = basalt.createFrame("myFirstFrame"):show()
|
||||
local aButton = mainFrame:addButton("myFirstButton"):setSize(5,8):show()
|
||||
basalt.debug(aButton:isVisible()) -- returns true
|
||||
```
|
||||
**parameters:**-<br>
|
||||
**returns:** boolean<br>
|
||||
#### Parameters:-<br>
|
||||
#### Returns: boolean<br>
|
||||
|
||||
## getName
|
||||
returns the given name of that object
|
||||
@@ -180,8 +180,8 @@ returns the given name of that object
|
||||
local mainFrame = basalt.createFrame("myFirstFrame"):show()
|
||||
basalt.debug(mainFrame:getName()) -- returns myFirstFrame
|
||||
```
|
||||
**parameters:**-<br>
|
||||
**returns:** string name<br>
|
||||
#### Parameters:-<br>
|
||||
#### Returns: string name<br>
|
||||
|
||||
# Object Events
|
||||
These object events are available for all objects, if a object got some unique events, you can see them in their own category
|
||||
@@ -192,8 +192,8 @@ creates a mouse_click event
|
||||
local mainFrame = basalt.createFrame("myFirstFrame"):show()
|
||||
local aButton = mainFrame:addButton("myFirstButton"):setSize(10,3):onClick(function(self,event,button,x,y) basalt.debug("Hellooww UwU") end):show()
|
||||
```
|
||||
**parameters:** function func<br>
|
||||
**returns:** self<br>
|
||||
#### Parameters: function func<br>
|
||||
#### Returns: self<br>
|
||||
|
||||
## onClickUp
|
||||
creates a click_up event
|
||||
@@ -201,8 +201,8 @@ creates a click_up event
|
||||
local mainFrame = basalt.createFrame("myFirstFrame"):show()
|
||||
local aButton = mainFrame:addButton("myFirstButton"):setSize(10,3):onClickUp(function(self,event,button,x,y) basalt.debug("Byeeeee UwU") end):show()
|
||||
```
|
||||
**parameters:** function func<br>
|
||||
**returns:** self<br>
|
||||
#### Parameters: function func<br>
|
||||
#### Returns: self<br>
|
||||
|
||||
## onMouseDrag
|
||||
creates a mouse_drag event
|
||||
@@ -210,8 +210,8 @@ creates a mouse_drag event
|
||||
local mainFrame = basalt.createFrame("myFirstFrame"):show()
|
||||
local aButton = mainFrame:addButton("myFirstButton"):setSize(10,3):onClickUp(function(self,event,button,x,y) basalt.debug("Byeeeee UwU") end):show()
|
||||
```
|
||||
**parameters:** function func<br>
|
||||
**returns:** self<br>
|
||||
#### Parameters: function func<br>
|
||||
#### Returns: self<br>
|
||||
|
||||
## onChange
|
||||
creates a change event (fires as soon as the value gets changed)
|
||||
@@ -219,29 +219,29 @@ creates a change event (fires as soon as the value gets changed)
|
||||
local mainFrame = basalt.createFrame("myFirstFrame"):show()
|
||||
local aCheckbox = mainFrame:addCheckbox("myFirstCheckbox"):onChange(function(self) basalt.debug("i got changed into "..self:getValue()) end):show()
|
||||
```
|
||||
**parameters:** function func<br>
|
||||
**returns:** self<br>
|
||||
#### Parameters: function func<br>
|
||||
#### Returns: self<br>
|
||||
|
||||
## onKey
|
||||
creates a key(board) - event can be key or char
|
||||
```lua
|
||||
local mainFrame = basalt.createFrame("myFirstFrame"):onKey(function(self,event,key) basalt.debug("you clicked "..key) end):show()
|
||||
```
|
||||
**parameters:** function func<br>
|
||||
**returns:** self<br>
|
||||
#### Parameters: function func<br>
|
||||
#### Returns: self<br>
|
||||
|
||||
## onLoseFocus
|
||||
creates a lose focus event
|
||||
```lua
|
||||
local mainFrame = basalt.createFrame("myFirstFrame"):onLoseFocus(function(self) basalt.debug("please come back..") end):show()
|
||||
```
|
||||
**parameters:** function func<br>
|
||||
**returns:** self<br>
|
||||
#### Parameters: function func<br>
|
||||
#### Returns: self<br>
|
||||
|
||||
## onGetFocus
|
||||
creates a get focus event
|
||||
```lua
|
||||
local mainFrame = basalt.createFrame("myFirstFrame"):onGetFocus(function(self) basalt.debug("thanks!") end):show()
|
||||
```
|
||||
**parameters:** function func<br>
|
||||
**returns:** self<br>
|
||||
#### Parameters: function func<br>
|
||||
#### Returns: self<br>
|
||||
@@ -10,8 +10,8 @@ local mainFrame = basalt.createFrame("myFirstFrame"):show()
|
||||
local aProgram = mainFrame:addProgram("myFirstProgram"):show()
|
||||
basalt.debug(aProgram:getStatus()) -- returns "running", "normal", "suspended" or "dead"
|
||||
```
|
||||
**parameters:**-<br>
|
||||
**returns:** string "running" - if its running, "normal" - is active but not running (waiting for a event), "suspended" - is suspended or not started, "dead" - has finished or stopped with an error<br>
|
||||
#### Parameters:-<br>
|
||||
#### Returns: string "running" - if its running, "normal" - is active but not running (waiting for a event), "suspended" - is suspended or not started, "dead" - has finished or stopped with an error<br>
|
||||
|
||||
## execute
|
||||
executes the given path (-program)
|
||||
@@ -20,8 +20,8 @@ local mainFrame = basalt.createFrame("myFirstFrame"):show()
|
||||
local aProgram = mainFrame:addProgram("myFirstProgram"):show()
|
||||
aProgram:execute("rom/programs/fun/worm.lua") -- executes worm
|
||||
```
|
||||
**parameters:** string filepath - (the path to the program you want to execute)<br>
|
||||
**returns:** self<br>
|
||||
#### Parameters: string filepath - (the path to the program you want to execute)<br>
|
||||
#### Returns: self<br>
|
||||
|
||||
## stop
|
||||
gives a terminate event to the program, which means if you are running a shell, and the shell executes a program by itself you have to call stop 2 times to entirely close the running program
|
||||
@@ -31,8 +31,8 @@ local aProgram = mainFrame:addProgram("myFirstProgram"):execute("rom/programs/sh
|
||||
mainFrame:addButton("myFirstButton"):setText("close"):onClick(function() aProgram:stop() end):show()
|
||||
|
||||
```
|
||||
**parameters:**-<br>
|
||||
**returns:** self<br>
|
||||
#### Parameters:-<br>
|
||||
#### Returns: self<br>
|
||||
|
||||
## pause
|
||||
pauses the program (prevents the program from receiving events)
|
||||
@@ -42,8 +42,8 @@ local aProgram = mainFrame:addProgram("myFirstProgram"):execute("rom/programs/sh
|
||||
mainFrame:addButton("myFirstButton"):setText("close"):onClick(function() aProgram:pause(true) end):show()
|
||||
|
||||
```
|
||||
**parameters:** boolean pause<br>
|
||||
**returns:** self<br>
|
||||
#### Parameters: boolean pause<br>
|
||||
#### Returns: self<br>
|
||||
|
||||
## isPaused
|
||||
returns if the program is currently paused
|
||||
@@ -53,8 +53,8 @@ local aProgram = mainFrame:addProgram("myFirstProgram"):execute("rom/programs/sh
|
||||
mainFrame:addButton("myFirstButton"):setText("pause"):onClick(function() basalt.debug(aProgram:isPaused()) end):show()
|
||||
|
||||
```
|
||||
**parameters:** -<br>
|
||||
**returns:** boolean isPaused<br>
|
||||
#### Parameters: -<br>
|
||||
#### Returns: boolean isPaused<br>
|
||||
|
||||
## injectEvent
|
||||
injects a event into the program manually
|
||||
@@ -64,8 +64,8 @@ local aProgram = mainFrame:addProgram("myFirstProgram"):execute("rom/programs/sh
|
||||
mainFrame:addButton("myFirstButton"):setText("inject"):onClick(function() aProgram:injectEvent("char", "w") end):show()
|
||||
|
||||
```
|
||||
**parameters:** string event, any parameter, any parameter, any parameter, any parameter, boolean ignorePause<br>
|
||||
**returns:** self<br>
|
||||
#### Parameters: string event, any parameter, any parameter, any parameter, any parameter, boolean ignorePause<br>
|
||||
#### Returns: self<br>
|
||||
|
||||
## injectEvents
|
||||
injects a event table into the program manually
|
||||
@@ -75,8 +75,8 @@ local aProgram = mainFrame:addProgram("myFirstProgram"):execute("rom/programs/sh
|
||||
--example will follow
|
||||
|
||||
```
|
||||
**parameters:** string event, any parameter, any parameter, any parameter, any parameter, boolean ignorePause<br>
|
||||
**returns:** self<br>
|
||||
#### Parameters: string event, any parameter, any parameter, any parameter, any parameter, boolean ignorePause<br>
|
||||
#### Returns: self<br>
|
||||
|
||||
## getQueuedEvents
|
||||
returns a table of all currently queued events (while pause is active incomming events will go into a queueEvents table) as soon as the program gets unpaused
|
||||
@@ -87,8 +87,8 @@ local aProgram = mainFrame:addProgram("myFirstProgram"):execute("rom/programs/sh
|
||||
mainFrame:addButton("myFirstButton"):setText("inject"):onClick(function() basalt.debug(aProgram:getQueuedEvents()) end):show()
|
||||
|
||||
```
|
||||
**parameters:** -<br>
|
||||
**returns:** table queuedEvents<br>
|
||||
#### Parameters: -<br>
|
||||
#### Returns: table queuedEvents<br>
|
||||
|
||||
## updateQueuedEvents
|
||||
here you can manipulate the queuedEvents table with your own events table
|
||||
@@ -98,6 +98,6 @@ local aProgram = mainFrame:addProgram("myFirstProgram"):execute("rom/programs/sh
|
||||
--example will follow
|
||||
|
||||
```
|
||||
**parameters:** table queuedEvents<br>
|
||||
**returns:** self<br>
|
||||
#### Parameters: table queuedEvents<br>
|
||||
#### Returns: self<br>
|
||||
|
||||
|
||||
@@ -20,8 +20,8 @@ aRadio:addItem("1. Entry",3,4)
|
||||
aRadio:addItem("2. Entry",3,5,colors.yellow)
|
||||
aRadio:addItem("3. Entry",3,6,colors.yellow,colors.green)
|
||||
```
|
||||
**parameters:** string text, number x, number y, number bgcolor, number fgcolor, any ... - (text is the displayed text, bgcolor and fgcolors the colors of background/text and args (...) is something dynamic, you wont see them but if you require some more information per item you can use that)<br>
|
||||
**returns:** self<br>
|
||||
#### Parameters: string text, number x, number y, number bgcolor, number fgcolor, any ... - (text is the displayed text, bgcolor and fgcolors the colors of background/text and args (...) is something dynamic, you wont see them but if you require some more information per item you can use that)<br>
|
||||
#### Returns: self<br>
|
||||
|
||||
## removeItem
|
||||
Removes a item from the radio
|
||||
@@ -34,8 +34,8 @@ aRadio:addItem("2. Entry",3,5,colors.yellow)
|
||||
aRadio:addItem("3. Entry",3,6,colors.yellow,colors.green)
|
||||
aRadio:removeItem(2)
|
||||
```
|
||||
**parameters:** number index<br>
|
||||
**returns:** self<br>
|
||||
#### Parameters: number index<br>
|
||||
#### Returns: self<br>
|
||||
|
||||
## editItem
|
||||
Edits a item on the radio
|
||||
@@ -48,8 +48,8 @@ aRadio:addItem("2. Entry",3,5,colors.yellow)
|
||||
aRadio:addItem("3. Entry",3,6,colors.yellow,colors.green)
|
||||
aRadio:editItem(3,"3. Edited Entry",3,6,colors.yellow,colors.green)
|
||||
```
|
||||
**parameters:** number index, string text, number x, number y, number bgcolor, number fgcolor, any ...<br>
|
||||
**returns:** self<br>
|
||||
#### Parameters: number index, string text, number x, number y, number bgcolor, number fgcolor, any ...<br>
|
||||
#### Returns: self<br>
|
||||
|
||||
## setScrollable
|
||||
Makes the radio scrollable
|
||||
@@ -62,8 +62,8 @@ aRadio:addItem("2. Entry",3,5,colors.yellow)
|
||||
aRadio:addItem("3. Entry",3,6,colors.yellow,colors.green)
|
||||
aRadio:setScrollable(true)
|
||||
```
|
||||
**parameters:** boolean isScrollable<br>
|
||||
**returns:** self<br>
|
||||
#### Parameters: boolean isScrollable<br>
|
||||
#### Returns: self<br>
|
||||
|
||||
## selectItem
|
||||
selects a item in the radio (same as a player would click on a item)
|
||||
@@ -76,8 +76,8 @@ aRadio:addItem("2. Entry",3,5,colors.yellow)
|
||||
aRadio:addItem("3. Entry",3,6,colors.yellow,colors.green)
|
||||
aRadio:selectItem(1)
|
||||
```
|
||||
**parameters:** number index<br>
|
||||
**returns:** self<br>
|
||||
#### Parameters: number index<br>
|
||||
#### Returns: self<br>
|
||||
|
||||
## clear
|
||||
clears the entire list (radio)
|
||||
@@ -90,8 +90,8 @@ aRadio:addItem("2. Entry",3,5,colors.yellow)
|
||||
aRadio:addItem("3. Entry",3,6,colors.yellow,colors.green)
|
||||
aRadio:clear()
|
||||
```
|
||||
**parameters:** -<br>
|
||||
**returns:** self<br>
|
||||
#### Parameters: -<br>
|
||||
#### Returns: self<br>
|
||||
|
||||
## getItemIndex
|
||||
returns the item index of the currently selected item
|
||||
@@ -104,8 +104,8 @@ aRadio:addItem("2. Entry",3,5,colors.yellow)
|
||||
aRadio:addItem("3. Entry",3,6,colors.yellow,colors.green)
|
||||
aRadio:getItemIndex()
|
||||
```
|
||||
**parameters:** -<br>
|
||||
**returns:** number index<br>
|
||||
#### Parameters: -<br>
|
||||
#### Returns: number index<br>
|
||||
|
||||
## setSelectedItem
|
||||
Sets the background of the item which is currently selected
|
||||
@@ -118,5 +118,5 @@ aRadio:addItem("2. Entry",3,5,colors.yellow)
|
||||
aRadio:addItem("3. Entry",3,6,colors.yellow,colors.green)
|
||||
aRadio:setSelectedItem(colors.green, colors.blue)
|
||||
```
|
||||
**parameters:** number bgcolor, number fgcolor, boolean isActive (isActive means if different colors for selected item should be used)<br>
|
||||
**returns:** self<br>
|
||||
#### Parameters: number bgcolor, number fgcolor, boolean isActive (isActive means if different colors for selected item should be used)<br>
|
||||
#### Returns: self<br>
|
||||
@@ -14,8 +14,8 @@ Changes the symbol
|
||||
local mainFrame = basalt.createFrame("myFirstFrame"):show()
|
||||
local aScrollbar = mainFrame:addScrollbar("myFirstScrollbar"):setSymbol("X"):show()
|
||||
```
|
||||
**parameters:** char symbol<br>
|
||||
**returns:** self<br>
|
||||
#### Parameters: char symbol<br>
|
||||
#### Returns: self<br>
|
||||
|
||||
## setBackgroundSymbol
|
||||
Changes the background symbol color
|
||||
@@ -24,8 +24,8 @@ Changes the background symbol color
|
||||
local mainFrame = basalt.createFrame("myFirstFrame"):show()
|
||||
local aScrollbar = mainFrame:addScrollbar("myFirstScrollbar"):setSymbol("X"):setBackgroundSymbol(colors.green):show()
|
||||
```
|
||||
**parameters:** number symbolcolor<br>
|
||||
**returns:** self<br>
|
||||
#### Parameters: number symbolcolor<br>
|
||||
#### Returns: self<br>
|
||||
|
||||
## setBarType
|
||||
If the bar goes vertically or horizontally
|
||||
@@ -34,8 +34,8 @@ If the bar goes vertically or horizontally
|
||||
local mainFrame = basalt.createFrame("myFirstFrame"):show()
|
||||
local aScrollbar = mainFrame:addScrollbar("myFirstScrollbar"):setBarType("horizontal"):show()
|
||||
```
|
||||
**parameters:** string value ("vertical" or "horizontal")<br>
|
||||
**returns:** self<br>
|
||||
#### Parameters: string value ("vertical" or "horizontal")<br>
|
||||
#### Returns: self<br>
|
||||
|
||||
## 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.
|
||||
@@ -44,5 +44,5 @@ the default max value is always the width (if horizontal) or height (if vertical
|
||||
local mainFrame = basalt.createFrame("myFirstFrame"):show()
|
||||
local aScrollbar = mainFrame:addScrollbar("myFirstScrollbar"):setMaxValue(123):show()
|
||||
```
|
||||
**parameters:** any number<br>
|
||||
**returns:** self<br>
|
||||
#### Parameters: any number<br>
|
||||
#### Returns: self<br>
|
||||
|
||||
@@ -9,8 +9,8 @@ this will change the foreground symbol
|
||||
local mainFrame = basalt.createFrame("myFirstFrame"):show()
|
||||
local aSlider = mainFrame:addSlider("myFirstSlider"):setSymbol("X"):show()
|
||||
```
|
||||
**parameters:** char symbol<br>
|
||||
**returns:** self<br>
|
||||
#### Parameters: char symbol<br>
|
||||
#### Returns: self<br>
|
||||
|
||||
## setBackgroundSymbol
|
||||
this will change the symbol background color
|
||||
@@ -18,8 +18,8 @@ this will change the symbol background color
|
||||
local mainFrame = basalt.createFrame("myFirstFrame"):show()
|
||||
local aSlider = mainFrame:addSlider("myFirstSlider"):setBackgroundSymbol(colors.yellow):show()
|
||||
```
|
||||
**parameters:** number color<br>
|
||||
**returns:** self<br>
|
||||
#### Parameters: number color<br>
|
||||
#### Returns: self<br>
|
||||
|
||||
## setSymbolColor
|
||||
this will change the symbol color
|
||||
@@ -27,8 +27,8 @@ this will change the symbol color
|
||||
local mainFrame = basalt.createFrame("myFirstFrame"):show()
|
||||
local aSlider = mainFrame:addSlider("myFirstSlider"):setSymbolColor(colors.red):show()
|
||||
```
|
||||
**parameters:** number color<br>
|
||||
**returns:** self<br>
|
||||
#### Parameters: number color<br>
|
||||
#### Returns: self<br>
|
||||
|
||||
## setBarType
|
||||
this will change the bar to vertical/horizontal (default is horizontal)
|
||||
@@ -36,7 +36,7 @@ this will change the bar to vertical/horizontal (default is horizontal)
|
||||
local mainFrame = basalt.createFrame("myFirstFrame"):show()
|
||||
local aSlider = mainFrame:addSlider("myFirstSlider"):setBarType("vertical"):show()
|
||||
```
|
||||
**parameters:** string value ("vertical", "horizontal"<br>
|
||||
**returns:** self<br>
|
||||
#### Parameters: string value ("vertical", "horizontal"<br>
|
||||
#### Returns: self<br>
|
||||
|
||||
|
||||
|
||||
@@ -18,8 +18,8 @@ local mainFrame = basalt.createFrame("myFirstFrame"):show()
|
||||
local aTextfield = mainFrame:addTextfield("myFirstTextfield"):show()
|
||||
basalt.debug(aTextfield:getLines())
|
||||
```
|
||||
**parameters:** -<br>
|
||||
**returns:** table lines<br>
|
||||
#### Parameters: -<br>
|
||||
#### Returns: table lines<br>
|
||||
|
||||
## getLine
|
||||
returns the line on index position
|
||||
@@ -28,8 +28,8 @@ local mainFrame = basalt.createFrame("myFirstFrame"):show()
|
||||
local aTextfield = mainFrame:addTextfield("myFirstTextfield"):show()
|
||||
basalt.debug(aTextfield:getLine(2))
|
||||
```
|
||||
**parameters:** number index<br>
|
||||
**returns:** string line<br>
|
||||
#### Parameters: number index<br>
|
||||
#### Returns: string line<br>
|
||||
|
||||
## editLine
|
||||
edits line on index position
|
||||
@@ -38,8 +38,8 @@ local mainFrame = basalt.createFrame("myFirstFrame"):show()
|
||||
local aTextfield = mainFrame:addTextfield("myFirstTextfield"):show()
|
||||
aTextfield:editLine(2, "hellow")
|
||||
```
|
||||
**parameters:** number index, string text<br>
|
||||
**returns:** self<br>
|
||||
#### Parameters: number index, string text<br>
|
||||
#### Returns: self<br>
|
||||
|
||||
## addLine
|
||||
adds a line on index position (if index is nil it just adds the line on the bottom)
|
||||
@@ -48,8 +48,8 @@ local mainFrame = basalt.createFrame("myFirstFrame"):show()
|
||||
local aTextfield = mainFrame:addTextfield("myFirstTextfield"):show()
|
||||
aTextfield:addLine("hellow")
|
||||
```
|
||||
**parameters:** string text, number index<br>
|
||||
**returns:** self<br>
|
||||
#### Parameters: string text, number index<br>
|
||||
#### Returns: self<br>
|
||||
|
||||
## removeLine
|
||||
removes the line on index position
|
||||
@@ -58,8 +58,8 @@ local mainFrame = basalt.createFrame("myFirstFrame"):show()
|
||||
local aTextfield = mainFrame:addTextfield("myFirstTextfield"):show()
|
||||
aTextfield:removeLine(1)
|
||||
```
|
||||
**parameters:** number index<br>
|
||||
**returns:** self<br>
|
||||
#### Parameters: number index<br>
|
||||
#### Returns: self<br>
|
||||
|
||||
## getTextCursor
|
||||
returns the cursor position
|
||||
@@ -68,5 +68,5 @@ local mainFrame = basalt.createFrame("myFirstFrame"):show()
|
||||
local aTextfield = mainFrame:addTextfield("myFirstTextfield"):show()
|
||||
basalt.debug(aTextfield:getTextCursor())
|
||||
```
|
||||
**parameters:** -<br>
|
||||
**returns:** number x, number y<br>
|
||||
#### Parameters: -<br>
|
||||
#### Returns: number x, number y<br>
|
||||
@@ -15,8 +15,8 @@ local function randomThreadFunction()
|
||||
end
|
||||
aThread:start(randomThreadfunction)
|
||||
```
|
||||
**parameters:**function func<br>
|
||||
**returns:** self<br>
|
||||
#### Parameters:function func<br>
|
||||
#### Returns: self<br>
|
||||
|
||||
## getStatus
|
||||
gets the thread status
|
||||
@@ -25,8 +25,8 @@ local mainFrame = basalt.createFrame("myFirstFrame"):show()
|
||||
local aThread = mainFrame:addThread("myFirstThread"):show()
|
||||
basalt.debug(aThread:getStatus()) -- returns "running", "normal", "suspended" or "dead"
|
||||
```
|
||||
**parameters:** -<br>
|
||||
**returns:** string "running" - if its running, "normal" - is active but not running (waiting for a event), "suspended" - is suspended<br>
|
||||
#### Parameters: -<br>
|
||||
#### Returns: string "running" - if its running, "normal" - is active but not running (waiting for a event), "suspended" - is suspended<br>
|
||||
|
||||
## stop
|
||||
stops the thread
|
||||
@@ -43,5 +43,5 @@ aThread:start(randomThreadfunction)
|
||||
local aButton = mainFrame:addButton("myFirstButton"):setText("Stop Thread"):onClick(function() aThread:stop() end):show()
|
||||
|
||||
```
|
||||
**parameters:** -<br>
|
||||
**returns:** self<br>
|
||||
#### Parameters: -<br>
|
||||
#### Returns: self<br>
|
||||
@@ -9,8 +9,8 @@ local mainFrame = basalt.createFrame("myFirstFrame"):show()
|
||||
local aTimer = mainFrame:addTimer("myFirstTimer")
|
||||
aTimer:setTime(5)
|
||||
```
|
||||
**parameters:**number time[, number repeats] - (time in seconds, if repeats is -1 it will call the function infinitly (every x seconds)<br>
|
||||
**returns:** self<br>
|
||||
#### Parameters:number time[, number repeats] - (time in seconds, if repeats is -1 it will call the function infinitly (every x seconds)<br>
|
||||
#### Returns: self<br>
|
||||
|
||||
## start
|
||||
starts the timer
|
||||
@@ -19,8 +19,8 @@ local mainFrame = basalt.createFrame("myFirstFrame"):show()
|
||||
local aTimer = mainFrame:addTimer("myFirstTimer")
|
||||
aTimer:setTime(5):start()
|
||||
```
|
||||
**parameters:** -<br>
|
||||
**returns:** self<br>
|
||||
#### Parameters: -<br>
|
||||
#### Returns: self<br>
|
||||
|
||||
## cancel
|
||||
stops/cancels the timer
|
||||
@@ -30,8 +30,8 @@ local aTimer = mainFrame:addTimer("myFirstTimer")
|
||||
aTimer:setTime(5):start()
|
||||
aTimer:cancel()
|
||||
```
|
||||
**parameters:** -<br>
|
||||
**returns:** self<br>
|
||||
#### Parameters: -<br>
|
||||
#### Returns: self<br>
|
||||
|
||||
|
||||
## onCall
|
||||
@@ -45,5 +45,5 @@ local aTimer = mainFrame:addTimer("myFirstTimer")
|
||||
aTimer:setTime(5):onCall(timerCall):start()
|
||||
|
||||
```
|
||||
**parameters:** function func<br>
|
||||
**returns:** self<br>
|
||||
#### Parameters: function func<br>
|
||||
#### Returns: self<br>
|
||||
|
||||
Reference in New Issue
Block a user