//-----------------------------------------------------------------------------
// Torque Game Engine 
// Copyright (c) 2002 GarageGames.Com
//-----------------------------------------------------------------------------
function SCD_Screenshot::SCD_ScreenshotDlg_OpenJournal(%this, %page)
{
   // Push the journal
   Canvas.pushDialog(%this); 
   // Turn to Page
   if(%page !$= "")
   {
      %this.setPane(%page);
   }
}

function SCD_Screenshot::SCD_ScreenshotDlg_CloseJournal(%this)
{
   // Set page to 0
   %this.setPane(0);
   // Pop the journal
   Canvas.popDialog(%this); 
}

function SCD_Screenshot::SCD_ScreenshotDlg_InitJournalPage(%this, %page, %bitmap, %hintText, %checkText)
{
   ("OptPicturePane_" @ %page).foundPhoto=false;
   ("OptPicturePane_" @ %page).setVisible(false);
   ("HintBox_" @ %page).setText(%hintText);
   ("HintBox_" @ %page).setVisible(true);
   ("CheckBox_" @ %page).setText(%checkText);
   ("CheckBox_" @ %page).setVisible(false);
   ("PictureBox_" @ %page).setBitmap(%bitmap);        
}

function SCD_Screenshot::SCD_ScreenshotDlg_ActivateJournalPage(%this, %page)
{
   // Activate our stuff
   ("OptPicturePane_" @ %page).foundPhoto=true;
   ("HintBox_" @ %page).setVisible(false);
   ("CheckBox_" @ %page).setVisible(true);
   ("CheckBox_" @ %page).setStateOn(true);
   ("PictureBox_" @ %page).setVisible(true);     
   // Switch to the pane
   %this.setPane(%page);
}

function SCD_Screenshot::setPane(%this, %pane)
{
   // Ok, first, make sure the rest are off
   OptPicturePane_0.setVisible(false);
   OptPicturePane_1.setVisible(false);
   OptPicturePane_2.setVisible(false);
   OptPicturePane_3.setVisible(false);
      
   // Set the next pane to visible
   ("OptPicturePane_" @ %pane).setVisible(true);
   
   // Check if we need to turn on the don't know picture
   ("PictureBox_" @ %pane).setVisible(("OptPicturePane_" @ %pane).foundPhoto); 
   ("PictureBox_donotknow_" @ %pane).setVisible(!("OptPicturePane_" @ %pane).foundPhoto);
   
   SCD_Screenshot.lastActivePhoto = %pane;
}

