diff --git a/docs/index.html b/docs/index.html index 7006a2b..39e924f 100644 --- a/docs/index.html +++ b/docs/index.html @@ -40,7 +40,7 @@ loadSidebar: true, loadFooter: '_footer.md', autoHeader: true, - subMaxLevel: 2, + subMaxLevel: 3, homepage: 'Home.md', name: 'Basalt', repo: 'https://github.com/Pyroxenium/Basalt', diff --git a/docs/objects/Basalt/autoUpdate.md b/docs/objects/Basalt/autoUpdate.md index b74a259..566409f 100644 --- a/docs/objects/Basalt/autoUpdate.md +++ b/docs/objects/Basalt/autoUpdate.md @@ -1,13 +1,14 @@ +# Basalt -# basalt.autoUpdate +## autoUpdate This starts the event and draw handler for you. The listeners will run until you stop them. -## Parameters +### Parameters 1. `boolean` optional - if you use false as the first parameter it would stop the listeners. Using false is a synonym for [`basalt.stopUpdate()`](objects/Basalt/stopUpdate.md). -## Usage +### Usage * Enables the basalt listeners, otherwise the screen will not continue to update diff --git a/docs/objects/Basalt/createFrame.md b/docs/objects/Basalt/createFrame.md index e84ec94..0712d67 100644 --- a/docs/objects/Basalt/createFrame.md +++ b/docs/objects/Basalt/createFrame.md @@ -1,20 +1,21 @@ +# Basalt -# basalt.createFrame +## createFrame Creates a new base-frame, you can have as many base-frames as you want, but only 1 can be active (visible) at the same time. You can always switch between your base frames. Only the currently active base-frame listens to incoming events (except for some events like time-events and peripheral-events) -## Parameters +### Parameters 1. `string` id - optional (if you dont set a id it will automatically create a uuid for you) -## Returns +### Returns 1. `frame` object -## Usage +### Usage * How to use multiple base frames: diff --git a/docs/objects/Basalt/debug.md b/docs/objects/Basalt/debug.md index b824186..3e9e09a 100644 --- a/docs/objects/Basalt/debug.md +++ b/docs/objects/Basalt/debug.md @@ -1,5 +1,6 @@ +# Basalt -# basalt.debug +## debug Creates a label with some information on the main frame on the bottom left. When you click on that label it will open a log view for you. See it as the new print for debugging @@ -8,11 +9,11 @@ which returns the debug Label. `basalt.debugFrame` and `basalt.debugList` are also available. -## Parameters +### Parameters 1. `...` (multiple parameters are possible, like print does) -## Usage +### Usage * Prints "Hello! ^-^" to the debug console diff --git a/docs/objects/Basalt/getActiveFrame.md b/docs/objects/Basalt/getActiveFrame.md index e778c7d..31d7f07 100644 --- a/docs/objects/Basalt/getActiveFrame.md +++ b/docs/objects/Basalt/getActiveFrame.md @@ -1,13 +1,14 @@ +# Basalt -# basalt.getActiveFrame +## getActiveFrame Returns the currently active/visible base frame. -## Returns +### Returns 1. `frame` The current frame -## Usage +### Usage * Displays the active frame name in the debug console diff --git a/docs/objects/Basalt/getFrame.md b/docs/objects/Basalt/getFrame.md index cf9b328..aac6729 100644 --- a/docs/objects/Basalt/getFrame.md +++ b/docs/objects/Basalt/getFrame.md @@ -1,17 +1,18 @@ +# Basalt -# basalt.getFrame +## getFrame Returns a base frame by the given id. -## Parameters +### Parameters 1. `string` id -## Returns +### Returns 1. `frame` The frame with the supplied id. -## Usage +### Usage * Creates, fetches and shows the "myFirstFrame" object diff --git a/docs/objects/Basalt/getTheme.md b/docs/objects/Basalt/getTheme.md index c80f729..bd5361c 100644 --- a/docs/objects/Basalt/getTheme.md +++ b/docs/objects/Basalt/getTheme.md @@ -1,14 +1,15 @@ +# Basalt -# basalt.getTheme +## basalt.getTheme Returns the current base-theme. This base-theme can be set using setTheme.md. A list of base-theme keys can be found [here](https://github.com/Pyroxenium/Basalt/blob/master/Basalt/theme.lua). -## Returns +### Returns 1. `number` The color of the requested base-theme key. -## Usage +### Usage * Displays the color of the main background in the debug console diff --git a/docs/objects/Basalt/getVariable.md b/docs/objects/Basalt/getVariable.md index 84b6a15..980547c 100644 --- a/docs/objects/Basalt/getVariable.md +++ b/docs/objects/Basalt/getVariable.md @@ -1,12 +1,14 @@ -# basalt.getVariable +# Basalt + +## getVariable Returns a variable defined with [setVariable](objects/Basalt/setVariable) -## Returns +### Returns 1. `variable` The variable stored -## Usage +### Usage * Displays the stored variable in the debug console diff --git a/docs/objects/Basalt/getVersion.md b/docs/objects/Basalt/getVersion.md index 7c4432a..d925c31 100644 --- a/docs/objects/Basalt/getVersion.md +++ b/docs/objects/Basalt/getVersion.md @@ -1,12 +1,14 @@ -# basalt.getVersion +# Basalt + +## getVersion Returns the currently active/visible base frame. -## Returns +### Returns 1. `string` The current version of Basalt -## Usage +### Usage * Displays the version of Basalt in the debug console diff --git a/docs/objects/Basalt/isKeyDown.md b/docs/objects/Basalt/isKeyDown.md index 1cf6e7c..3034550 100644 --- a/docs/objects/Basalt/isKeyDown.md +++ b/docs/objects/Basalt/isKeyDown.md @@ -1,17 +1,18 @@ +# Basalt -# basalt.isKeyDown +## isKeyDown Checks if the user is currently holding a key -## Parameters +### Parameters 1. `number` key code (use the [keys table](https://tweaked.cc/module/keys.html) for that) -## Returns +### Returns 1. `boolean` true or false -## Usage +### Usage * Shows a debug message with true or false if the left ctrl key is down, as soon as you click on the button. diff --git a/docs/objects/Basalt/log.md b/docs/objects/Basalt/log.md index 7482da3..8688114 100644 --- a/docs/objects/Basalt/log.md +++ b/docs/objects/Basalt/log.md @@ -1,13 +1,15 @@ -# basalt.log +# Basalt + +## log This writes something into a file. The main goal is to make debugging errors easier. Lets say you'r program is crashing and you don't know why, you could use basalt.log The log files will automatically removed after you start your program again. -## Parameters +### Parameters 1. `string` The text to write into the log file 2. `string` - optional (default: "Debug") - the type to write -## Usage +### Usage * Writes "Hello!" into the log file diff --git a/docs/objects/Basalt/onEvent.md b/docs/objects/Basalt/onEvent.md index 50646bb..a2b55f4 100644 --- a/docs/objects/Basalt/onEvent.md +++ b/docs/objects/Basalt/onEvent.md @@ -1,3 +1,5 @@ -# basalt.onEvent +# Basalt + +## onEvent TODO \ No newline at end of file diff --git a/docs/objects/Basalt/removeFrame.md b/docs/objects/Basalt/removeFrame.md index ff2d5f9..b941c7b 100644 --- a/docs/objects/Basalt/removeFrame.md +++ b/docs/objects/Basalt/removeFrame.md @@ -1,13 +1,14 @@ +# Basalt -# basalt.removeFrame +## removeFrame Removes the base frame by it's id. **This only works for base-frames.** -## Parameters +### Parameters 1. `string` id - ID of the base-frame. -## Usage +### Usage * Removes the previously created frame with id "secondBaseFrame" The frame id is gotten from a frame variable's `:getName()` diff --git a/docs/objects/Basalt/schedule.md b/docs/objects/Basalt/schedule.md index 78b9d6e..86e1159 100644 --- a/docs/objects/Basalt/schedule.md +++ b/docs/objects/Basalt/schedule.md @@ -1,17 +1,19 @@ -# basalt.schedule +# Basalt + +## schedule Schedules a function which gets called in a coroutine. After the coroutine is finished it will get destroyed immediatly. It's something like threads, but with some limits. **A guide can be found [here](/tips/logic).** -## Parameters +### Parameters 1. `function` a function which should get executed -## Returns +### Returns 1. `function` it returns the function which you have to execute in order to start the coroutine -## Usage +### Usage * Creates a schedule which switches the color between red and gray diff --git a/docs/objects/Basalt/setActiveFrame.md b/docs/objects/Basalt/setActiveFrame.md index 9a0f8bc..42ffe2f 100644 --- a/docs/objects/Basalt/setActiveFrame.md +++ b/docs/objects/Basalt/setActiveFrame.md @@ -1,11 +1,13 @@ -# basalt.setActiveFrame +# Basalt + +## setActiveFrame Sets what should be the active baseframe. -## Parameters +### Parameters 1. `frame` frame - The frame that should be the active base-frame. -## Usage +### Usage TODO \ No newline at end of file diff --git a/docs/objects/Basalt/setTheme.md b/docs/objects/Basalt/setTheme.md index c187324..3c4b3df 100644 --- a/docs/objects/Basalt/setTheme.md +++ b/docs/objects/Basalt/setTheme.md @@ -1,13 +1,14 @@ +# Basalt -# basalt.setTheme +## setTheme Sets the base theme of the project! Make sure to cover all existing objects, otherwise it will result in errors. A good example is [theme](https://github.com/Pyroxenium/Basalt/blob/master/Basalt/theme.lua). The theme can also be gotten with [`basalt.getTheme()`](objects/Basalt/getTheme) -## Parameters +### Parameters 1. `table` theme layout look into [theme](https://github.com/Pyroxenium/Basalt/blob/master/Basalt/theme.lua) for a example -## Usage +### Usage * Sets the default theme of basalt. diff --git a/docs/objects/Basalt/setVariable.md b/docs/objects/Basalt/setVariable.md index 773b9e5..6fed336 100644 --- a/docs/objects/Basalt/setVariable.md +++ b/docs/objects/Basalt/setVariable.md @@ -1,14 +1,15 @@ +# Basalt -# basalt.setVariable +## setVariable This stores a variable which you're able to access via xml. You are also able to add a function, which then gets called by object events created in XML. -## Parameters +### Parameters 1. `string` a key name 2. `any` any variable -## Usage +### Usage * Adds a function to basalt. diff --git a/docs/objects/Basalt/stopUpdate.md b/docs/objects/Basalt/stopUpdate.md index fcd9147..e52594a 100644 --- a/docs/objects/Basalt/stopUpdate.md +++ b/docs/objects/Basalt/stopUpdate.md @@ -1,10 +1,11 @@ +# Basalt -# basalt.stopUpdate or basalt.stop +## stopUpdate / stop Stops the automatic draw and event handler which got started by `basalt.autoUpdate()`. `basalt.autoUpdate(false)` also does the same. -## Usage +### Usage * When the quit button is clicked, the button stops basalt's event listeners and draw handlers diff --git a/docs/objects/Basalt/update.md b/docs/objects/Basalt/update.md index abcfffa..b66ebd6 100644 --- a/docs/objects/Basalt/update.md +++ b/docs/objects/Basalt/update.md @@ -1,15 +1,16 @@ +# Basalt -# basalt.update +## update Calls the draw and event handler once - this gives more flexibility about which events basalt should process. For example you could filter the terminate event. Which means you have to pass the events into basalt.update. -## Parameters +### Parameters 1. `string` The event to be received 2. `...` Additional event variables to capture -## Usage +### Usage * Creates and starts a custom update cycle