From b6ee09636be002e788126c19127e6590ef112f73 Mon Sep 17 00:00:00 2001 From: Samuel Pizette Date: Thu, 9 Jun 2022 11:43:59 -0400 Subject: [PATCH] updated param and return headers --- docs/objects/Button.md | 4 +- docs/objects/Dropdown.md | 48 +++++++++--------- docs/objects/Image.md | 12 ++--- docs/objects/Input.md | 4 +- docs/objects/Label.md | 12 ++--- docs/objects/List.md | 40 +++++++-------- docs/objects/Object.md | 104 +++++++++++++++++++------------------- docs/objects/Program.md | 36 ++++++------- docs/objects/Radio.md | 32 ++++++------ docs/objects/Scrollbar.md | 16 +++--- docs/objects/Slider.md | 16 +++--- docs/objects/Textfield.md | 24 ++++----- docs/objects/Thread.md | 12 ++--- docs/objects/Timer.md | 16 +++--- 14 files changed, 188 insertions(+), 188 deletions(-) diff --git a/docs/objects/Button.md b/docs/objects/Button.md index b3e9428..e9b4c6c 100644 --- a/docs/objects/Button.md +++ b/docs/objects/Button.md @@ -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
-**returns:** self
+#### Parameters: string text
+#### Returns: self
# Examples Add a onClick event: diff --git a/docs/objects/Dropdown.md b/docs/objects/Dropdown.md index 28b5f1c..ba649d6 100644 --- a/docs/objects/Dropdown.md +++ b/docs/objects/Dropdown.md @@ -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)
-**returns:** self
+#### 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)
+#### Returns: self
## 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
-**returns:** self
+#### Parameters: number index
+#### Returns: self
## 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 ...
-**returns:** self
+#### Parameters: number index, string text, number bgcolor, number fgcolor, any ...
+#### Returns: self
## 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
-**returns:** self
+#### Parameters: boolean isScrollable
+#### Returns: self
## 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
-**returns:** self
+#### Parameters: number index
+#### Returns: self
## 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:** -
-**returns:** self
+#### Parameters: -
+#### Returns: self
## 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:** -
-**returns:** number index
+#### Parameters: -
+#### Returns: number index
## 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)
-**returns:** self
+#### Parameters: number bgcolor, number fgcolor, boolean isActive (isActive means if different colors for selected item should be used)
+#### Returns: self
## 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
-**returns:** self
+#### Parameters: number offsetValue
+#### Returns: self
## 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:** -
-**returns:** number offsetValue
+#### Parameters: -
+#### Returns: number offsetValue
## 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:** -
-**returns:** number offsetValue
+#### Parameters: -
+#### Returns: number offsetValue
## 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
-**returns:** self
\ No newline at end of file +#### Parameters: number width, number height
+#### Returns: self
\ No newline at end of file diff --git a/docs/objects/Image.md b/docs/objects/Image.md index 5247e9c..e43056a 100644 --- a/docs/objects/Image.md +++ b/docs/objects/Image.md @@ -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
-**returns:** self
+#### Parameters: string path
+#### Returns: self
## 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
-**returns:** self
+#### Parameters: string path
+#### Returns: self
## 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:** -
-**returns:** self
+#### Parameters: -
+#### Returns: self
diff --git a/docs/objects/Input.md b/docs/objects/Input.md index 664edba..a445c3c 100644 --- a/docs/objects/Input.md +++ b/docs/objects/Input.md @@ -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")
-**returns:** self
+#### Parameters: string value ("text", "password", "number")
+#### Returns: self
diff --git a/docs/objects/Label.md b/docs/objects/Label.md index fa66c6e..53cd2a5 100644 --- a/docs/objects/Label.md +++ b/docs/objects/Label.md @@ -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
-**returns:** self
+#### Parameters: string text
+#### Returns: self
## 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)
-**returns:** self
+#### Parameters: number size (1 = default, 2 = big, 3 = bigger, 4 = huge)
+#### Returns: self
## 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:**
-**returns:** number
+#### Parameters:
+#### Returns: number
diff --git a/docs/objects/List.md b/docs/objects/List.md index 7663184..4774494 100644 --- a/docs/objects/List.md +++ b/docs/objects/List.md @@ -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)
-**returns:** self
+#### 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)
+#### Returns: self
## 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
-**returns:** self
+#### Parameters: number index
+#### Returns: self
## 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 ...
-**returns:** self
+#### Parameters: number index, string text, number bgcolor, number fgcolor, any ...
+#### Returns: self
## 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
-**returns:** self
+#### Parameters: boolean isScrollable
+#### Returns: self
## 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
-**returns:** self
+#### Parameters: number index
+#### Returns: self
## 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:** -
-**returns:** self
+#### Parameters: -
+#### Returns: self
## 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:** -
-**returns:** number index
+#### Parameters: -
+#### Returns: number index
## 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)
-**returns:** self
+#### Parameters: number bgcolor, number fgcolor, boolean isActive (isActive means if different colors for selected item should be used)
+#### Returns: self
## 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
-**returns:** self
+#### Parameters: number offsetValue
+#### Returns: self
## 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:** -
-**returns:** number offsetValue
\ No newline at end of file +#### Parameters: -
+#### Returns: number offsetValue
\ No newline at end of file diff --git a/docs/objects/Object.md b/docs/objects/Object.md index a69afaf..e49d446 100644 --- a/docs/objects/Object.md +++ b/docs/objects/Object.md @@ -7,8 +7,8 @@ local mainFrame = basalt.createFrame("myFirstFrame"):show() local button = mainFrame:addButton("myFirstButton") button:show() ``` -**parameters:** -
-**returns:** self
+#### Parameters: -
+#### Returns: self
## 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:** -
-**returns:** self
+#### Parameters: -
+#### Returns: self
## 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
-**returns:** self
+#### Parameters: number x, number y[, boolean relative], if relative is set to true it will add/remove instead of set x, y
+#### Returns: self
@@ -35,24 +35,24 @@ Changes the object background color ```lua local mainFrame = basalt.createFrame("myFirstFrame"):setBackground(colors.lightGray) ``` -**parameters:** number color
-**returns:** self
+#### Parameters: number color
+#### Returns: self
## setForeground Changes the object text color ```lua local mainFrame = basalt.createFrame("myFirstFrame"):setForeground(colors.black) ``` -**parameters:** number color
-**returns:** self
+#### Parameters: number color
+#### Returns: self
## setSize Changes the object size ```lua local mainFrame = basalt.createFrame("myFirstFrame"):setSize(15,5) ``` -**parameters:** number width, number length
-**returns:** self
+#### Parameters: number width, number length
+#### Returns: self
## 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:** -
-**returns:** self
+#### Parameters: -
+#### Returns: self
## 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
-**returns:** self
+#### Parameters: number index
+#### Returns: self
## 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
-**returns:** self
+#### Parameters: frame object
+#### Returns: self
## 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:** -
-**returns:** boolean
+#### Parameters: -
+#### Returns: boolean
## 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)
-**returns:** number x, number y (converted)
+#### Parameters: number x, number y - or nothing (if nothing it uses the object's x, y)
+#### Returns: number x, number y (converted)
## 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")
-**returns:** self
+#### Parameters: string sides - ("left", "right", "top", "bottom") you can stack positions like so ..:setAnchor("right", "bottom")
+#### Returns: self
## 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)
-**returns:** self
+#### Parameters: number x, number y - or nothing (if nothing it uses the object's x, y)
+#### Returns: self
## 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")
-**returns:** self
+#### Parameters: string horizontal, string vertical - ("left", "center", "right")
+#### Returns: self
## 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
-**returns:** self
+#### Parameters: any value
+#### Returns: self
## 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:**-
-**returns:** any value
+#### Parameters:-
+#### Returns: any value
## 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:**-
-**returns:** number height/width
+#### Parameters:-
+#### Returns: number height/width
## 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:**-
-**returns:** boolean
+#### Parameters:-
+#### Returns: boolean
## 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:**-
-**returns:** string name
+#### Parameters:-
+#### Returns: string name
# 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
-**returns:** self
+#### Parameters: function func
+#### Returns: self
## 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
-**returns:** self
+#### Parameters: function func
+#### Returns: self
## 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
-**returns:** self
+#### Parameters: function func
+#### Returns: self
## 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
-**returns:** self
+#### Parameters: function func
+#### Returns: self
## 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
-**returns:** self
+#### Parameters: function func
+#### Returns: self
## 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
-**returns:** self
+#### Parameters: function func
+#### Returns: self
## onGetFocus creates a get focus event ```lua local mainFrame = basalt.createFrame("myFirstFrame"):onGetFocus(function(self) basalt.debug("thanks!") end):show() ``` -**parameters:** function func
-**returns:** self
\ No newline at end of file +#### Parameters: function func
+#### Returns: self
\ No newline at end of file diff --git a/docs/objects/Program.md b/docs/objects/Program.md index 5c5f557..a4c2a27 100644 --- a/docs/objects/Program.md +++ b/docs/objects/Program.md @@ -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:**-
-**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
+#### Parameters:-
+#### 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
## 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)
-**returns:** self
+#### Parameters: string filepath - (the path to the program you want to execute)
+#### Returns: self
## 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:**-
-**returns:** self
+#### Parameters:-
+#### Returns: self
## 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
-**returns:** self
+#### Parameters: boolean pause
+#### Returns: self
## 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:** -
-**returns:** boolean isPaused
+#### Parameters: -
+#### Returns: boolean isPaused
## 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
-**returns:** self
+#### Parameters: string event, any parameter, any parameter, any parameter, any parameter, boolean ignorePause
+#### Returns: self
## 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
-**returns:** self
+#### Parameters: string event, any parameter, any parameter, any parameter, any parameter, boolean ignorePause
+#### Returns: self
## 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:** -
-**returns:** table queuedEvents
+#### Parameters: -
+#### Returns: table queuedEvents
## 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
-**returns:** self
+#### Parameters: table queuedEvents
+#### Returns: self
diff --git a/docs/objects/Radio.md b/docs/objects/Radio.md index 18541f9..d95063b 100644 --- a/docs/objects/Radio.md +++ b/docs/objects/Radio.md @@ -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)
-**returns:** self
+#### 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)
+#### Returns: self
## 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
-**returns:** self
+#### Parameters: number index
+#### Returns: self
## 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 ...
-**returns:** self
+#### Parameters: number index, string text, number x, number y, number bgcolor, number fgcolor, any ...
+#### Returns: self
## 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
-**returns:** self
+#### Parameters: boolean isScrollable
+#### Returns: self
## 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
-**returns:** self
+#### Parameters: number index
+#### Returns: self
## 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:** -
-**returns:** self
+#### Parameters: -
+#### Returns: self
## 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:** -
-**returns:** number index
+#### Parameters: -
+#### Returns: number index
## 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)
-**returns:** self
\ No newline at end of file +#### Parameters: number bgcolor, number fgcolor, boolean isActive (isActive means if different colors for selected item should be used)
+#### Returns: self
\ No newline at end of file diff --git a/docs/objects/Scrollbar.md b/docs/objects/Scrollbar.md index affe268..722ce3e 100644 --- a/docs/objects/Scrollbar.md +++ b/docs/objects/Scrollbar.md @@ -14,8 +14,8 @@ Changes the symbol local mainFrame = basalt.createFrame("myFirstFrame"):show() local aScrollbar = mainFrame:addScrollbar("myFirstScrollbar"):setSymbol("X"):show() ``` -**parameters:** char symbol
-**returns:** self
+#### Parameters: char symbol
+#### Returns: self
## 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
-**returns:** self
+#### Parameters: number symbolcolor
+#### Returns: self
## 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")
-**returns:** self
+#### Parameters: string value ("vertical" or "horizontal")
+#### Returns: self
## 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
-**returns:** self
+#### Parameters: any number
+#### Returns: self
diff --git a/docs/objects/Slider.md b/docs/objects/Slider.md index 44314be..570359e 100644 --- a/docs/objects/Slider.md +++ b/docs/objects/Slider.md @@ -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
-**returns:** self
+#### Parameters: char symbol
+#### Returns: self
## 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
-**returns:** self
+#### Parameters: number color
+#### Returns: self
## 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
-**returns:** self
+#### Parameters: number color
+#### Returns: self
## 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"
-**returns:** self
+#### Parameters: string value ("vertical", "horizontal"
+#### Returns: self
diff --git a/docs/objects/Textfield.md b/docs/objects/Textfield.md index 8c5eab2..9c41370 100644 --- a/docs/objects/Textfield.md +++ b/docs/objects/Textfield.md @@ -18,8 +18,8 @@ local mainFrame = basalt.createFrame("myFirstFrame"):show() local aTextfield = mainFrame:addTextfield("myFirstTextfield"):show() basalt.debug(aTextfield:getLines()) ``` -**parameters:** -
-**returns:** table lines
+#### Parameters: -
+#### Returns: table lines
## 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
-**returns:** string line
+#### Parameters: number index
+#### Returns: string line
## 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
-**returns:** self
+#### Parameters: number index, string text
+#### Returns: self
## 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
-**returns:** self
+#### Parameters: string text, number index
+#### Returns: self
## 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
-**returns:** self
+#### Parameters: number index
+#### Returns: self
## 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:** -
-**returns:** number x, number y
\ No newline at end of file +#### Parameters: -
+#### Returns: number x, number y
\ No newline at end of file diff --git a/docs/objects/Thread.md b/docs/objects/Thread.md index 19e5683..aa00172 100644 --- a/docs/objects/Thread.md +++ b/docs/objects/Thread.md @@ -15,8 +15,8 @@ local function randomThreadFunction() end aThread:start(randomThreadfunction) ``` -**parameters:**function func
-**returns:** self
+#### Parameters:function func
+#### Returns: self
## 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:** -
-**returns:** string "running" - if its running, "normal" - is active but not running (waiting for a event), "suspended" - is suspended
+#### Parameters: -
+#### Returns: string "running" - if its running, "normal" - is active but not running (waiting for a event), "suspended" - is suspended
## 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:** -
-**returns:** self
\ No newline at end of file +#### Parameters: -
+#### Returns: self
\ No newline at end of file diff --git a/docs/objects/Timer.md b/docs/objects/Timer.md index 7c7dd33..68c61ae 100644 --- a/docs/objects/Timer.md +++ b/docs/objects/Timer.md @@ -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)
-**returns:** self
+#### Parameters:number time[, number repeats] - (time in seconds, if repeats is -1 it will call the function infinitly (every x seconds)
+#### Returns: self
## start starts the timer @@ -19,8 +19,8 @@ local mainFrame = basalt.createFrame("myFirstFrame"):show() local aTimer = mainFrame:addTimer("myFirstTimer") aTimer:setTime(5):start() ``` -**parameters:** -
-**returns:** self
+#### Parameters: -
+#### Returns: self
## cancel stops/cancels the timer @@ -30,8 +30,8 @@ local aTimer = mainFrame:addTimer("myFirstTimer") aTimer:setTime(5):start() aTimer:cancel() ``` -**parameters:** -
-**returns:** self
+#### Parameters: -
+#### Returns: self
## onCall @@ -45,5 +45,5 @@ local aTimer = mainFrame:addTimer("myFirstTimer") aTimer:setTime(5):onCall(timerCall):start() ``` -**parameters:** function func
-**returns:** self
+#### Parameters: function func
+#### Returns: self