From 9acf7d53455ca455419c8c8fe7db433b917dbd3e Mon Sep 17 00:00:00 2001 From: Erb3 <49862976+Erb3@users.noreply.github.com> Date: Sat, 17 Sep 2022 14:33:04 +0200 Subject: [PATCH] Docs: Basalt.stopUpdate --- docs/objects/Basalt.md | 2 +- docs/objects/Basalt/stopUpdate.md | 15 ++++++++++----- 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/docs/objects/Basalt.md b/docs/objects/Basalt.md index 41e3e12..4f012ec 100644 --- a/docs/objects/Basalt.md +++ b/docs/objects/Basalt.md @@ -28,7 +28,7 @@ You are now able to access the following list of methods: |[setActiveFrame](objects/Basalt/setActiveFrame.md)|Sets the active frame |[setTheme](objects/Basalt/setTheme.md)|Changes the base theme of basalt |[setVariable](objects/Basalt/setVariable.md)|Sets a variable which you can access via XML -|[stopUpdate](objects/Basalt/stopUpdate.md)|Stops the currently active event and draw listener +|[stopUpdate / stop](objects/Basalt/stopUpdate.md)|Stops the currently active event and draw listener |[update](objects/Basalt/update.md)|Starts the event and draw listener once ## Examples diff --git a/docs/objects/Basalt/stopUpdate.md b/docs/objects/Basalt/stopUpdate.md index dede180..fcd9147 100644 --- a/docs/objects/Basalt/stopUpdate.md +++ b/docs/objects/Basalt/stopUpdate.md @@ -1,15 +1,20 @@ -## basalt.stopUpdate or basalt.stop -Stops the automatic draw and event handler which got started by basalt.autoUpdate() -#### Usage: +# basalt.stopUpdate or basalt.stop + +Stops the automatic draw and event handler which got started by `basalt.autoUpdate()`. +`basalt.autoUpdate(false)` also does the same. + +## Usage + * When the quit button is clicked, the button stops basalt's event listeners and draw handlers + ```lua local main = basalt.createFrame() -local aButton = main:addButton() +main:addButton() :setPosition(2,2) :setText("Stop Basalt!") :onClick(function() basalt.stopUpdate() end) basalt.autoUpdate() -``` \ No newline at end of file +```