Skip to content

Commit 0f66f9e

Browse files
committed
How it works
1 parent bae0631 commit 0f66f9e

File tree

4 files changed

+40
-0
lines changed

4 files changed

+40
-0
lines changed

resources/ecs/examples.ecs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,7 @@ Start:
9393
on click HowItWorks
9494
begin
9595
alert `How it works`
96+
send `howitworks` to parent
9697
end
9798

9899
stop

resources/ecs/howitworks.ecs

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
! HowItWorks
2+
3+
script HowItWorks
4+
5+
import module Showdown
6+
7+
variable Script
8+
variable Message
9+
10+
rest get Script from `/resources/md/howitworks.md`
11+
12+
on message
13+
begin
14+
put the message into Message
15+
if Message is `restore` send `show` to parent
16+
else if Message is `pause` begin end
17+
else go to Start
18+
end
19+
20+
set ready
21+
stop
22+
23+
Start:
24+
send Script to Showdown
25+
stop

resources/ecs/main.ecs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
module LifeModule
3535
module TechnicalModule
3636
module WordPressModule
37+
module HowItWorksModule
3738
module CurrentModule
3839
variable Script
3940
variable ButtonStyle
@@ -62,6 +63,7 @@
6263
send `resume` to CurrentModule
6364
end
6465
else if Message is `life` go to ShowLife
66+
else if Message is `howitworks` go to ShowHowItWorks
6567
end
6668

6769
BuildPage:
@@ -122,6 +124,8 @@ BuildPage:
122124
run Script with ShowdownModule as TechnicalModule
123125
rest get Script from `/resources/ecs/wordpress.ecs`
124126
run Script with ShowdownModule as WordPressModule
127+
rest get Script from `/resources/ecs/howitworks.ecs`
128+
run Script with ShowdownModule as HowItWorksModule
125129

126130
alias CurrentModule to HomeModule
127131
send to HomeModule
@@ -288,6 +292,13 @@ ShowLife:
288292
send to LifeModule
289293
stop
290294

295+
ShowHowItWorks:
296+
gosub to DeselectAllButtons
297+
send `pause` to CurrentModule
298+
alias CurrentModule to HowItWorksModule
299+
send to HowItWorksModule
300+
stop
301+
291302
DeselectAllButtons:
292303
set style `background` of HomeButton to ``
293304
set style `background` of IntroButton to ``

resources/md/howitworks.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# How It Works
2+
3+
This is a description of the interaction between the ~ec~ and the Markdown scripts to power this website.

0 commit comments

Comments
 (0)