Overview Package Class Source Class tree Glossary
previous class      next class frames      no frames

DeusEx.MenuChoice_RenderDevice


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
00045
00046
00047
00048
00049
00050
00051
00052
00053
00054
00055
00056
00057
00058
00059
00060
00061
00062
00063
00064
00065
00066
00067
00068
00069
00070
00071
00072
00073
00074
00075
00076
00077
//=============================================================================
// MenuChoice_RenderDevice
//=============================================================================

class MenuChoice_RenderDevice extends MenuUIChoiceAction;

var localized String PromptTitle;
var localized String GamePromptMessage;
var localized String RestartPromptMessage;

// ----------------------------------------------------------------------
// ButtonActivated()
// ----------------------------------------------------------------------

function bool ButtonActivated( Window buttonPressed )
{
    local DeusExLevelInfo info;
    local DeusExRootWindow root;

    root = DeusExRootWindow(GetRootWindow());

    info = player.GetLevelInfo();

    // If the game is running, first *PROMPT* the user, becauase
    // this will cause the game to quit and restart!!

    if (((info != None) && (info.MissionNumber >= 0)) &&
       !((player.IsInState('Dying')) || (player.IsInState('Paralyzed'))))
    {
        root.MessageBox(PromptTitle, GamePromptMessage, 0, False, Self);
    }
    else
    {
        root.MessageBox(PromptTitle, RestartPromptMessage, 0, False, Self);
    }

    return True;
}

// ----------------------------------------------------------------------
// BoxOptionSelected()
// ----------------------------------------------------------------------

event bool BoxOptionSelected(Window button, int buttonNumber)
{
    local DeusExRootWindow root;

    root = DeusExRootWindow(GetRootWindow());

    // Destroy the msgbox!  
    root.PopWindow();

    if (buttonNumber == 0) 
    {
        // First save any other changes the user made 
        // while in this menu before restarting the game!
        SaveMenuSettings();

        // Restart
        player.ConsoleCommand("RELAUNCH -changevideo");
    }
    return true;
}

// ----------------------------------------------------------------------
// ----------------------------------------------------------------------

defaultproperties
{
     PromptTitle="Restart Deus Ex?"
     GamePromptMessage="In order to choose a render device, Deus Ex must be restarted.  The current game you are playing will be lost if you have not already saved it.  Do you still wish to restart?"
     RestartPromptMessage="In order to choose a render device, Deus Ex must be restarted.  Do you wish to proceed?"
     Action=MA_Custom
     HelpText="Select the device to use for 3D rendering.  Deus Ex must EXIT to allow you to select a 3D hardware device."
     actionText="Rendering |&Device..."
}

Overview Package Class Source Class tree Glossary
previous class      next class frames      no frames
Class file time: Mon 8/11/2021 16:22:54.000 - Creation time: Mon 8/11/2021 16:31:28.620 - Created with UnCodeX