Skip to content
This repository was archived by the owner on Aug 31, 2021. It is now read-only.

Commit ce4402d

Browse files
committed
[[Interactive Tutorial]] Adds tutorial options to the Start Center
The Start Center now has a sub-menu after seleecting "Interactive Welcome". The user can choose from 3 tutorial options.
1 parent 94b48d0 commit ce4402d

1 file changed

Lines changed: 36 additions & 3 deletions

File tree

Toolset/palettes/start center/revStartCenterBehavior.livecodescript

Lines changed: 36 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -260,6 +260,20 @@ function tilesArray pState
260260
put "lc-person" into tArray[8]["icon"]
261261
put "lc-person-filled" into tArray[8]["hoverIcon"]
262262
break
263+
case "interactive_welcome"
264+
put "1. Hello World" into tArray[1]["label"]
265+
put "tutorial_hello_world" into tArray[1]["tag"]
266+
put "lc-hello-world" into tArray[1]["icon"]
267+
put "lc-hello-world-filled" into tArray[1]["hoverIcon"]
268+
put "2. To Do List" into tArray[2]["label"]
269+
put "tutorial_todo_list" into tArray[2]["tag"]
270+
put "lc-todo-list" into tArray[2]["icon"]
271+
put "lc-todo-list-filled" into tArray[2]["hoverIcon"]
272+
put "3. BMI Calculator" into tArray[3]["label"]
273+
put "tutorial_bmi_calculator" into tArray[3]["tag"]
274+
put "lc-bmi-calculator" into tArray[3]["icon"]
275+
put "lc-bmi-calculator-filled" into tArray[3]["hoverIcon"]
276+
break
263277
case "new"
264278
put "New Stack" into tArray[1]["label"]
265279
put "newStackDefault" into tArray[1]["tag"]
@@ -384,7 +398,20 @@ on startCenterAction pAction
384398
local tStackName, tArray
385399
switch pAction
386400
case "interactive_welcome"
387-
tourStart
401+
--tourStart
402+
put "Home / Interactive Welcome" into field "breadcrumb"
403+
set the textStyle of word 1 of field "breadcrumb" to "link"
404+
put tilesArray(pAction) into tArray
405+
tilesUpdate tArray
406+
break
407+
case "tutorial_hello_world"
408+
tutorialStart "Hello World"
409+
break
410+
case "tutorial_todo_list"
411+
tutorialStart "To Do List"
412+
break
413+
case "tutorial_bmi_calculator"
414+
tutorialStart "BMI Calculator"
388415
break
389416
case "new"
390417
put "Home / New" into field "breadcrumb"
@@ -497,11 +524,17 @@ end firstRunVisible
497524

498525
command tourStart
499526
lock screen
500-
revIDEStartTutorial "First Run", "BMI Calculator", "App Lesson"
527+
tutorialStart "Hello World", "App Lesson"
528+
unlock screen
529+
end tourStart
530+
531+
command tutorialStart pTutorial
532+
lock screen
533+
revIDEStartTutorial "First Run", pTutorial, "App Lesson"
501534
revIDESetPreference "StartCenterClassic", "true"
502535
startCenterClose
503536
unlock screen
504-
end tourStart
537+
end tutorialStart
505538

506539
## Banner
507540
command bannerInitialise

0 commit comments

Comments
 (0)