SpatialFear.SFQuickSaveBox

00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
//=============================================================================
// Spatial Fear
// Class: SFQuickSaveBox
// Descritption: A client widow, that brings up a Yes/No selection box used,
//					by the quicksave action, to ask, before overwriting the
//					last quicksave game.
//
// Author: Markus Nuebel
//=============================================================================
class SFQuickSaveBox expands UWindowDialogClientWindow;

var UWindowMessageBox	m_wndQuestionBox;
var	SFPlayer			m_oPlayer;

// Brings up the window
function ShowWindow()
{
	// Call to base class
	Super.ShowWindow();
	// Create the question box
	m_wndQuestionBox = MessageBox("Quicksave?", "Do you want to save your game now?", MB_YesNo, MR_No, MR_Yes);
	m_wndQuestionBox.bLeaveOnscreen  = true;
}

// Handles the message box selection
function MessageBoxDone(UWindowMessageBox W, MessageBoxResult Result)
{
	if ((W == m_wndQuestionBox) && (Result == MR_Yes))
	{
		// Execute the quicksave
		m_oPlayer.saveGame(9);	// 9 is the quicksave slot
		Close();
	}
	if ((W == m_wndQuestionBox) && (Result == MR_No))
	{
		// Nothing to do
		Close();
	}
}

defaultproperties
{
}

class file time: 12/7/2003 3:58:24 PM - creation time: 12/7/2003 4:03:45 PM
Created with UnCodeX