fixed-weird-format-indent

This commit is contained in:
Samkist
2022-06-02 17:24:37 -04:00
parent 8bbe7a67df
commit 8feec5f9f1

View File

@@ -68,8 +68,10 @@ Sets the frame's bar-text alignment
#### Parameters: #### Parameters:
1. `string` Can be supplied with "left", "center", or "right" 1. `string` Can be supplied with "left", "center", or "right"
#### Returns: #### Returns:
1. `frame` The frame being used 1. `frame` The frame being used
#### Usage: #### Usage:
* Set the title of myFrame to "My first frame!", and align it to the right. * Set the title of myFrame to "My first frame!", and align it to the right.
````lua ````lua
@@ -78,10 +80,13 @@ local mainFrame = myFrame:setBar("My first Frame!"):setBarTextAlign("right")
## showBar ## showBar
Toggles the frame's upper bar Toggles the frame's upper bar
#### Parameters: #### Parameters:
1. `boolean | nil` Whether the frame's bar is visible or if supplied `nil`, is automatically visible 1. `boolean | nil` Whether the frame's bar is visible or if supplied `nil`, is automatically visible
#### Returns: #### Returns:
1. `frame` The frame being used 1. `frame` The frame being used
#### Usage: #### Usage:
* Sets myFrame to have a bar titled "Hello World!" and subsequently displays it. * Sets myFrame to have a bar titled "Hello World!" and subsequently displays it.
````lua ````lua
@@ -90,10 +95,13 @@ local mainFrame = myFrame:setBar("Hello World!"):showBar()
## addMonitor ## addMonitor
adds a monitor to the active main frame. adds a monitor to the active main frame.
#### Parameters: #### Parameters:
1. `string` The monitor name ("right", "left",... "monitor_1", "monitor_2",...) 1. `string` The monitor name ("right", "left",... "monitor_1", "monitor_2",...)
#### Returns: #### Returns:
1. `frame` returns a frame which you can use like normal frames 1. `frame` returns a frame which you can use like normal frames
#### Usage: #### Usage:
* Adds a monitor to the mainFrame. Only as long as this frame is also the active Frame, the monitor will be shown. * Adds a monitor to the mainFrame. Only as long as this frame is also the active Frame, the monitor will be shown.
````lua ````lua
@@ -105,10 +113,13 @@ monitor1:setBar("Monitor 1"):showBar()
## setMonitorScale ## setMonitorScale
changes the monitor scale (almost the same as setTextScale()) changes the monitor scale (almost the same as setTextScale())
#### Parameters: #### Parameters:
1. `number` Possible values are: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 (1 is the same as 0.5 by setTextScale, and 10 is the same as 5) 1. `number` Possible values are: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 (1 is the same as 0.5 by setTextScale, and 10 is the same as 5)
#### Returns: #### Returns:
1. `monitor` The monitor being used 1. `monitor` The monitor being used
#### Usage: #### Usage:
* Changes the monitor scale to 2 * Changes the monitor scale to 2
````lua ````lua
@@ -124,8 +135,10 @@ Returns true if the user is currently holding the respective key down
#### Parameters: #### Parameters:
1. `number | string` - Any os.queueEvent("key") key, or you can use the following strings: "shift", "ctrl", "alt" 1. `number | string` - Any os.queueEvent("key") key, or you can use the following strings: "shift", "ctrl", "alt"
#### Returns: #### Returns:
1. `boolean` - Whether the user is holding the key down 1. `boolean` - Whether the user is holding the key down
#### Usage: #### Usage:
* Checks if the "shift" modifier is active on the myFrame frame * Checks if the "shift" modifier is active on the myFrame frame
````lua ````lua
@@ -150,8 +163,10 @@ Returns a child object of the frame
#### Parameters: #### Parameters:
1. `string` The name of the child object 1. `string` The name of the child object
#### Returns: #### Returns:
1. `object | nil` The object with the supplied name, or `nil` if there is no object present with the given name 1. `object | nil` The object with the supplied name, or `nil` if there is no object present with the given name
#### Usage: #### Usage:
* Adds a button with id "myFirstButton", then retrieves it again through the frame object * Adds a button with id "myFirstButton", then retrieves it again through the frame object
````lua ````lua
@@ -161,10 +176,13 @@ local aButton = myFrame:getObject("myFirstButton")
## removeObject ## removeObject
Removes a child object from the frame Removes a child object from the frame
#### Parameters: #### Parameters:
1. `string` The name of the child object 1. `string` The name of the child object
#### Returns: #### Returns:
1. `boolean` Whether the object with the given name was properly removed 1. `boolean` Whether the object with the given name was properly removed
#### Usage: #### Usage:
* Adds a button with the id "myFirstButton", then removes it with the aforementioned id * Adds a button with the id "myFirstButton", then removes it with the aforementioned id
````lua ````lua
@@ -177,8 +195,10 @@ Sets the currently focused object
#### Parameters: #### Parameters:
1. `object` The child object to focus on 1. `object` The child object to focus on
#### Returns: #### Returns:
1. `frame` The frame being used 1. `frame` The frame being used
#### Usage: #### Usage:
* Creates button with id "myFirstButton", sets the focused object to the previously mentioned button * Creates button with id "myFirstButton", sets the focused object to the previously mentioned button
````lua ````lua
@@ -187,10 +207,13 @@ myFrame:setFocusedObject(aButton)
```` ````
## removeFocusedObject ## removeFocusedObject
Removes the focus of the supplied object Removes the focus of the supplied object
#### Parameters: #### Parameters:
1. `object` The child object to remove focus from 1. `object` The child object to remove focus from
#### Returns: #### Returns:
1. `frame` The frame being used 1. `frame` The frame being used
#### Usage: #### Usage:
* Creates a button with id "myFirstButton", then removes the focus from that button * Creates a button with id "myFirstButton", then removes the focus from that button
````lua ````lua
@@ -200,9 +223,9 @@ myFrame:removeFocusedObject(aButton)
## getFocusedObject ## getFocusedObject
Gets the currently focused object Gets the currently focused object
#### Parameters:
#### Returns: #### Returns:
1. `object` The currently focused object 1. `object` The currently focused object
#### Usage: #### Usage:
* Gets the currently focused object from the frame, storing it in a variable * Gets the currently focused object from the frame, storing it in a variable
````lua ````lua
@@ -213,8 +236,10 @@ local focusedObject = myFrame:getFocusedObject()
Sets whether the frame can be moved. _In order to move the frame click and drag the upper bar of the frame_ Sets whether the frame can be moved. _In order to move the frame click and drag the upper bar of the frame_
#### Parameters: #### Parameters:
1. `boolean` Whether the object is movable 1. `boolean` Whether the object is movable
#### Returns: #### Returns:
1. `frame` The frame being used 1. `frame` The frame being used
#### Usage: #### Usage:
* Creates a frame with id "myFirstFrame" and makes it movable * Creates a frame with id "myFirstFrame" and makes it movable
````lua ````lua
@@ -227,8 +252,10 @@ local myFrame = basalt.createFrame("myFirstFrame"):setMovable(true)
Sets whether the frame can be moved. _In order to move the frame use the upper bar of the frame_ Sets whether the frame can be moved. _In order to move the frame use the upper bar of the frame_
#### Parameters: #### Parameters:
1. `boolean` Whether the object is movable 1. `boolean` Whether the object is movable
#### Returns: #### Returns:
1. `frame` The frame being used 1. `frame` The frame being used
#### Usage: #### Usage:
* Creates a frame with id "myFirstFrame" and makes it movable * Creates a frame with id "myFirstFrame" and makes it movable
````lua ````lua
@@ -244,8 +271,10 @@ The function can be supplied negative offsets
#### Parameters: #### Parameters:
1. `number` The x direction offset (+/-) 1. `number` The x direction offset (+/-)
2. `number` The y direction offset (+/-) 2. `number` The y direction offset (+/-)
#### Returns: #### Returns:
1. `frame` The frame being used 1. `frame` The frame being used
#### Usage: #### Usage:
* Creates "myFirstFrame" with an x offset of 5 and a y offset of 3 * Creates "myFirstFrame" with an x offset of 5 and a y offset of 3
````lua ````lua