diff options
| author | Jeremy Rimpo <jeremy.rimpo@servermonkey.com> | 2023-09-27 15:28:04 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-09-27 15:28:04 -0500 |
| commit | e7ee47b6e21be6741e11723b4ac4719d82d70d4b (patch) | |
| tree | 411ea3a8eb5d07eee9cd15dd3d34c29c6f9f8b76 /src/tutorials/tutorials.js | |
| parent | 79d457f598bcfa7a8d094a87033a31f370c9c4c1 (diff) | |
| parent | 523ea046a9f68846be0e28321ce38d94553d33ec (diff) | |
Merge pull request #1883 from ModOrganizer2/tutorial_updates
Tutorial updates
Diffstat (limited to 'src/tutorials/tutorials.js')
| -rw-r--r-- | src/tutorials/tutorials.js | 47 |
1 files changed, 22 insertions, 25 deletions
diff --git a/src/tutorials/tutorials.js b/src/tutorials/tutorials.js index cdb16d59..a0348420 100644 --- a/src/tutorials/tutorials.js +++ b/src/tutorials/tutorials.js @@ -31,51 +31,48 @@ function highlightAction(actionName, click) { highlight.visible = true
}
-function unhighlight()
-{
+function unhighlight() {
highlight.visible = false
}
-function waitForClick()
-{
+function waitForClick() {
waitingForClick = true;
description.continueVisible = true
// ui needs to be locked, otherwise the tutorial-view does not receive mouse-events!
tutorialControl.lockUI(true)
}
-function clickNext()
-{
+function cancelTutorial() {
+ tutorialControl.finish()
+}
+
+function clickNext() {
if (waitingForClick) {
nextStep()
}
}
-function nextStep()
-{
- waitingForClick = false;
- description.continueVisible = false
- if (step < tutorialSteps.length) {
- tutorialControl.lockUI(false)
- step++
- tutorialSteps[step - 1]()
- } else {
- tutorialControl.finish()
- }
+function nextStep() {
+ waitingForClick = false;
+ description.continueVisible = false
+ if (step < tutorialSteps.length) {
+ tutorialControl.lockUI(false)
+ step++
+ tutorialSteps[step - 1]()
+ } else {
+ tutorialControl.finish()
+ }
}
-function sameStep()
-{
- tutorialSteps[step - 1]()
+function sameStep() {
+ tutorialSteps[step - 1]()
}
-function onTabChanged(func)
-{
- tutToplevel.tabChanged.connect(func)
+function onTabChanged(func) {
+ tutToplevel.tabChanged.connect(func)
}
-function init()
-{
+function init() {
var res = Qt.include("file:///" + scriptName)
if (res.status !== 0) {
console.log("failed to load " + scriptName + ": " + res.status)
|
