hopeful formatting update

This commit is contained in:
Samuel Pizette
2022-05-30 23:44:33 -04:00
parent f5ee3c7880
commit 3af8854743

View File

@@ -12,8 +12,10 @@ Now you are able to call all these functions:
Create a frame without a parent Create a frame without a parent
#### Parameters: #### Parameters:
1. `string` name 1. `string` name
#### Returns: #### Returns:
1. `frame` object 1. `frame` object
#### Usage: #### Usage:
* Create and show a frame with id "myFirstFrame" * Create and show a frame with id "myFirstFrame"
````lua ````lua
@@ -22,8 +24,10 @@ local mainFrame = basalt.createFrame("myFirstFrame"):show()
## basalt.removeFrame ## basalt.removeFrame
Removes a frame (only possible for non-parent frames) Removes a frame (only possible for non-parent frames)
#### Parameters: #### Parameters:
1. `string` name 1. `string` name
#### Usage: #### Usage:
* Removes the previously created frame with id "myFirstFrame" * Removes the previously created frame with id "myFirstFrame"
````lua ````lua
@@ -35,8 +39,10 @@ basalt.removeFrame("myFirstFrame")
With that function you can get frames, but only frames without a parent! With that function you can get frames, but only frames without a parent!
#### Parameters: #### Parameters:
1. `string` name 1. `string` name
#### Returns: #### Returns:
1. `frame` object 1. `frame` object
#### Usage: #### Usage:
* Creates, fetches and shows the "myFirstFrame" object * Creates, fetches and shows the "myFirstFrame" object
````lua ````lua
@@ -47,8 +53,10 @@ basalt.getFrame("myFirstFrame"):show()
## basalt.getActiveFrame ## basalt.getActiveFrame
Returns the currently active (without a parent) frame Returns the currently active (without a parent) frame
#### Returns: #### Returns:
1. `frame` The current frame 1. `frame` The current frame
#### Usage: #### Usage:
* Displays the active frame name in the debug console * Displays the active frame name in the debug console
````lua ````lua
@@ -58,6 +66,7 @@ basalt.debug(basalt.getActiveFrame():getName()) -- returns myFirstFrame
## basalt.autoUpdate ## basalt.autoUpdate
Starts the draw and event handler until basalt.stopUpdate() is called Starts the draw and event handler until basalt.stopUpdate() is called
#### Usage: #### Usage:
* Enable the basalt updates, otherwise the screen will not continue to update * Enable the basalt updates, otherwise the screen will not continue to update
````lua ````lua
@@ -68,9 +77,11 @@ basalt.autoUpdate()
## basalt.update ## basalt.update
Calls the draw and event handler method once Calls the draw and event handler method once
#### Parameters: #### Parameters:
1. `string` The event to be received 1. `string` The event to be received
2. `...` Additional event variables to capture 2. `...` Additional event variables to capture
#### Usage: #### Usage:
* Prints "Left Mouse Button clicked!" when clicked * Prints "Left Mouse Button clicked!" when clicked
````lua ````lua
@@ -85,6 +96,7 @@ quitButton:onClick(
## basalt.stopUpdate ## basalt.stopUpdate
Stops the draw and event handler _(including, but not limited to mouse clicks)_ Stops the draw and event handler _(including, but not limited to mouse clicks)_
#### Usage: #### Usage:
* When the quit button is clicked, the button stops basalt updates and clears the terminal * When the quit button is clicked, the button stops basalt updates and clears the terminal
````lua ````lua
@@ -101,8 +113,10 @@ quitButton:onClick(
## basalt.debug ## basalt.debug
creates a label with some information on the main frame on the bottom left, if you click on that label it will open a log view for you see it as the new print for debugging creates a label with some information on the main frame on the bottom left, if you click on that label it will open a log view for you see it as the new print for debugging
#### Parameters: #### Parameters:
1. `...` (multiple parameters are possible, like print does)<br> 1. `...` (multiple parameters are possible, like print does)<br>
#### Usage: #### Usage:
* Prints "Hello! ^-^" to the debug console * Prints "Hello! ^-^" to the debug console
````lua ````lua