Skip to content

Instantly share code, notes, and snippets.

@quickredfox
Created March 13, 2011 22:47
Show Gist options
  • Save quickredfox/868516 to your computer and use it in GitHub Desktop.
Save quickredfox/868516 to your computer and use it in GitHub Desktop.
###
This file changes for every book, could be stored in database
###
BOOK.THEME = 1
BOOK.SECTION = 3
###
Here we declare the image files for the toy chest.
###
BOOK.TOYS=[
"chateau"
"pelle-rouge"
"pelle-bleue"
"sceaux"
"etoile-rouge"
"drapeau-bleu"
"drapeau-vert"
"drapeau-rouge"
"coquillage-1"
"coquillage-2"
"cailloux"
]
BOOK.TOOLS =
[
name: 'crayon'
title: 'Crayon'
icons: [ "crayon-1.png", "efface.png" ]
,
name: 'mains'
title: 'Mains'
icons: [1..5].map( (n)-> "main-gauche-#{n}.png" ).concat [1..5].map (n)-> "main-droite-#{n}.png"
,
name: 'des'
title: 'Dés'
icons: [1..6].map (n)-> "bleu/de-#{n}.png"
# ,
# name: 'dominos'
# title: 'Dominos'
# icons: [ 1, 2, 3, 4, 5, 6, 11, 12, 13, 14, 15, 16, 21, 22, 23, 24, 25, 26, 31, 32, 33, 34, 35, 36, 41, 42, 43, 44, 45, 46, 51, 52, 53, 54, 55, 56, 61, 62, 63, 64, 65, 66 ].map (n)-> "orange/domino-#{n}.png"
,
name: 'jetons'
title: 'Jetons'
icons: ['bleu','orange','rouge','vert'].map (c)-> "#{c}/jetons.png"
,
name: 'cartes'
title: 'Cartes'
icons: [1..10].map (n)-> "carreau/carte-#{n}.png"
]
###
Holds the textual contents, behavior and recipes of
each page.
###
BOOK.PAGES = [
# PAGE 1
# content
text: "De quelle facon peut-tu denombrer ces elements?"
note: '''
Thème 1: Des vacances à la plage
Section 3:
TODO: complete this note
'''
# settings
trigger: ['refresh','openchest']
background: 'p1-panel.png'
images: [
["pelle-rouge",{top:10,left:300}]
["pelle-rouge",{top:200,left:200}]
["pelle-rouge",{top:320,left:100}]
["pelle-rouge",{top:30,left:10}]
["pelle-rouge",{top:230,left:300}]
["pelle-rouge",{top:370,left:200}]
["pelle-rouge",{top:200,left:100}]
["sceaux",{top:450,left:120}]
["sceaux",{top:250,left:20}]
["sceaux",{top:450,left:90}]
["sceaux",{top:350,left:300}]
["sceaux",{top:450,left:800}]
["etoile-rouge",{top:530,left:700}]
["etoile-rouge",{top:230,left:600}]
["etoile-rouge",{top:130,left:500}]
["etoile-rouge",{top:30,left:400}]
["etoile-rouge",{top:30,left:300}]
["etoile-rouge",{top:430,left:200}]
["drapeau-bleu",{top:330,left:100}]
["drapeau-bleu",{top:230,left:90}]
["drapeau-rouge",{top:60,left:770}]
["drapeau-rouge",{top:90,left:870}]
["drapeau-vert",{top:123,left:570}]
["drapeau-vert",{top:500,left:670}]
]
# PAGE 2
# content
text: "TEXT page 2"
note: '''
Thème 1: Des vacances à la plage
Section 3:
TODO: complete this note
'''
# settings
trigger: ['refresh','openchest']
background: 'p1-panel.png'
images: [
["pelle-rouge",{top:10,left:300}]
["pelle-rouge",{top:200,left:200}]
["pelle-rouge",{top:320,left:100}]
["pelle-rouge",{top:30,left:10}]
["pelle-rouge",{top:230,left:300}]
["pelle-rouge",{top:370,left:200}]
["pelle-rouge",{top:200,left:100}]
["sceaux",{top:450,left:120}]
["sceaux",{top:250,left:20}]
["sceaux",{top:450,left:90}]
["sceaux",{top:350,left:300}]
["sceaux",{top:450,left:800}]
["etoile-rouge",{top:530,left:700}]
["etoile-rouge",{top:230,left:600}]
["etoile-rouge",{top:130,left:500}]
["etoile-rouge",{top:30,left:400}]
["etoile-rouge",{top:30,left:300}]
["etoile-rouge",{top:430,left:200}]
["drapeau-bleu",{top:330,left:100}]
["drapeau-bleu",{top:230,left:90}]
["drapeau-rouge",{top:60,left:770}]
["drapeau-rouge",{top:90,left:870}]
["drapeau-vert",{top:123,left:570}]
["drapeau-vert",{top:500,left:670}]
]
]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment