
Dialog = scape.tinyandbig.Dialog
Page = scape.tinyandbig.Page


function initDialogs()
  local dialogSystem = scape.tinyandbig.Level.currentAct().dialogSystem
  
  -- determies the turn over speed of the pages (bubbles)
  -- the turnOverFactor will be multiplied on the user defined bubble durations
  dialogSystem.turnOverFactor = 1.25
  
  -- Page description: Page(Texturename, Actor, BubbleDuration)
  -- Texturename:    string
  -- Actor:          Page.RADIO, Page.TINY, (Page.BIG)
  -- BubbleDuration: float (default = 5.0 seconds)
  
  -- Intro 
  local tutorialIntroDialog = Dialog("Controls")
  tutorialIntroDialog.pages:add(Page("controls.png", Page.RADIO, 8.0))
  dialogSystem.dialogs:add(tutorialIntroDialog)
  
  -- Intro 
  local tutorialIntroDialog = Dialog("TutorialIntro")
  tutorialIntroDialog.pages:add(Page("tutorial_intro_1.png", Page.RADIO, 5.0))
  tutorialIntroDialog.pages:add(Page("tutorial_intro_2.png", Page.TINY, 4.0))
  tutorialIntroDialog.pages:add(Page("tutorial_intro_3.png", Page.TINY, 3.0))
  tutorialIntroDialog.pages:add(Page("tutorial_intro_4.png", Page.RADIO, 7.0))
  tutorialIntroDialog.pages:add(Page("tutorial_intro_5.png", Page.TINY, 4.0))
  tutorialIntroDialog.pages:add(Page("tutorial_intro_6.png", Page.RADIO, 5.0))
  dialogSystem.dialogs:add(tutorialIntroDialog)

  -- Lesson 1
  local tutorialLesson1Dialog = Dialog("TutorialLesson1")
  tutorialLesson1Dialog.pages:add(Page("tutorial_lesson1_1.png", Page.RADIO, 4.0))
  tutorialLesson1Dialog.pages:add(Page("tutorial_lesson1_2.png", Page.RADIO, 6.0))
  dialogSystem.dialogs:add(tutorialLesson1Dialog)
  
  -- Lesson 1 to 2
  local tutorialXLesson1to2Dialog = Dialog("XTutorialLesson1to2")
  tutorialXLesson1to2Dialog.pages:add(Page("Xtutorial_lesson1_3.png", Page.RADIO, 3.0))
  tutorialXLesson1to2Dialog.pages:add(Page("Xtutorial_lesson1_4.png", Page.RADIO, 5.0))
  dialogSystem.dialogs:add(tutorialXLesson1to2Dialog)
  
  -- Lesson 2
  local tutorialLesson2Dialog = Dialog("TutorialLesson2")
  tutorialLesson2Dialog.pages:add(Page("tutorial_lesson2_1.png", Page.RADIO, 3.5))
  tutorialLesson2Dialog.pages:add(Page("tutorial_lesson2_2.png", Page.RADIO, 6.5))
  tutorialLesson2Dialog.pages:add(Page("tutorial_lesson2_3.png", Page.RADIO, 6.5))
  dialogSystem.dialogs:add(tutorialLesson2Dialog)
  
  -- Lesson 2 to 3
  local tutorialXLesson2to3Dialog = Dialog("XTutorialLesson2to3")
  tutorialXLesson2to3Dialog.pages:add(Page("Xtutorial_lesson2_4.png", Page.RADIO, 3.5))
  dialogSystem.dialogs:add(tutorialXLesson2to3Dialog)
  
  -- Lesson 3
  local tutorialLesson3Dialog = Dialog("TutorialLesson3")
  tutorialLesson3Dialog.pages:add(Page("tutorial_lesson3_1.png", Page.RADIO))
  dialogSystem.dialogs:add(tutorialLesson3Dialog)
  
  -- Tutorial end
  local tutorialEndDialog = Dialog("TutorialEnd")
  tutorialEndDialog.pages:add(Page("tutorial_ende_0.png", Page.RADIO, 2.0))
  tutorialEndDialog.pages:add(Page("tutorial_ende_1.png", Page.RADIO, 4.0))
  tutorialEndDialog.pages:add(Page("tutorial_ende_2.png", Page.TINY, 2.0))
  tutorialEndDialog.pages:add(Page("tutorial_ende_3.png", Page.RADIO, 5.0))
  dialogSystem.dialogs:add(tutorialEndDialog)
  
  -- Tutorial ladder
  local tutorialLadderDialog = Dialog("TutorialLadder")
  tutorialLadderDialog.pages:add(Page("tutorial_leiter_1.png", Page.TINY, 3.5))
  tutorialLadderDialog.pages:add(Page("tutorial_leiter_2.png", Page.RADIO, 6.0))
  dialogSystem.dialogs:add(tutorialLadderDialog)
  
  -- SaveMonkey
  local saveMonkeyDialog = Dialog("SaveMonkey")
  saveMonkeyDialog.pages:add(Page("savemonkey_1.png", Page.RADIO, 4.0))
  saveMonkeyDialog.pages:add(Page("savemonkey_2.png", Page.TINY, 2.5))
  saveMonkeyDialog.pages:add(Page("savemonkey_3.png", Page.RADIO, 2.5))
  scape.tinyandbig.Level.currentAct().dialogSystem.dialogs:add(saveMonkeyDialog)
  
  -- Bridge1
  local bridge1Dialog = Dialog("Bridge1")
  bridge1Dialog.pages:add(Page("bridge1_1.png", Page.RADIO, 3.5))
  scape.tinyandbig.Level.currentAct().dialogSystem.dialogs:add(bridge1Dialog)
  
  -- Pillar1
  local pillar1Dialog = Dialog("Pillar1")
  pillar1Dialog.pages:add(Page("pillar1_1.png", Page.RADIO, 3.5))
  scape.tinyandbig.Level.currentAct().dialogSystem.dialogs:add(pillar1Dialog)
  
  -- Bridge2
  local bridge2Dialog = Dialog("Bridge2")
  bridge2Dialog.pages:add(Page("bridge2_1.png", Page.RADIO, 6.5))
  bridge2Dialog.pages:add(Page("bridge2_2.png", Page.TINY, 5.5))
  bridge2Dialog.pages:add(Page("bridge2_3.png", Page.RADIO, 4.0))
  scape.tinyandbig.Level.currentAct().dialogSystem.dialogs:add(bridge2Dialog)
  
  -- Pillar2
  local pillar2Dialog = Dialog("Pillar2")
  pillar2Dialog.pages:add(Page("pillar2_1.png", Page.RADIO, 4.0))
  scape.tinyandbig.Level.currentAct().dialogSystem.dialogs:add(pillar2Dialog)
  
  -- Pillar3 (vor Steinschlagbruecke)
  local pillar3Dialog = Dialog("Pillar3")
  pillar3Dialog.pages:add(Page("pillar3_1.png", Page.TINY, 3.0))
  pillar3Dialog.pages:add(Page("pillar3_2.png", Page.RADIO, 4.0))
  scape.tinyandbig.Level.currentAct().dialogSystem.dialogs:add(pillar3Dialog)
  
  -- Pillar4 (jump'n'cut)
  local pillar4Dialog = Dialog("Pillar4")
  pillar4Dialog.pages:add(Page("pillar4_1.png", Page.RADIO, 3.0))
  scape.tinyandbig.Level.currentAct().dialogSystem.dialogs:add(pillar4Dialog)
  
  -- Pillar5
  local pillar5Dialog = Dialog("Pillar5")
  pillar5Dialog.pages:add(Page("pillar5_1.png", Page.RADIO))
  scape.tinyandbig.Level.currentAct().dialogSystem.dialogs:add(pillar5Dialog)
  
  -- VulcanoBridge
  local vulcanoBridgeDialog = Dialog("VulcanoBridge")
  vulcanoBridgeDialog.pages:add(Page("vulcanoBridge_1.png", Page.RADIO, 7.0))
  scape.tinyandbig.Level.currentAct().dialogSystem.dialogs:add(vulcanoBridgeDialog)
  
  -- VulcanoTop
  local vulcanoTopDialog = Dialog("VulcanoTop")
  vulcanoTopDialog.pages:add(Page("vulcanoTop_1.png", Page.RADIO))
  vulcanoTopDialog.pages:add(Page("vulcanoTop_2.png", Page.TINY))
  vulcanoTopDialog.pages:add(Page("vulcanoTop_3.png", Page.RADIO))
  scape.tinyandbig.Level.currentAct().dialogSystem.dialogs:add(vulcanoTopDialog)
  
  -- End1
  local end1Dialog = Dialog("End1")
  end1Dialog.pages:add(Page("end_01.png", Page.RADIO))
  scape.tinyandbig.Level.currentAct().dialogSystem.dialogs:add(end1Dialog)
  
  -- End2
  local end2Dialog = Dialog("End2")
  end2Dialog.pages:add(Page("end_02.png", Page.TINY))
  scape.tinyandbig.Level.currentAct().dialogSystem.dialogs:add(end2Dialog)
end
