updated param and return headers

This commit is contained in:
Samuel Pizette
2022-06-09 11:43:59 -04:00
parent 4b8f3c2d5c
commit b6ee09636b
14 changed files with 188 additions and 188 deletions

View File

@@ -9,8 +9,8 @@ Sets the displayed button text
local mainFrame = basalt.createFrame("myFirstFrame"):show() local mainFrame = basalt.createFrame("myFirstFrame"):show()
local aButton = mainFrame:addButton("myFirstButton"):setText("Click"):show() -- you could also use :setValue() instead of :setText() - no difference local aButton = mainFrame:addButton("myFirstButton"):setText("Click"):show() -- you could also use :setValue() instead of :setText() - no difference
``` ```
**Arguments:** string text<br> #### Parameters: string text<br>
**returns:** self<br> #### Returns: self<br>
# Examples # Examples
Add a onClick event: Add a onClick event:

View File

@@ -20,8 +20,8 @@ aDropdown:addItem("1. Entry")
aDropdown:addItem("2. Entry",colors.yellow) aDropdown:addItem("2. Entry",colors.yellow)
aDropdown:addItem("3. Entry",colors.yellow,colors.green) 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> #### 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> #### Returns: self<br>
## removeItem ## removeItem
Removes a item from the dropdown 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:addItem("3. Entry",colors.yellow,colors.green)
aDropdown:removeItem(2) aDropdown:removeItem(2)
``` ```
**parameters:** number index<br> #### Parameters: number index<br>
**returns:** self<br> #### Returns: self<br>
## editItem ## editItem
Edits a item on the dropdown 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:addItem("3. Entry",colors.yellow,colors.green)
aDropdown:editItem(3,"3. Edited 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> #### Parameters: number index, string text, number bgcolor, number fgcolor, any ...<br>
**returns:** self<br> #### Returns: self<br>
## setScrollable ## setScrollable
Makes the dropdown scrollable Makes the dropdown scrollable
@@ -62,8 +62,8 @@ aDropdown:addItem("2. Entry",colors.yellow)
aDropdown:addItem("3. Entry",colors.yellow,colors.green) aDropdown:addItem("3. Entry",colors.yellow,colors.green)
aDropdown:setScrollable(true) aDropdown:setScrollable(true)
``` ```
**parameters:** boolean isScrollable<br> #### Parameters: boolean isScrollable<br>
**returns:** self<br> #### Returns: self<br>
## selectItem ## selectItem
selects a item in the dropdown (same as a player would click on a item) 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:addItem("3. Entry",colors.yellow,colors.green)
aDropdown:selectItem(1) aDropdown:selectItem(1)
``` ```
**parameters:** number index<br> #### Parameters: number index<br>
**returns:** self<br> #### Returns: self<br>
## clear ## clear
clears the entire list (dropdown) clears the entire list (dropdown)
@@ -90,8 +90,8 @@ aDropdown:addItem("2. Entry",colors.yellow)
aDropdown:addItem("3. Entry",colors.yellow,colors.green) aDropdown:addItem("3. Entry",colors.yellow,colors.green)
aDropdown:clear() aDropdown:clear()
``` ```
**parameters:** -<br> #### Parameters: -<br>
**returns:** self<br> #### Returns: self<br>
## getItemIndex ## getItemIndex
returns the item index of the currently selected item 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:addItem("3. Entry",colors.yellow,colors.green)
aDropdown:getItemIndex() aDropdown:getItemIndex()
``` ```
**parameters:** -<br> #### Parameters: -<br>
**returns:** number index<br> #### Returns: number index<br>
## setSelectedItem ## setSelectedItem
Sets the background of the item which is currently selected 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:addItem("3. Entry",colors.yellow,colors.green)
aDropdown:setSelectedItem(colors.green, colors.blue) 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> #### Parameters: number bgcolor, number fgcolor, boolean isActive (isActive means if different colors for selected item should be used)<br>
**returns:** self<br> #### Returns: self<br>
## setOffset ## setOffset
sets the dropdown offset (will automatically change if scrolling is active) 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:addItem("3. Entry",colors.yellow,colors.green)
aDropdown:setOffset(3) aDropdown:setOffset(3)
``` ```
**parameters:** number offsetValue<br> #### Parameters: number offsetValue<br>
**returns:** self<br> #### Returns: self<br>
## getOffset ## getOffset
returns the current offset returns the current offset
@@ -146,8 +146,8 @@ aDropdown:addItem("2. Entry",colors.yellow)
aDropdown:addItem("3. Entry",colors.yellow,colors.green) aDropdown:addItem("3. Entry",colors.yellow,colors.green)
aDropdown:getOffset() aDropdown:getOffset()
``` ```
**parameters:** -<br> #### Parameters: -<br>
**returns:** number offsetValue<br> #### Returns: number offsetValue<br>
## getOffset ## getOffset
returns the current offset returns the current offset
@@ -160,8 +160,8 @@ aDropdown:addItem("2. Entry",colors.yellow)
aDropdown:addItem("3. Entry",colors.yellow,colors.green) aDropdown:addItem("3. Entry",colors.yellow,colors.green)
aDropdown:getOffset() aDropdown:getOffset()
``` ```
**parameters:** -<br> #### Parameters: -<br>
**returns:** number offsetValue<br> #### Returns: number offsetValue<br>
## setDropdownSize ## setDropdownSize
sets the dropdown size (if you click on the button) 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:addItem("3. Entry",colors.yellow,colors.green)
aDropdown:setDropdownSize(12, 4) aDropdown:setDropdownSize(12, 4)
``` ```
**parameters:** number width, number height<br> #### Parameters: number width, number height<br>
**returns:** self<br> #### Returns: self<br>

View File

@@ -11,8 +11,8 @@ loads a image into the memory.
local mainFrame = basalt.createFrame("myFirstFrame"):show() local mainFrame = basalt.createFrame("myFirstFrame"):show()
local aImage = mainFrame:addImage("myFirstImage"):loadImage("randomImage.nfp"):show() local aImage = mainFrame:addImage("myFirstImage"):loadImage("randomImage.nfp"):show()
``` ```
**Arguments:** string path<br> #### Parameters: string path<br>
**returns:** self<br> #### Returns: self<br>
## loadBlittleImage -- not finished yet ## loadBlittleImage -- not finished yet
@@ -21,8 +21,8 @@ loads a blittle image into the memory.
local mainFrame = basalt.createFrame("myFirstFrame"):show() local mainFrame = basalt.createFrame("myFirstFrame"):show()
local aImage = mainFrame:addImage("myFirstImage"):loadBlittleImage("blittleImage.blt"):show() local aImage = mainFrame:addImage("myFirstImage"):loadBlittleImage("blittleImage.blt"):show()
``` ```
**Arguments:** string path<br> #### Parameters: string path<br>
**returns:** self<br> #### Returns: self<br>
## shrink ## shrink
If you were loading a normal (paint) image into the memory, this function would shrink it to a 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 mainFrame = basalt.createFrame("myFirstFrame"):show()
local aImage = mainFrame:addImage("myFirstImage"):loadBlittleImage("randomImage.nfp"):shrink():show() local aImage = mainFrame:addImage("myFirstImage"):loadBlittleImage("randomImage.nfp"):shrink():show()
``` ```
**Arguments:** -<br> #### Parameters: -<br>
**returns:** self<br> #### Returns: self<br>

View File

@@ -9,5 +9,5 @@ changes the input type
local mainFrame = basalt.createFrame("myFirstFrame"):show() local mainFrame = basalt.createFrame("myFirstFrame"):show()
local aInput = mainFrame:addInput("myFirstInput"):setInputType("password"):show() local aInput = mainFrame:addInput("myFirstInput"):setInputType("password"):show()
``` ```
**parameters:** string value ("text", "password", "number")<br> #### Parameters: string value ("text", "password", "number")<br>
**returns:** self<br> #### Returns: self<br>

View File

@@ -11,8 +11,8 @@ sets the text which gets displayed.
local mainFrame = basalt.createFrame("myFirstFrame"):show() local mainFrame = basalt.createFrame("myFirstFrame"):show()
local aInput = mainFrame:addLabel("myFirstLabel"):setText("Hello lovely basalt community!"):show() local aInput = mainFrame:addLabel("myFirstLabel"):setText("Hello lovely basalt community!"):show()
``` ```
**arguments:** string text<br> #### Parameters: string text<br>
**returns:** self<br> #### Returns: self<br>
## setFontSize ## setFontSize
sets the font size of that text. 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 mainFrame = basalt.createFrame("myFirstFrame"):show()
local aInput = mainFrame:addLabel("myFirstLabel"):setText("Hello"):setFontSize(2):show() local aInput = mainFrame:addLabel("myFirstLabel"):setText("Hello"):setFontSize(2):show()
``` ```
**arguments:** number size (1 = default, 2 = big, 3 = bigger, 4 = huge)<br> #### Parameters: number size (1 = default, 2 = big, 3 = bigger, 4 = huge)<br>
**returns:** self<br> #### Returns: self<br>
## getFontSize ## getFontSize
returns the fontsize returns the fontsize
@@ -30,5 +30,5 @@ local mainFrame = basalt.createFrame("myFirstFrame"):show()
local aInput = mainFrame:addLabel("myFirstLabel"):setText("Hello"):setFontSize(2):show() local aInput = mainFrame:addLabel("myFirstLabel"):setText("Hello"):setFontSize(2):show()
basalt.debug(aInput:getFontSize()) -- returns 2 basalt.debug(aInput:getFontSize()) -- returns 2
``` ```
**arguments:** <br> #### Parameters: <br>
**returns:** number<br> #### Returns: number<br>

View File

@@ -21,8 +21,8 @@ aList:addItem("1. Entry")
aList:addItem("2. Entry",colors.yellow) aList:addItem("2. Entry",colors.yellow)
aList:addItem("3. Entry",colors.yellow,colors.green) 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> #### 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> #### Returns: self<br>
## removeItem ## removeItem
Removes a item from the list 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:addItem("3. Entry",colors.yellow,colors.green)
aList:removeItem(2) aList:removeItem(2)
``` ```
**parameters:** number index<br> #### Parameters: number index<br>
**returns:** self<br> #### Returns: self<br>
## editItem ## editItem
Edits a item on the list 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:addItem("3. Entry",colors.yellow,colors.green)
aList:editItem(3,"3. Edited 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> #### Parameters: number index, string text, number bgcolor, number fgcolor, any ...<br>
**returns:** self<br> #### Returns: self<br>
## setScrollable ## setScrollable
Makes the list scrollable Makes the list scrollable
@@ -63,8 +63,8 @@ aList:addItem("2. Entry",colors.yellow)
aList:addItem("3. Entry",colors.yellow,colors.green) aList:addItem("3. Entry",colors.yellow,colors.green)
aList:setScrollable(true) aList:setScrollable(true)
``` ```
**parameters:** boolean isScrollable<br> #### Parameters: boolean isScrollable<br>
**returns:** self<br> #### Returns: self<br>
## selectItem ## selectItem
selects a item in the list (same as a player would click on a item) 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:addItem("3. Entry",colors.yellow,colors.green)
aList:selectItem(1) aList:selectItem(1)
``` ```
**parameters:** number index<br> #### Parameters: number index<br>
**returns:** self<br> #### Returns: self<br>
## clear ## clear
clears the entire list clears the entire list
@@ -91,8 +91,8 @@ aDropdown:addItem("2. Entry",colors.yellow)
aDropdown:addItem("3. Entry",colors.yellow,colors.green) aDropdown:addItem("3. Entry",colors.yellow,colors.green)
aDropdown:clear() aDropdown:clear()
``` ```
**parameters:** -<br> #### Parameters: -<br>
**returns:** self<br> #### Returns: self<br>
## getItemIndex ## getItemIndex
returns the item index of the currently selected item 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:addItem("3. Entry",colors.yellow,colors.green)
aDropdown:getItemIndex() aDropdown:getItemIndex()
``` ```
**parameters:** -<br> #### Parameters: -<br>
**returns:** number index<br> #### Returns: number index<br>
## setSelectedItem ## setSelectedItem
Sets the background of the item which is currently selected 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:addItem("3. Entry",colors.yellow,colors.green)
aList:setSelectedItem(colors.green, colors.blue) 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> #### Parameters: number bgcolor, number fgcolor, boolean isActive (isActive means if different colors for selected item should be used)<br>
**returns:** self<br> #### Returns: self<br>
## setOffset ## setOffset
sets the list offset (will automatically change if scrolling is active) 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:addItem("3. Entry",colors.yellow,colors.green)
aList:setOffset(3) aList:setOffset(3)
``` ```
**parameters:** number offsetValue<br> #### Parameters: number offsetValue<br>
**returns:** self<br> #### Returns: self<br>
## getOffset ## getOffset
returns the current offset returns the current offset
@@ -147,5 +147,5 @@ aList:addItem("2. Entry",colors.yellow)
aList:addItem("3. Entry",colors.yellow,colors.green) aList:addItem("3. Entry",colors.yellow,colors.green)
aList:getOffset() aList:getOffset()
``` ```
**parameters:** -<br> #### Parameters: -<br>
**returns:** number offsetValue<br> #### Returns: number offsetValue<br>

View File

@@ -7,8 +7,8 @@ local mainFrame = basalt.createFrame("myFirstFrame"):show()
local button = mainFrame:addButton("myFirstButton") local button = mainFrame:addButton("myFirstButton")
button:show() button:show()
``` ```
**parameters:** -<br> #### Parameters: -<br>
**returns:** self<br> #### Returns: self<br>
## hide ## hide
hides the object 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) local button = mainFrame:addButton("myFirstButton"):setText("Close"):onClick(function() mainFrame:hide() end)
button:show() button:show()
``` ```
**parameters:** -<br> #### Parameters: -<br>
**returns:** self<br> #### Returns: self<br>
## setPosition ## setPosition
Changes the position relative to its parent frame Changes the position relative to its parent frame
```lua ```lua
local mainFrame = basalt.createFrame("myFirstFrame"):setPosition(2,3) 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> #### 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> #### Returns: self<br>
@@ -35,24 +35,24 @@ Changes the object background color
```lua ```lua
local mainFrame = basalt.createFrame("myFirstFrame"):setBackground(colors.lightGray) local mainFrame = basalt.createFrame("myFirstFrame"):setBackground(colors.lightGray)
``` ```
**parameters:** number color<br> #### Parameters: number color<br>
**returns:** self<br> #### Returns: self<br>
## setForeground ## setForeground
Changes the object text color Changes the object text color
```lua ```lua
local mainFrame = basalt.createFrame("myFirstFrame"):setForeground(colors.black) local mainFrame = basalt.createFrame("myFirstFrame"):setForeground(colors.black)
``` ```
**parameters:** number color<br> #### Parameters: number color<br>
**returns:** self<br> #### Returns: self<br>
## setSize ## setSize
Changes the object size Changes the object size
```lua ```lua
local mainFrame = basalt.createFrame("myFirstFrame"):setSize(15,5) local mainFrame = basalt.createFrame("myFirstFrame"):setSize(15,5)
``` ```
**parameters:** number width, number length<br> #### Parameters: number width, number length<br>
**returns:** self<br> #### Returns: self<br>
## setFocus ## setFocus
sets the object to be the focused object. 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 mainFrame = basalt.createFrame("myFirstFrame"):show()
local aButton = mainFrame:addButton("myFirstButton"):setFocus():show() local aButton = mainFrame:addButton("myFirstButton"):setFocus():show()
``` ```
**parameters:** -<br> #### Parameters: -<br>
**returns:** self<br> #### Returns: self<br>
## setZIndex ## 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. 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 mainFrame = basalt.createFrame("myFirstFrame"):show()
local aButton = mainFrame:addButton("myFirstButton"):setZIndex(1):show() local aButton = mainFrame:addButton("myFirstButton"):setZIndex(1):show()
``` ```
**parameters:** number index<br> #### Parameters: number index<br>
**returns:** self<br> #### Returns: self<br>
## setParent ## setParent
changes the frame parent of that object changes the frame parent of that object
@@ -81,8 +81,8 @@ local mainFrame = basalt.createFrame("myFirstFrame"):show()
local aRandomFrame = basalt.createFrame("aRandomFrame"):show() local aRandomFrame = basalt.createFrame("aRandomFrame"):show()
local aButton = mainFrame:addButton("myFirstButton"):onClick(function() aRandomFrame:setParent(mainFrame) end):show() local aButton = mainFrame:addButton("myFirstButton"):onClick(function() aRandomFrame:setParent(mainFrame) end):show()
``` ```
**parameters:** frame object<br> #### Parameters: frame object<br>
**returns:** self<br> #### Returns: self<br>
## isFocused ## isFocused
returns if the object is currently the focused object of the parent frame 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() local aButton = mainFrame:addButton("myFirstButton"):show()
basalt.debug(aButton:isFocused()) -- shows true or false as a debug message basalt.debug(aButton:isFocused()) -- shows true or false as a debug message
``` ```
**parameters:** -<br> #### Parameters: -<br>
**returns:** boolean<br> #### Returns: boolean<br>
## getAnchorPosition ## getAnchorPosition
converts the x,y coordinates into the anchor coordinates of that object 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() 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 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> #### Parameters: number x, number y - or nothing (if nothing it uses the object's x, y)<br>
**returns:** number x, number y (converted)<br> #### Returns: number x, number y (converted)<br>
## setAnchor ## setAnchor
sets the anchor of that object 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 mainFrame = basalt.createFrame("myFirstFrame"):setAnchor("right"):show()
local aButton = mainFrame:addButton("myFirstButton"):setAnchor("bottom","right"):setSize(8,1):setPosition(1,1):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> #### Parameters: string sides - ("left", "right", "top", "bottom") you can stack positions like so ..:setAnchor("right", "bottom")<br>
**returns:** self<br> #### Returns: self<br>
## getAbsolutePosition ## getAbsolutePosition
converts the relative coordinates into absolute coordinates 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() 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 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> #### Parameters: number x, number y - or nothing (if nothing it uses the object's x, y)<br>
**returns:** self<br> #### Returns: self<br>
## setTextAlign ## setTextAlign
sets the text align of the object (for example buttons) 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 mainFrame = basalt.createFrame("myFirstFrame"):show()
local aButton = mainFrame:addButton("myFirstButton"):setSize(12,3):setTextAlign("right", "center"):setText("Dont't..."):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> #### Parameters: string horizontal, string vertical - ("left", "center", "right")<br>
**returns:** self<br> #### Returns: self<br>
## setValue ## setValue
sets the value of that object (input, label, checkbox, textfield, scrollbar,...) 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 mainFrame = basalt.createFrame("myFirstFrame"):show()
local aCheckbox = mainFrame:addCheckbox("myFirstCheckbox"):setValue(true):show() local aCheckbox = mainFrame:addCheckbox("myFirstCheckbox"):setValue(true):show()
``` ```
**parameters:** any value<br> #### Parameters: any value<br>
**returns:** self<br> #### Returns: self<br>
## getValue ## getValue
returns the currently saved value returns the currently saved value
@@ -151,8 +151,8 @@ local mainFrame = basalt.createFrame("myFirstFrame"):show()
local aCheckbox = mainFrame:addCheckbox("myFirstCheckbox"):setValue(true):show() local aCheckbox = mainFrame:addCheckbox("myFirstCheckbox"):setValue(true):show()
basalt.debug(aCheckbox:getValue()) -- returns true basalt.debug(aCheckbox:getValue()) -- returns true
``` ```
**parameters:**-<br> #### Parameters:-<br>
**returns:** any value<br> #### Returns: any value<br>
## getHeight/getWidth ## getHeight/getWidth
returns the height or width returns the height or width
@@ -161,8 +161,8 @@ local mainFrame = basalt.createFrame("myFirstFrame"):show()
local aButton = mainFrame:addButton("myFirstButton"):setSize(5,8):show() local aButton = mainFrame:addButton("myFirstButton"):setSize(5,8):show()
basalt.debug(aButton:getHeight()) -- returns 8 basalt.debug(aButton:getHeight()) -- returns 8
``` ```
**parameters:**-<br> #### Parameters:-<br>
**returns:** number height/width<br> #### Returns: number height/width<br>
## isVisible ## isVisible
returns if the object is currently visible 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() local aButton = mainFrame:addButton("myFirstButton"):setSize(5,8):show()
basalt.debug(aButton:isVisible()) -- returns true basalt.debug(aButton:isVisible()) -- returns true
``` ```
**parameters:**-<br> #### Parameters:-<br>
**returns:** boolean<br> #### Returns: boolean<br>
## getName ## getName
returns the given name of that object returns the given name of that object
@@ -180,8 +180,8 @@ returns the given name of that object
local mainFrame = basalt.createFrame("myFirstFrame"):show() local mainFrame = basalt.createFrame("myFirstFrame"):show()
basalt.debug(mainFrame:getName()) -- returns myFirstFrame basalt.debug(mainFrame:getName()) -- returns myFirstFrame
``` ```
**parameters:**-<br> #### Parameters:-<br>
**returns:** string name<br> #### Returns: string name<br>
# Object Events # 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 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 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() 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> #### Parameters: function func<br>
**returns:** self<br> #### Returns: self<br>
## onClickUp ## onClickUp
creates a click_up event creates a click_up event
@@ -201,8 +201,8 @@ creates a click_up event
local mainFrame = basalt.createFrame("myFirstFrame"):show() 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() 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> #### Parameters: function func<br>
**returns:** self<br> #### Returns: self<br>
## onMouseDrag ## onMouseDrag
creates a mouse_drag event creates a mouse_drag event
@@ -210,8 +210,8 @@ creates a mouse_drag event
local mainFrame = basalt.createFrame("myFirstFrame"):show() 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() 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> #### Parameters: function func<br>
**returns:** self<br> #### Returns: self<br>
## onChange ## onChange
creates a change event (fires as soon as the value gets changed) 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 mainFrame = basalt.createFrame("myFirstFrame"):show()
local aCheckbox = mainFrame:addCheckbox("myFirstCheckbox"):onChange(function(self) basalt.debug("i got changed into "..self:getValue()) end):show() local aCheckbox = mainFrame:addCheckbox("myFirstCheckbox"):onChange(function(self) basalt.debug("i got changed into "..self:getValue()) end):show()
``` ```
**parameters:** function func<br> #### Parameters: function func<br>
**returns:** self<br> #### Returns: self<br>
## onKey ## onKey
creates a key(board) - event can be key or char creates a key(board) - event can be key or char
```lua ```lua
local mainFrame = basalt.createFrame("myFirstFrame"):onKey(function(self,event,key) basalt.debug("you clicked "..key) end):show() local mainFrame = basalt.createFrame("myFirstFrame"):onKey(function(self,event,key) basalt.debug("you clicked "..key) end):show()
``` ```
**parameters:** function func<br> #### Parameters: function func<br>
**returns:** self<br> #### Returns: self<br>
## onLoseFocus ## onLoseFocus
creates a lose focus event creates a lose focus event
```lua ```lua
local mainFrame = basalt.createFrame("myFirstFrame"):onLoseFocus(function(self) basalt.debug("please come back..") end):show() local mainFrame = basalt.createFrame("myFirstFrame"):onLoseFocus(function(self) basalt.debug("please come back..") end):show()
``` ```
**parameters:** function func<br> #### Parameters: function func<br>
**returns:** self<br> #### Returns: self<br>
## onGetFocus ## onGetFocus
creates a get focus event creates a get focus event
```lua ```lua
local mainFrame = basalt.createFrame("myFirstFrame"):onGetFocus(function(self) basalt.debug("thanks!") end):show() local mainFrame = basalt.createFrame("myFirstFrame"):onGetFocus(function(self) basalt.debug("thanks!") end):show()
``` ```
**parameters:** function func<br> #### Parameters: function func<br>
**returns:** self<br> #### Returns: self<br>

View File

@@ -10,8 +10,8 @@ local mainFrame = basalt.createFrame("myFirstFrame"):show()
local aProgram = mainFrame:addProgram("myFirstProgram"):show() local aProgram = mainFrame:addProgram("myFirstProgram"):show()
basalt.debug(aProgram:getStatus()) -- returns "running", "normal", "suspended" or "dead" basalt.debug(aProgram:getStatus()) -- returns "running", "normal", "suspended" or "dead"
``` ```
**parameters:**-<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> #### 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 ## execute
executes the given path (-program) executes the given path (-program)
@@ -20,8 +20,8 @@ local mainFrame = basalt.createFrame("myFirstFrame"):show()
local aProgram = mainFrame:addProgram("myFirstProgram"):show() local aProgram = mainFrame:addProgram("myFirstProgram"):show()
aProgram:execute("rom/programs/fun/worm.lua") -- executes worm aProgram:execute("rom/programs/fun/worm.lua") -- executes worm
``` ```
**parameters:** string filepath - (the path to the program you want to execute)<br> #### Parameters: string filepath - (the path to the program you want to execute)<br>
**returns:** self<br> #### Returns: self<br>
## stop ## 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 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() mainFrame:addButton("myFirstButton"):setText("close"):onClick(function() aProgram:stop() end):show()
``` ```
**parameters:**-<br> #### Parameters:-<br>
**returns:** self<br> #### Returns: self<br>
## pause ## pause
pauses the program (prevents the program from receiving events) 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() mainFrame:addButton("myFirstButton"):setText("close"):onClick(function() aProgram:pause(true) end):show()
``` ```
**parameters:** boolean pause<br> #### Parameters: boolean pause<br>
**returns:** self<br> #### Returns: self<br>
## isPaused ## isPaused
returns if the program is currently paused 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() mainFrame:addButton("myFirstButton"):setText("pause"):onClick(function() basalt.debug(aProgram:isPaused()) end):show()
``` ```
**parameters:** -<br> #### Parameters: -<br>
**returns:** boolean isPaused<br> #### Returns: boolean isPaused<br>
## injectEvent ## injectEvent
injects a event into the program manually 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() 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> #### Parameters: string event, any parameter, any parameter, any parameter, any parameter, boolean ignorePause<br>
**returns:** self<br> #### Returns: self<br>
## injectEvents ## injectEvents
injects a event table into the program manually injects a event table into the program manually
@@ -75,8 +75,8 @@ local aProgram = mainFrame:addProgram("myFirstProgram"):execute("rom/programs/sh
--example will follow --example will follow
``` ```
**parameters:** string event, any parameter, any parameter, any parameter, any parameter, boolean ignorePause<br> #### Parameters: string event, any parameter, any parameter, any parameter, any parameter, boolean ignorePause<br>
**returns:** self<br> #### Returns: self<br>
## getQueuedEvents ## 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 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() mainFrame:addButton("myFirstButton"):setText("inject"):onClick(function() basalt.debug(aProgram:getQueuedEvents()) end):show()
``` ```
**parameters:** -<br> #### Parameters: -<br>
**returns:** table queuedEvents<br> #### Returns: table queuedEvents<br>
## updateQueuedEvents ## updateQueuedEvents
here you can manipulate the queuedEvents table with your own events table 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 --example will follow
``` ```
**parameters:** table queuedEvents<br> #### Parameters: table queuedEvents<br>
**returns:** self<br> #### Returns: self<br>

View File

@@ -20,8 +20,8 @@ aRadio:addItem("1. Entry",3,4)
aRadio:addItem("2. Entry",3,5,colors.yellow) aRadio:addItem("2. Entry",3,5,colors.yellow)
aRadio:addItem("3. Entry",3,6,colors.yellow,colors.green) 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> #### 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> #### Returns: self<br>
## removeItem ## removeItem
Removes a item from the radio 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:addItem("3. Entry",3,6,colors.yellow,colors.green)
aRadio:removeItem(2) aRadio:removeItem(2)
``` ```
**parameters:** number index<br> #### Parameters: number index<br>
**returns:** self<br> #### Returns: self<br>
## editItem ## editItem
Edits a item on the radio 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:addItem("3. Entry",3,6,colors.yellow,colors.green)
aRadio:editItem(3,"3. Edited 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> #### Parameters: number index, string text, number x, number y, number bgcolor, number fgcolor, any ...<br>
**returns:** self<br> #### Returns: self<br>
## setScrollable ## setScrollable
Makes the radio scrollable 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:addItem("3. Entry",3,6,colors.yellow,colors.green)
aRadio:setScrollable(true) aRadio:setScrollable(true)
``` ```
**parameters:** boolean isScrollable<br> #### Parameters: boolean isScrollable<br>
**returns:** self<br> #### Returns: self<br>
## selectItem ## selectItem
selects a item in the radio (same as a player would click on a item) 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:addItem("3. Entry",3,6,colors.yellow,colors.green)
aRadio:selectItem(1) aRadio:selectItem(1)
``` ```
**parameters:** number index<br> #### Parameters: number index<br>
**returns:** self<br> #### Returns: self<br>
## clear ## clear
clears the entire list (radio) 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:addItem("3. Entry",3,6,colors.yellow,colors.green)
aRadio:clear() aRadio:clear()
``` ```
**parameters:** -<br> #### Parameters: -<br>
**returns:** self<br> #### Returns: self<br>
## getItemIndex ## getItemIndex
returns the item index of the currently selected item 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:addItem("3. Entry",3,6,colors.yellow,colors.green)
aRadio:getItemIndex() aRadio:getItemIndex()
``` ```
**parameters:** -<br> #### Parameters: -<br>
**returns:** number index<br> #### Returns: number index<br>
## setSelectedItem ## setSelectedItem
Sets the background of the item which is currently selected 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:addItem("3. Entry",3,6,colors.yellow,colors.green)
aRadio:setSelectedItem(colors.green, colors.blue) 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> #### Parameters: number bgcolor, number fgcolor, boolean isActive (isActive means if different colors for selected item should be used)<br>
**returns:** self<br> #### Returns: self<br>

View File

@@ -14,8 +14,8 @@ Changes the symbol
local mainFrame = basalt.createFrame("myFirstFrame"):show() local mainFrame = basalt.createFrame("myFirstFrame"):show()
local aScrollbar = mainFrame:addScrollbar("myFirstScrollbar"):setSymbol("X"):show() local aScrollbar = mainFrame:addScrollbar("myFirstScrollbar"):setSymbol("X"):show()
``` ```
**parameters:** char symbol<br> #### Parameters: char symbol<br>
**returns:** self<br> #### Returns: self<br>
## setBackgroundSymbol ## setBackgroundSymbol
Changes the background symbol color Changes the background symbol color
@@ -24,8 +24,8 @@ Changes the background symbol color
local mainFrame = basalt.createFrame("myFirstFrame"):show() local mainFrame = basalt.createFrame("myFirstFrame"):show()
local aScrollbar = mainFrame:addScrollbar("myFirstScrollbar"):setSymbol("X"):setBackgroundSymbol(colors.green):show() local aScrollbar = mainFrame:addScrollbar("myFirstScrollbar"):setSymbol("X"):setBackgroundSymbol(colors.green):show()
``` ```
**parameters:** number symbolcolor<br> #### Parameters: number symbolcolor<br>
**returns:** self<br> #### Returns: self<br>
## setBarType ## setBarType
If the bar goes vertically or horizontally 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 mainFrame = basalt.createFrame("myFirstFrame"):show()
local aScrollbar = mainFrame:addScrollbar("myFirstScrollbar"):setBarType("horizontal"):show() local aScrollbar = mainFrame:addScrollbar("myFirstScrollbar"):setBarType("horizontal"):show()
``` ```
**parameters:** string value ("vertical" or "horizontal")<br> #### Parameters: string value ("vertical" or "horizontal")<br>
**returns:** self<br> #### Returns: self<br>
## setMaxValue ## 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. 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 mainFrame = basalt.createFrame("myFirstFrame"):show()
local aScrollbar = mainFrame:addScrollbar("myFirstScrollbar"):setMaxValue(123):show() local aScrollbar = mainFrame:addScrollbar("myFirstScrollbar"):setMaxValue(123):show()
``` ```
**parameters:** any number<br> #### Parameters: any number<br>
**returns:** self<br> #### Returns: self<br>

View File

@@ -9,8 +9,8 @@ this will change the foreground symbol
local mainFrame = basalt.createFrame("myFirstFrame"):show() local mainFrame = basalt.createFrame("myFirstFrame"):show()
local aSlider = mainFrame:addSlider("myFirstSlider"):setSymbol("X"):show() local aSlider = mainFrame:addSlider("myFirstSlider"):setSymbol("X"):show()
``` ```
**parameters:** char symbol<br> #### Parameters: char symbol<br>
**returns:** self<br> #### Returns: self<br>
## setBackgroundSymbol ## setBackgroundSymbol
this will change the symbol background color 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 mainFrame = basalt.createFrame("myFirstFrame"):show()
local aSlider = mainFrame:addSlider("myFirstSlider"):setBackgroundSymbol(colors.yellow):show() local aSlider = mainFrame:addSlider("myFirstSlider"):setBackgroundSymbol(colors.yellow):show()
``` ```
**parameters:** number color<br> #### Parameters: number color<br>
**returns:** self<br> #### Returns: self<br>
## setSymbolColor ## setSymbolColor
this will change the symbol color this will change the symbol color
@@ -27,8 +27,8 @@ this will change the symbol color
local mainFrame = basalt.createFrame("myFirstFrame"):show() local mainFrame = basalt.createFrame("myFirstFrame"):show()
local aSlider = mainFrame:addSlider("myFirstSlider"):setSymbolColor(colors.red):show() local aSlider = mainFrame:addSlider("myFirstSlider"):setSymbolColor(colors.red):show()
``` ```
**parameters:** number color<br> #### Parameters: number color<br>
**returns:** self<br> #### Returns: self<br>
## setBarType ## setBarType
this will change the bar to vertical/horizontal (default is horizontal) 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 mainFrame = basalt.createFrame("myFirstFrame"):show()
local aSlider = mainFrame:addSlider("myFirstSlider"):setBarType("vertical"):show() local aSlider = mainFrame:addSlider("myFirstSlider"):setBarType("vertical"):show()
``` ```
**parameters:** string value ("vertical", "horizontal"<br> #### Parameters: string value ("vertical", "horizontal"<br>
**returns:** self<br> #### Returns: self<br>

View File

@@ -18,8 +18,8 @@ local mainFrame = basalt.createFrame("myFirstFrame"):show()
local aTextfield = mainFrame:addTextfield("myFirstTextfield"):show() local aTextfield = mainFrame:addTextfield("myFirstTextfield"):show()
basalt.debug(aTextfield:getLines()) basalt.debug(aTextfield:getLines())
``` ```
**parameters:** -<br> #### Parameters: -<br>
**returns:** table lines<br> #### Returns: table lines<br>
## getLine ## getLine
returns the line on index position returns the line on index position
@@ -28,8 +28,8 @@ local mainFrame = basalt.createFrame("myFirstFrame"):show()
local aTextfield = mainFrame:addTextfield("myFirstTextfield"):show() local aTextfield = mainFrame:addTextfield("myFirstTextfield"):show()
basalt.debug(aTextfield:getLine(2)) basalt.debug(aTextfield:getLine(2))
``` ```
**parameters:** number index<br> #### Parameters: number index<br>
**returns:** string line<br> #### Returns: string line<br>
## editLine ## editLine
edits line on index position edits line on index position
@@ -38,8 +38,8 @@ local mainFrame = basalt.createFrame("myFirstFrame"):show()
local aTextfield = mainFrame:addTextfield("myFirstTextfield"):show() local aTextfield = mainFrame:addTextfield("myFirstTextfield"):show()
aTextfield:editLine(2, "hellow") aTextfield:editLine(2, "hellow")
``` ```
**parameters:** number index, string text<br> #### Parameters: number index, string text<br>
**returns:** self<br> #### Returns: self<br>
## addLine ## addLine
adds a line on index position (if index is nil it just adds the line on the bottom) 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() local aTextfield = mainFrame:addTextfield("myFirstTextfield"):show()
aTextfield:addLine("hellow") aTextfield:addLine("hellow")
``` ```
**parameters:** string text, number index<br> #### Parameters: string text, number index<br>
**returns:** self<br> #### Returns: self<br>
## removeLine ## removeLine
removes the line on index position removes the line on index position
@@ -58,8 +58,8 @@ local mainFrame = basalt.createFrame("myFirstFrame"):show()
local aTextfield = mainFrame:addTextfield("myFirstTextfield"):show() local aTextfield = mainFrame:addTextfield("myFirstTextfield"):show()
aTextfield:removeLine(1) aTextfield:removeLine(1)
``` ```
**parameters:** number index<br> #### Parameters: number index<br>
**returns:** self<br> #### Returns: self<br>
## getTextCursor ## getTextCursor
returns the cursor position returns the cursor position
@@ -68,5 +68,5 @@ local mainFrame = basalt.createFrame("myFirstFrame"):show()
local aTextfield = mainFrame:addTextfield("myFirstTextfield"):show() local aTextfield = mainFrame:addTextfield("myFirstTextfield"):show()
basalt.debug(aTextfield:getTextCursor()) basalt.debug(aTextfield:getTextCursor())
``` ```
**parameters:** -<br> #### Parameters: -<br>
**returns:** number x, number y<br> #### Returns: number x, number y<br>

View File

@@ -15,8 +15,8 @@ local function randomThreadFunction()
end end
aThread:start(randomThreadfunction) aThread:start(randomThreadfunction)
``` ```
**parameters:**function func<br> #### Parameters:function func<br>
**returns:** self<br> #### Returns: self<br>
## getStatus ## getStatus
gets the thread status gets the thread status
@@ -25,8 +25,8 @@ local mainFrame = basalt.createFrame("myFirstFrame"):show()
local aThread = mainFrame:addThread("myFirstThread"):show() local aThread = mainFrame:addThread("myFirstThread"):show()
basalt.debug(aThread:getStatus()) -- returns "running", "normal", "suspended" or "dead" basalt.debug(aThread:getStatus()) -- returns "running", "normal", "suspended" or "dead"
``` ```
**parameters:** -<br> #### Parameters: -<br>
**returns:** string "running" - if its running, "normal" - is active but not running (waiting for a event), "suspended" - is suspended<br> #### Returns: string "running" - if its running, "normal" - is active but not running (waiting for a event), "suspended" - is suspended<br>
## stop ## stop
stops the thread stops the thread
@@ -43,5 +43,5 @@ aThread:start(randomThreadfunction)
local aButton = mainFrame:addButton("myFirstButton"):setText("Stop Thread"):onClick(function() aThread:stop() end):show() local aButton = mainFrame:addButton("myFirstButton"):setText("Stop Thread"):onClick(function() aThread:stop() end):show()
``` ```
**parameters:** -<br> #### Parameters: -<br>
**returns:** self<br> #### Returns: self<br>

View File

@@ -9,8 +9,8 @@ local mainFrame = basalt.createFrame("myFirstFrame"):show()
local aTimer = mainFrame:addTimer("myFirstTimer") local aTimer = mainFrame:addTimer("myFirstTimer")
aTimer:setTime(5) 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> #### 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> #### Returns: self<br>
## start ## start
starts the timer starts the timer
@@ -19,8 +19,8 @@ local mainFrame = basalt.createFrame("myFirstFrame"):show()
local aTimer = mainFrame:addTimer("myFirstTimer") local aTimer = mainFrame:addTimer("myFirstTimer")
aTimer:setTime(5):start() aTimer:setTime(5):start()
``` ```
**parameters:** -<br> #### Parameters: -<br>
**returns:** self<br> #### Returns: self<br>
## cancel ## cancel
stops/cancels the timer stops/cancels the timer
@@ -30,8 +30,8 @@ local aTimer = mainFrame:addTimer("myFirstTimer")
aTimer:setTime(5):start() aTimer:setTime(5):start()
aTimer:cancel() aTimer:cancel()
``` ```
**parameters:** -<br> #### Parameters: -<br>
**returns:** self<br> #### Returns: self<br>
## onCall ## onCall
@@ -45,5 +45,5 @@ local aTimer = mainFrame:addTimer("myFirstTimer")
aTimer:setTime(5):onCall(timerCall):start() aTimer:setTime(5):onCall(timerCall):start()
``` ```
**parameters:** function func<br> #### Parameters: function func<br>
**returns:** self<br> #### Returns: self<br>