//--- OBJECT WRITE BEGIN ---
new GuiBitmapCtrl(DemoExit) {
   profile = "GuiDefaultProfile";
   horizSizing = "relative";
   vertSizing = "relative";
   position = "0 0";
   extent = "800 600";
   minExtent = "8 2";
   visible = "1";
   alpha = "1";
   bitmap = "language/english/images/upsellScreen_screen.jpg";
   wrap = "0";
      useVariable = "0";
      tile = "0";

   new GuiTextCtrl(upsell_whyBuyText) {
      profile = "GuiPaperButtonProfile";
      horizSizing = "relative";
      vertSizing = "relative";
      position = "403 317";
      extent = "175 34";
      minExtent = "8 2";
      visible = "1";
      alpha = "1";
      text = lookup("WhyBuy");
      maxLength = "255";
   };
   new GuiBitmapButtonCtrl() {
      profile = "GuiPaperButtonProfile";
      horizSizing = "relative";
      vertSizing = "relative";
      position = "401 453";
      extent = "180 42";
      minExtent = "8 2";
      visible = "1";
      command = "MM_BuyTubeTwist();";
      alpha = "1";
      lockMouse = "0";
      bitmap = "./images/buttons/paperButton_normal.png";
      HighlightBitmap = "./images/buttons/paperButton_hover.png";
      PressedBitmap = "./images/buttons/paperButton_down.png";
      text = lookup("RegisterNow");
   };
   new GuiBitmapButtonCtrl() {
      profile = "GuiPaperButtonProfile";
      horizSizing = "relative";
      vertSizing = "relative";
      position = "224 426";
      extent = "173 42";
      minExtent = "8 2";
      visible = "1";
      command = "MM_QuitGame();";
      alpha = "1";
      lockMouse = "0";
      bitmap = "./images/buttons/paperButton_normal.png";
      HighlightBitmap = "./images/buttons/paperButton_hover.png";
      PressedBitmap = "./images/buttons/paperButton_down.png";
      text = lookup("ExitGame");
   };
   new GuiTextCtrl(upsell_line1) {
      profile = "GuiPaperButtonProfile";
      horizSizing = "relative";
      vertSizing = "relative";
      position = "359 342";
      extent = "257 34";
      minExtent = "8 2";
      visible = "1";
      alpha = "1";
      text = lookup("PlayIn5DifferentTimePeriods");
      maxLength = "255";
   };
   new GuiMLTextCtrl(upsell_storyText) {
      profile = "GuiPaperButtonProfile";
      horizSizing = "relative";
      vertSizing = "relative";
      position = "41 331";
      extent = "316 88";
      minExtent = "8 2";
      visible = "1";
      alpha = "1";
      lineSpacing = "2";
      allowColorChars = "0";
      maxChars = "-1";
      text = lookup("ProfStillMissingAndYouNoRegister");
   };
   new GuiTextCtrl(upsell_line3) {
      profile = "GuiPaperButtonProfile";
      horizSizing = "relative";
      vertSizing = "relative";
      position = "359 393";
      extent = "257 34";
      minExtent = "8 2";
      visible = "1";
      alpha = "1";
      text = lookup("DownloadCustomExperiments");
      maxLength = "255";
   };
   new GuiTextCtrl(upsell_line4) {
      profile = "GuiPaperButtonProfile";
      horizSizing = "relative";
      vertSizing = "relative";
      position = "359 417";
      extent = "257 34";
      minExtent = "8 2";
      visible = "1";
      alpha = "1";
      text = lookup("SolveAll80Experiments");
      maxLength = "255";
   };
   new GuiBitmapButtonCtrl(upsell_back_Button) {
      profile = "GuiPaperButtonProfile";
      horizSizing = "relative";
      vertSizing = "relative";
      position = "26 426";
      extent = "203 42";
      minExtent = "8 2";
      visible = "1";
      command = "MM_BackFromDemoExit();";
      alpha = "1";
      lockMouse = "0";
      bitmap = "./images/buttons/paperButton_normal.png";
      HighlightBitmap = "./images/buttons/paperButton_hover.png";
      PressedBitmap = "./images/buttons/paperButton_down.png";
      text = lookup("ReturnToGame");
   };
   new GuiTextCtrl(upsell_line2) {
      profile = "GuiPaperButtonProfile";
      horizSizing = "relative";
      vertSizing = "relative";
      position = "359 368";
      extent = "257 34";
      minExtent = "8 2";
      visible = "1";
      alpha = "1";
      text = lookup("BuildYourOwnExperiments");
      maxLength = "255";
   };
   new GuiBitmapCtrl(upsell_trophy) {
      profile = "GuiDefaultProfile";
      horizSizing = "relative";
      vertSizing = "relative";
      position = "33 501";
      extent = "101 79";
      minExtent = "8 2";
      visible = "1";
      alpha = "1";
      bitmap = "./images/igc05trophy.png";
      wrap = "0";
   };
   new GuiMLTextCtrl(upsell_trophyText) {
      profile = "GuiCurrentPuzzleTitleText";
      horizSizing = "relative";
      vertSizing = "relative";
      position = "142 513";
      extent = "318 63";
      minExtent = "8 2";
      visible = "1";
      alpha = "1";
      lineSpacing = "2";
      allowColorChars = "0";
      maxChars = "-1";
      text = lookup("trophyAwardText");
   };
};
//--- OBJECT WRITE END ---


function DemoExit::onWake(%this)
{
   Canvas.showCursor();
   Canvas.cursorOn();
   
   if( !$jukebox.isMuted )
     alxSetChannelVolume($SimAudioType, 0);
     
   $jukebox.schedule(1500, playSound, TTCalmLoop, 1);
}
