Files
firestorm/Gameleap/mw4/Content/ShellScripts/CampaignScreen.script
T
Cyd 2b8ca921cb Initial full mirror of c:\VWE (source + assets + toolchain + outputs) via Git LFS
Complete disaster-recovery snapshot: engine/game source, game data assets,
VC6 toolchain + DX SDKs, build outputs, deployed game, and _UNUSED archive.
Large binaries in Git LFS; text preserved byte-for-byte (core.autocrlf=false,
no eol attributes). See RECOVERY.md for the one-clone rebuild procedure.
2026-06-24 21:28:16 -05:00

1589 lines
42 KiB
Plaintext

#include "Content\\ShellScripts\\stddefs.h"
#include "Content\\ShellScripts\\ScriptStrings.h"
#include "Content\\ShellScripts\\listboxes.script"
#include "Content\\ShellScripts\\mc_listboxes.script"
#include "Content\\ShellScripts\\common_shell.script"
#include "Content\\ShellScripts\\buttons.script"
#include "Content\\ShellScripts\\c_Pane.script"
#include "Content\\ShellScripts\\c_MoviePlayer.script"
#include "Content\\ShellScripts\\c_Text.script"
#include "Content\\ShellScripts\\c_InfoPoint.script"
#include "Content\\ShellScripts\\c_InfoRegion.script"
#include "Content\\ShellScripts\\c_StatLines.script"
#include "Content\\ShellScripts\\c_MissionRegion.script"
#include "Content\\ShellScripts\\ErrorScreen.script"
#include "Content\\ShellScripts\\ShellFunctionHeaders.hpp"
#include "Content\\ShellScripts\\c_rollover.script"
main
{
GUI_CREATE
{
int max_items = 25 // Maximum number of items that can be listed by droplist
object oRollover = s_HelpRegion
oRollover.nFontID = IDS_F_ROLLOVER_INFO
oRollover.cTextColor= 0xFFff7200
oRollover.location = 15,502,nZ_HELPREGION
oRollover.nWidth = 570
oRollover.nHeight = 85
initialize(oRollover)
activate(oRollover)
callback($$Shell_CallbackHandler$$, ShellInitCampaignScreen)
//Sets volume of Background Music
int nMusicTmp
callback($$Shell_CallbackHandler$$,ShellOptionsGetSliderValue,MWO_MUSICVOLUME,nMusicTmp)
if nMusicTmp > 25
{
setvolume (0,25)
}
else
{
setvolume (0,nMusicTmp)
}
int i
sound launchSound = SPATH "sfx_mech_explode.WAV"
sound btnTriggeredSound = SPATH "sfx_button5.wav"
int MAX_MCCB_ITEMS = 23
int MAX_MCCB_COLUMNS = 2
int play_opening
int play_closing
play_opening = callback($$Shell_CallbackHandler$$, ShellCampaignPlayIntro)
String closing_movie
play_closing = callback($$Shell_CallbackHandler$$, ShellCampaignPlayEnd, $$m_EndMovieName$$)
if(play_opening == 1)
{
play_opening = 0
script_run "Content\\ShellScripts\\CampaignCinema.script", 0x1100
script_pause @CampaignScreen@,2
}
if(play_closing == 1)
{
@SHELL@lastScreenDepth++
@SHELL@lastScreen[@SHELL@lastScreenDepth] = CAMPAIGNLOBBY
@SHELL@currentScreen = ENDINGCINEMA
}
object screen = o_Campaign
}
}
o_Campaign
{
GUI_CREATE
{
//Local Variables
int i
int k
int nComMechID
int nComResID
string szComMechName
int nErrorCode
int nMovieCheck
int nMRID
int nMRIDHolder
string nMissionHelp
@SHELL@bkg = szPATH_GRAPHICS "CM_BackGround.tga"
object oError
//Buttons
object o_Load_button = s_multistatepane
o_Load_button.file = WPATH "button_reg_200x20m_4state.tga"
o_Load_button.text = localize$(IDS_GN_LOAD)
o_Load_button.nRollover = 1
o_Load_button.nHelpID = IDS_GN_HELP_LOAD_BUTTON
o_Load_button.total_states = 4
o_Load_button.location = 597, 489, nZ_BUTTON
initialize (o_Load_button)
object o_MechLab_button = s_multistatepane
o_MechLab_button.file = WPATH "button_reg_200x20m_4state.tga"
o_MechLab_button.text = localize$(IDS_CM_MB_TITLE)
o_MechLab_button.nRollover = 1
o_MechLab_button.nHelpID = IDS_GN_HELP_MECHBAY_BUTTON
o_MechLab_button.total_states = 4
o_MechLab_button.location = 597, 512, nZ_BUTTON
initialize (o_MechLab_button)
object o_mainmenu_button = s_multistatepane
o_mainmenu_button.file = WPATH "button_reg_200x20m_4state.tga"
o_mainmenu_button.text = localize$(IDS_GN_MAINMENU)
o_mainmenu_button.nRollover = 1
o_mainmenu_button.nHelpID = IDS_GN_HELP_MAINMENU_BUTTON
o_mainmenu_button.total_states = 4
o_mainmenu_button.location = 597, 535, nZ_BUTTON
initialize (o_mainmenu_button)
object o_launch_button = s_multistatepane
o_launch_button.file = WPATH "button_main_200x41m_4state.tga"
o_launch_button.text = localize$(IDS_GN_LAUNCH)
o_launch_button.nRollover = 1
o_launch_button.nHelpID = IDS_GN_HELP_LAUNCH_BUTTON
o_launch_button.total_states = 4
o_launch_button.location = 597, 558, nZ_BUTTON
initialize (o_launch_button)
//Video Messages
string Video
int nMovieID = 0
int nWay
object oMovie = s_MoviePlayer
oMovie.location = 20,20,75
oMovie.fRegion = 1
oMovie.nHelpID = IDS_HELP_CM_VIDEO
oMovie.nLoop = 1
oMovie.fAutoStart = false
oMovie.szMovie = "Op1Mpeg\\c12001.mpg"
initialize(oMovie)
deactivate(oMovie)
object oVMTitle = s_Text
oVMTitle.location = 26 ,47,nZ_TEXT
oVMTitle.nFontID = IDS_F_CM_LABEL
oVMTitle.nResID = IDS_CM_MOVIE_TEXT
oVMTitle.cTextColor = cWhite
oVMTitle.nJustify = 3
oVMTitle.nLayoutWidth = 118
oVMTitle.nLayoutHeight = 44
initialize(oVMTitle)
object oMovieID = s_Text
oMovieID.location = 157 ,19,nZ_TEXT
oMovieID.nFontID = IDS_F_LOAD_TITLE
oMovieID.cTextColor = cWhite
oMovieID.nJustify = 3
oMovieID.nLayoutWidth = 44
oMovieID.nLayoutHeight = 44
oMovieID.szText = conv$(nMovieID)
initialize(oMovieID)
object oMovieDesc = s_InfoRegion
oMovieDesc.location = 157 ,19,20
oMovieDesc.nWidth = 44
oMovieDesc.nHeight = 44
oMovieDesc.nHelpID = IDS_HELP_CM_MOVIE_INDEX
initialize(oMovieDesc)
//Video Buttons
int VBButtonX = 154
int VBButtonY = 68
object o_play_button = s_multistatepane
o_play_button.file = szPATH_GRAPHICS "CM_VidPlay.tga"
o_play_button.text = " "
o_play_button.nRollover = 1
o_play_button.nHelpID = IDS_HELP_CM_PLAY
o_play_button.total_states = 3
o_play_button.location = VBButtonX + 26, VBButtonY, nZ_BUTTON
initialize (o_play_button)
deactivate(o_play_button)
object o_Stop_button = s_multistatepane
o_Stop_button.file = szPATH_GRAPHICS "CM_VidStop.tga"
o_Stop_button.nRollover = 1
o_Stop_button.nHelpID = IDS_HELP_CM_STOP
o_Stop_button.text = " "
o_Stop_button.total_states = 3
o_Stop_button.location = VBButtonX, VBButtonY, nZ_BUTTON
initialize (o_Stop_button)
deactivate(o_Stop_button)
object o_Prev_button = s_multistatepane
o_Prev_button.file = szPATH_GRAPHICS "CM_VidBack.tga"
o_Prev_button.text = " "
o_Prev_button.nRollover = 1
o_Prev_button.nHelpID = IDS_HELP_CM_BACK
o_Prev_button.total_states = 3
o_Prev_button.location = VBButtonX, VBButtonY + 27, nZ_BUTTON
initialize(o_Prev_button)
deactivate(o_Prev_button)
object o_Next_button = s_multistatepane
o_Next_button.file = szPATH_GRAPHICS "CM_VidForward.tga"
o_Next_button.text = " "
o_Next_button.nRollover = 1
o_Next_button.nHelpID = IDS_HELP_CM_FORWARD
o_Next_button.total_states = 3
o_Next_button.location = VBButtonX + 26, VBButtonY + 27, nZ_BUTTON
initialize (o_Next_button)
deactivate(o_Next_button)
//Campaign Map & Info
int MapX = 218
int MapY = 11
object oCampaignMap = s_CampaignScreen
oCampaignMap.location = MapX,MapY,5
//Mission Maps & Info
object oMissionScreen = s_MissionScreen
oMissionScreen.location = MapX + 1,MapY,5
//Lance Commander Info
int LanceComX = 9
int LanceComY = 132
object oLCTitle = s_Text
oLCTitle.location = LanceComX ,LanceComY,nZ_TEXT
oLCTitle.nFontID = IDS_F_CM_LANCEMATE
oLCTitle.nResID = IDS_CM_LANCE_COMMANDER
oLCTitle.cTextColor = cWhite
oLCTitle.nJustify = 3
oLCTitle.nLayoutWidth = 199
oLCTitle.nLayoutHeight = 19
initialize(oLCTitle)
object oLCName = s_Text
oLCName.location = LanceComX + 56,LanceComY + 19,nZ_TEXT
oLCName.nFontID = IDS_F_CM_LANCEMATE
oLCName.cTextColor = cWhite
oLCName.nLayoutWidth = 136
oLCName.nLayoutHeight = 17
object oLMPilotIcon = s_Pane
oLMPilotIcon.location = LanceComX + 3,LanceComY + 17,nZ_PANE
oLMPilotIcon.nFrames = 1
oLMPilotIcon.nMode = 0
oLMPilotIcon.fVolatile = 1
oLMPilotIcon.fRegion = 1
oLMPilotIcon.nHelpID = IDS_HELP_CM_P_ICON
oLMPilotIcon.nCurrFrame = 0
oLMPilotIcon.szBitmap = szPATH_GRAPHICS "CM_Ian.tga"
initialize(oLMPilotIcon)
object oLMMechIcon = s_Pane
oLMMechIcon.location = LanceComX + 146,LanceComY + 42,nZ_PANE
oLMMechIcon.szBitmap = szPATH_GRAPHICS "CM_MechIcon.tga"
oLMMechIcon.nFrames = 22
oLMMechIcon.nMode = 0
oLMMechIcon.fVolatile = 1
oLMMechIcon.fRegion = 1
oLMMechIcon.nHelpID = IDS_HELP_CM_M_ICON
int nComID = 0
int nMech_selected
int nMech_count = $$m_mechCount$$
string szMechName[nMech_count] //ResId For the Mech's Name
$$m_listBoxSize$$ = nMech_count
object oMechList = s_droplistbox
oMechList.location = LanceComX + 3, LanceComY + 75,location.z + nZ_DROPDOWN + 30
oMechList.nRollover = 1 //MUST BE INITIALIZED 272 - 16
oMechList.nHelpID = IDS_HELP_CM_M_LIST //MUST BE INITIALIZED 272 - 16
oMechList.itemWidth = 138 - 15 //MUST BE INITIALIZED 272 - 16
oMechList.itemHeight = 15 //MUST BE INITIALIZED 24
oMechList.max_displayed = 8 //MUST BE INITIALIZED
oMechList.arrowHeight = 15
//Stat lines
int stats_num = 4
int mech_stats[4]
// int pilot_stats[4]
object oMechStats[stats_num]
// object oPilotStats[stats_num]
int s
//LanceMate entries variables
int nPilotCount //= 0
int nLanceX = 10
int nLanceY = 232
int nLanceOffsetY = 87
object oLance[3]
//
//Chassis Drop Down
//
int nMechIconID
int nPrev_ChassisSelect
int greatest_x //These valus are for the calc's in the oDChassis height and wiidth
int greatest_y
// store the total number of movies played
int nMaxMovieID = 0
initialize(this)
framerate = 5
}
GUI_INIT
{
callback($$Shell_CallbackHandler$$, ShellTriggerMovie)
//Lance Commander info
mail(nMSG_INITLCPILOTINFO,this)
// mail(nMSG_INITLCPILOTSTATS,this)
mail(nMSG_INITLCMECHINFO,this)
mail(nMSG_INITLCMECHSTATS,this)
//Campaign Map
initialize(oCampaignMap)
//LanceMate entries
mail(nMSG_INITLANCE,this)
//mail(nMSG_INITMISSION,this)
oMissionScreen.nMissID = nMRID
initialize(oMissionScreen)
deactivate(oMissionScreen)
}
GUI_DRAW
{
render @SHELL@bkg,@SHELL@location
}
GUI_MAILBOX
{
//Stupid hack
int lance_id = @Shell@LanceMateID - 1
if lance_id < 0
{
lance_id = 0
}
switch (sender)
{
case o_Load_button:
{
play btnTriggeredSound,1
unfocus
callback($$Shell_CallbackHandler$$, ShellInitCampaignMechLab)
@SHELL@lastScreenDepth++
@SHELL@lastScreen[@SHELL@lastScreenDepth] = CAMPAIGNLOBBY
@SHELL@currentScreen = LOAD_SCREEN
}
break
case o_mainmenu_button:
{
play btnTriggeredSound,1
callback($$Shell_CallbackHandler$$,ShellOptionsGetSliderValue,MWO_MUSICVOLUME,nMusicTmp)
setvolume (0,nMusicTmp)
unfocus
@SHELL@currentScreen = @SHELL@lastScreen[@SHELL@lastScreenDepth]
@SHELL@lastScreenDepth--
}
break
case o_mechlab_button:
{
play btnTriggeredSound,1
if (exists(@Shell@))
@Shell@campaignScreen.play_movie = 0
unfocus
callback($$Shell_CallbackHandler$$, ShellInitCampaignMechLab)
@SHELL@lastScreenDepth++
@SHELL@lastScreen[@SHELL@lastScreenDepth] = CAMPAIGNLOBBY
@SHELL@currentScreen = MECHBAY_SCREEN
}
break
case o_launch_button:
{
nErrorCode = callback($$Shell_CallbackHandler$$, ShellCampaignVerifyLaunchData)
deactivate(oMovie)
if (nErrorCode == 3301)
{
play btnTriggeredSound,1
unfocus
oError = o_ErrorScreen
oError.location = 0,0,250
oError.button_mode = ONE_BUTTON_MODE
oError.error_header = LOCALIZE$(IDS_ERROR_CM_PLAYERMECH)
oError.error_message= LOCALIZE$(IDS_ERROR_CM_PLAYERMECH_MSG)
initialize(oError)
activate(oError)
mail(nMSG_STOP,oMovie)
}
else
if (nErrorCode == 3302)
{
play btnTriggeredSound,1
unfocus
oError = o_ErrorScreen
oError.location = 0,0,250
oError.button_mode = ONE_BUTTON_MODE
oError.error_header = LOCALIZE$(IDS_ERROR_CM_LMMECH)
oError.error_message= LOCALIZE$(IDS_ERROR_CM_LMMECH_MSG)
initialize(oError)
activate(oError)
mail(nMSG_STOP,oMovie)
}
else
if (nErrorCode == 3303)
{
play btnTriggeredSound,1
unfocus
oError = o_ErrorScreen
oError.location = 0,0,250
oError.button_mode = ONE_BUTTON_MODE
oError.error_header = LOCALIZE$(IDS_ERROR_CM_NOLM)
oError.error_message= LOCALIZE$(IDS_ERROR_CM_NOLM_MSG)
initialize(oError)
activate(oError)
mail(nMSG_STOP,oMovie)
}
else
if (nErrorCode == 1)
{
play launchSound,1
script_end "mouse.script"
callback($$SetShellCommand$$, StartCampaignGameCommand)
@SHELL@currentScreen = LAUNCHGAME
@SHELL@lastScreenDepth--
unfocus
}
}
break
//
//Video Button Clicks
//
case o_play_button:
{
deactivate(o_play_button)
$$m_moviesStopped$$ = 0
activate(oMovie)
mail(nMSG_PLAYMOVIE,this)
}
break
case o_Stop_button:
{
mail(nMSG_STOP,oMovie)
deactivate(oMovie)
activate(o_play_button)
deactivate(o_Stop_button)
$$m_moviePlaying$$ = 0
$$m_moviesStopped$$ = 1
}
break
case o_Prev_button:
{
nWay = ADVANCE_MOVIE_REVERSE
callback($$Shell_CallbackHandler$$, ShellAdvanceMovie,nWay)
nMovieCheck = callback($$Shell_CallbackHandler$$, ShellGetMovieFilename,Video,nMovieID)
if(nMovieCheck == 1)
{
activate(o_Next_button)
activate(o_Play_button)
deactivate(o_Stop_button)
if(nMovieID == 0)
deactivate(o_Prev_button)
oMovie.szMovie = Video
oMovie.fAutoStart = 0
oMovie.nLoop = 1
initialize(oMovie)
mail(nMSG_STOP,oMovie)
deactivate(oMovie)
int temp
temp = nMovieID + 1
oMovieID.szText = conv$(temp)
initialize(oMovieID)
}
}
break
case o_Next_button:
{
nWay = ADVANCE_MOVIE_FORWARD
callback($$Shell_CallbackHandler$$, ShellAdvanceMovie,nWay)
nMovieCheck = callback($$Shell_CallbackHandler$$, ShellGetMovieFilename,Video,nMovieID)
if(nMovieCheck == 1)
{
activate(o_Prev_button)
activate(o_Play_button)
deactivate(o_Stop_button)
if (nMovieID == nMaxMovieID)
deactivate(o_Next_button)
oMovie.szMovie = Video
oMovie.fAutoStart = 0
oMovie.nLoop = 1
initialize(oMovie)
mail(nMSG_STOP,oMovie)
deactivate(oMovie)
int temp
temp = nMovieID + 1
oMovieID.szText = conv$(temp)
initialize(oMovieID)
}
}
break
case oMechList:
{
nMech_selected = getmessage()
string mech_name = oMechList.list_item[oMechList.nSelected]
callback($$Shell_CallbackHandler$$, ShellCampaignSetMech, nComID, mech_name)
mail(nMSG_INITLCMECHINFO,this)
mail(nMSG_INITLCMECHSTATS,this)
mail(nMSG_INITLANCEMECHS,this)
}
break
}
switch(getmessage())
{
case nMSG_PLAYMOVIE:
{
nMovieCheck = callback($$Shell_CallbackHandler$$, ShellGetMovieFilename,Video,nMovieID)
if(nMovieCheck == 1)
{
activate(oMovie)
oMovie.szMovie = Video
mail(nMSG_PLAY,oMovie)
if (nMovieID > nMaxMovieID)
nMaxMovieID = nMovieID
int temp
temp = nMovieID + 1
oMovieID.szText = conv$(temp)
$$m_moviePlaying$$ = 1
initialize(oMovieID)
deactivate(o_Play_button)
activate(o_Stop_button)
}
if (exists(@Shell@))
{
// if we come back from MechLab or a failed mission
if (@Shell@campaignScreen.play_movie == 0)
{
mail(nMSG_STOP,oMovie)
deactivate(oMovie)
activate(o_play_button)
deactivate(o_Stop_button)
$$m_moviePlaying$$ = 0
$$m_moviesStopped$$ = 1
@Shell@campaignScreen.play_movie = 1
}
}
if (nMovieID != 0)
activate(o_Prev_button)
if (nMovieID != nMaxMovieID)
activate(o_Next_button)
}
break
case nMSG_INITLANCE:// Initializes all Lance mate objects
{
for(i = 0; i < nPilotCount; i++)
{
oLance[i] = s_LanceEntry
oLance[i].location = nLanceX,(nLanceY + (i * nLanceOffsetY)),5 - i
oLance[i].nId = i + 1
initialize(oLance[i])
}
}
break
case nMSG_INITLANCEMECHS://Initializes Only the Mech Portions of the Lance mate entries
{
for(i = 0; i < nPilotCount; i++)
{
mail(nMSG_INITENTRYMECHS,oLance[i])
}
mail(nMSG_INITLCMECHINFO,this)
mail(nMSG_INITLCMECHSTATS,this)
}
break
case nMSG_INITLANCEPILOTS://Initializes Only the Pilot Portions of the Lance mate entries
{
for(i = 0; i < nPilotCount; i++)
{
mail(nMSG_INITENTRYPILOTS,oLance[i])
}
}
break
case nMSG_INITLCPILOTINFO://Initializes Only the Pilot Name and Icon of the Lance Commander entry
{
string pilot_name
callback($$Shell_CallbackHandler$$, ShellGetPilotName, pilot_name)
oLCName.szText = pilot_name
initialize(oLCName)
if(equal$(pilot_name,"DarkPriest"))
{
oLMPilotIcon.szBitmap = szPATH_GRAPHICS "CM_Ian1.tga"
initialize(oLMPilotIcon)
}
}
break
// case nMSG_INITLCPILOTSTATS://Initializes Only the Pilot Stats of the Lance Commander entry
// {
// callback($$Shell_CallbackHandler$$, ShellCampaignGetLanceStats, nComID, pilot_stats[])
// for s = 0; s < stats_num; s++
// {
// oPilotStats[s] = s_statlines
// oPilotStats[s].nPixelWidth = 32
// oPilotStats[s].location = LanceComX + 64,LanceComY + 38 + (s * 8), 10
// oPilotStats[s].stat_val = pilot_stats[s]
// if(s == 0)
// {
// oPilotStats[s].nHelpID = IDS_HELP_CM_P_GUN
// }
// else
// if(s == 1)
// {
// oPilotStats[s].nHelpID = IDS_HELP_CM_P_PILOT
// }
// else
// if(s == 2)
// {
// oPilotStats[s].nHelpID = IDS_HELP_CM_P_SENSOR
// }
// else
// if(s == 3)
// {
// oPilotStats[s].nHelpID = IDS_HELP_CM_P_BLIND
// }
// initialize(oPilotStats[s])
// }
// }
// break
case nMSG_INITLCMECHSTATS://Initializes Only the Mech Stats of the Lance Commander entry
{
String mech_name = oMechList.list_item[oMechList.nSelected]
callback($$Shell_CallbackHandler$$, ShellCampaignGetMechBars, mech_name, mech_stats[])
for s = 0; s < stats_num; s++
{
oMechStats[s] = s_statlines
oMechStats[s].nPixelWidth = 74
oMechStats[s].location = LanceComX + 68,LanceComY + 41 + (s * 8), 10
oMechStats[s].stat_val = mech_stats[s]
if(s == 0)
{
oMechstats[s].nHelpID = IDS_HELP_CM_M_F
}
else
if(s == 1)
{
oMechstats[s].nHelpID = IDS_HELP_CM_M_A
}
else
if(s == 2)
{
oMechstats[s].nHelpID = IDS_HELP_CM_M_S
}
else
if(s == 3)
{
oMechstats[s].nHelpID = IDS_HELP_CM_M_H
}
initialize(oMechStats[s])
}
}
break
case nMSG_INITLCMECHINFO://Initializes Only the Mech List and Icon of the Lance Commander entry
{
int status_array[$$m_mechCount$$]
callback($$Shell_CallbackHandler$$, ShellCampaignGetMechs,nComID, szMechName[], status_array[], nMech_selected, nComMechID, nMech_count)
oMechList.nSelected = nMech_selected
oMechList.list_size = nMech_count //MUST BE INITIALIZED
for ( k = 0; k < nMech_count; k++)
{
oMechList.list_item[k] = szMechName[k]
}
initialize (oMechList)
oLMMechIcon.nCurrFrame = nComMechID
initialize(oLMMechIcon)
}
break
case nMSG_INITMISSION://Initializes the Mission Map Area
{
deactivate(oCampaignMap)
oMissionScreen.nMissID = nMRID
initialize(oMissionScreen)
activate(oMissionScreen)
}
break
case nMSG_CAMPAIGNRETURN://Initializes the Campaign Map Area
{
initialize(oCampaignMap)
activate(oCampaignMap)
deactivate(oMissionScreen)
}
break
case nMSG_MEDIAEND:
{
$$m_moviePlaying$$ = 0
activate(o_play_button)
deactivate(o_Stop_button)
deactivate(oMovie)
}
break
}
}
}
s_LanceEntry
{
GUI_CREATE
{
int k
int nId
int nSelectedPilot
int nMechID //Index to get the current frame for the Mech Icon
string szName
int mech_count = $$m_mechCount$$
string szMechName[mech_count] //ResId For the Mech's Name
string pilot_names[30]
int name_count //Total number of pilots in the list
int pilot_selected
int mech_selected
int npilotid
//Stat lines
int stats_num = 4
int s
int mech_stats[4]
int pilot_stats[4]
//Mech Area Offsets
int nMechIX = 146 //I denotes Icon
int nMechIY = 28 //T denotes Text
int nMechTX = 3
int nMechTY = 61
int nMechW = 84
int nMechH = 60
//Lance Area OffSets
int nLanceIX = 3
int nLanceTX = 55
int nLanceY = 4
int nLanceIY = 4
//Lance Entry Locals
int nWidth = 195
int nHeight = 70
object oLEBackground = s_Pane
oLEBackground.szBitmap = szPATH_GRAPHICS "CM_LanceEntry.tga"
oLEBackground.nFrames = 1
oLEBackground.nCurrFrame = 0
oLEBackground.nMode = 0
oLEBackground.fVolatile = 0
oLEBackground.fRegion = 0
object oPilotList = s_droplistbox
oPilotList.nRollover = 1 //MUST BE INITIALIZED 272 - 16
oPilotList.nHelpID = IDS_HELP_CM_P_LIST //MUST BE INITIALIZED 272 - 16
oPilotList.itemWidth = 140 - 15 //MUST BE INITIALIZED 272 - 16
oPilotList.itemHeight = 17 //MUST BE INITIALIZED 24
oPilotList.max_displayed = 8 //MUST BE INITIALIZED
oPilotList.arrowHeight = 15
object oPilotIcon = s_Pane
oPilotIcon.szBitmap = szPATH_GRAPHICS "CM_Lancemates.tga" //BUGBUG: Change File name when Icon file exists
oPilotIcon.nFrames = 6
oPilotIcon.nMode = 0
oPilotIcon.fVolatile = 1
oPilotIcon.fRegion = 1
oPilotIcon.nHelpID = IDS_HELP_CM_P_ICON
object oMechIcon = s_Pane
oMechIcon.szBitmap = szPATH_GRAPHICS "CM_MechIcon.tga"
oMechIcon.nFrames = 22
oMechIcon.nMode = 0
oMechIcon.fVolatile = 1
oMechIcon.fRegion = 1
oMechIcon.nHelpID = IDS_HELP_CM_M_ICON
$$m_listBoxSize$$ = $$m_mechCount$$
object oMechList = s_droplistbox
oMechList.nRollover = 1 //MUST BE INITIALIZED 272 - 16
oMechList.nHelpID = IDS_HELP_CM_M_LIST //MUST BE INITIALIZED 272 - 16
oMechList.itemWidth = 139 - 15 //MUST BE INITIALIZED 272 - 16
oMechList.itemHeight = 15 //MUST BE INITIALIZED 24
oMechList.max_displayed = 7 //MUST BE INITIALIZED
oMechList.arrowHeight = 15
object oPilotstats[stats_num]
object oMechstats[stats_num]
}
GUI_INIT
{
oLEBackground.location = location
initialize(oLEBackground)
mail(nMSG_INITENTRYPILOTS,this)
mail(nMSG_INITENTRYMECHS,this)
}
GUI_MAILBOX
{
switch (getmessage())
{
case nMSG_CLICKED:
switch(sender)
{
case oMechIcon:
@Shell@LanceMateID = nID
parent.nMechIconID = nID
mail (nMSG_OPENCHASSIS,nID,location.x,location.y,nMechID,parent)
break
}
break
case nMSG_INITENTRYMECHS:
{
//Mech Info
int status_array[$$m_mechCount$$]
callback($$Shell_CallbackHandler$$, ShellCampaignGetMechs,nID, szMechName[], status_array[], Mech_selected, nMechID, Mech_count)
oMechList.location = location.x + nMechTX, location.y + nMechTY,location.z + nZ_DROPDOWN + 6
if(nID == 3)
{
oMechList.location = location.x + nMechTX, location.y + nMechTY,location.z + nZ_DROPDOWN
}
oMechList.list_size = mech_count
oMechList.nSelected = mech_selected
for (int k = 0; k < mech_count; k++)
{
oMechList.list_item[k] = szMechName[k]
}
initialize (oMechList)
oMechIcon.location = location.x + nMechIX,location.y + nMechIY,nZ_PANE
oMechIcon.nCurrFrame = nMechID
initialize(oMechIcon)
//Mech Stats
String mech_name = oMechList.list_item[mech_selected]
callback($$Shell_CallbackHandler$$, ShellCampaignGetMechBars, mech_name, mech_stats[])
for s = 0; s < stats_num; s++
{
oMechstats[s] = s_statlines
oMechstats[s].nPixelWidth = 33
oMechstats[s].location = location.x + 111,location.y + 28 + (s * 8), 10
oMechStats[s].stat_val = mech_stats[s]
if(s == 0)
{
oMechstats[s].nHelpID = IDS_HELP_CM_M_F
}
else
if(s == 1)
{
oMechstats[s].nHelpID = IDS_HELP_CM_M_A
}
else
if(s == 2)
{
oMechstats[s].nHelpID = IDS_HELP_CM_M_S
}
else
if(s == 3)
{
oMechstats[s].nHelpID = IDS_HELP_CM_M_H
}
initialize(oMechstats[s])
}
}
break
case nMSG_INITENTRYPILOTS:
{
//Pilot info
//Pilot List Callback
callback($$Shell_CallbackHandler$$, ShellCampaignGetPilotData, nID, pilot_names[], pilot_selected, name_count, npilotid, 30)
oPilotList.location = location.x + nLanceTX, location.y + nLanceY,location.z + nZ_DROPDOWN + 5
oPilotList.list_size = name_count //MUST BE INITIALIZED
oPilotList.nSelected = pilot_selected
for (k = 0; k < name_count; k++)
{
oPilotList.list_item[k] = pilot_names[k]
}
initialize (oPilotList)
oPilotIcon.location = location.x + nLanceIX,location.y + nLanceIY,nZ_PANE
oPilotIcon.nCurrFrame = npilotid
initialize(oPilotIcon)
//Pilot stats
callback($$Shell_CallbackHandler$$, ShellCampaignGetLanceStats, nID, pilot_stats[])
for s = 0; s < stats_num; s++
{
oPilotstats[s] = s_statlines
oPilotstats[s].nPixelWidth = 33
oPilotstats[s].location = location.x + 64,location.y + 25 + (s * 8), 10
oPilotStats[s].stat_val = pilot_stats[s]
if(s == 0)
{
oPilotStats[s].nHelpID = IDS_HELP_CM_P_GUN
}
else
if(s == 1)
{
oPilotStats[s].nHelpID = IDS_HELP_CM_P_PILOT
}
else
if(s == 2)
{
oPilotStats[s].nHelpID = IDS_HELP_CM_P_SENSOR
}
else
if(s == 3)
{
oPilotStats[s].nHelpID = IDS_HELP_CM_P_BLIND
}
initialize(oPilotstats[s])
}
}
break
}
switch (sender)
{
case oPilotList:
{
pilot_selected = getmessage()
string lance_name = oPilotList.list_item[oPilotList.nSelected]
callback($$Shell_CallbackHandler$$, ShellCampaignSetPilotData, nID, lance_name)
mail(nMSG_INITLANCEPILOTS)
}
break
case oMechList:
{
mech_selected = getmessage()
string mech_name = oMechList.list_item[oMechList.nSelected]
callback($$Shell_CallbackHandler$$, ShellCampaignSetMech, nID, mech_name)
mail(nMSG_INITLANCEMECHS)
}
break
}
}
}
s_MissionScreen
{
GUI_CREATE
{
int k
int nMissID
int nDayDrop = 0
int nNavCount
int nDropCount
int nInfoCount
int nTime
string szMissionMap
string szCampaignIcon
string szCampIconTitle
object oMissMap = s_Pane
oMissMap.nFrames = 1
oMissMap.nCurrFrame = 0
oMissMap.nMode = 0
oMissMap.fVolatile = 0
object oCampIcon = s_Pane
oCampIcon.nFrames = 1
oCampIcon.nCurrFrame = 0
oCampIcon.nMode = 0
oCampIcon.fVolatile = 0
oCampIcon.fRegion = 1
oCampIcon.nHelpID = IDS_HELP_CM_CAMPAIGN_ICON
object oCampIconTitle = s_Text
oCampIconTitle.nFontID = IDS_F_CM_TITLE
oCampIconTitle.cTextColor = cWhite
oCampIconTitle.nJustify = 2
oCampIconTitle.nLayoutWidth = 165
oCampIconTitle.nLayoutHeight= 23
object o_TOD_droplistbox= s_droplistbox
o_TOD_droplistbox.itemWidth = 140 //MUST BE INITIALIZED 272 - 16
o_TOD_droplistbox.itemHeight = 15 //MUST BE INITIALIZED 24
o_TOD_droplistbox.list_size = 2 //MUST BE INITIALIZED
o_TOD_droplistbox.max_displayed = 2 //MUST BE INITIALIZED
o_TOD_droplistbox.arrowHeight = 15
o_TOD_droplistbox.list_item[0] = localize$(IDS_CM_DAY)
o_TOD_droplistbox.list_item[1] = localize$(IDS_CM_NIGHT)
//Icon Toggle Butttons
int nNavToggle = 1
int nDropToggle = 1
int nInfoToggle = 1
int nToggle_Y = 180
int nToggle_Yoff= 70
object oNavOff = s_multistatepane
oNavOff.file = szPATH_GRAPHICS "CM_Nav.tga"
oNavOff.text = " "
oNavOff.total_states = 3
oNavOff.nRollover = 1
oNavOff.nHelpID = IDS_HELP_CM_NAVOFF
object oDropOff = s_multistatepane
oDropOff.file = szPATH_GRAPHICS "CM_DropPoint.tga"
oDropOff.text = " "
oDropOff.total_states = 3
oDropOff.nRollover = 1
oDropOff.nHelpID = IDS_HELP_CM_DROPOFF
object oInfoOff = s_multistatepane
oInfoOff.file = szPATH_GRAPHICS "InfoPoint.tga"
oInfoOff.text = " "
oInfoOff.total_states = 3
oInfoOff.nRollover = 1
oInfoOff.nHelpID = IDS_HELP_CM_INFOOFF
//ICon Toggle Text
object oNavTitle = s_Text
oNavTitle.nFontID = IDS_F_CM_TITLE
oNavTitle.nResID = IDS_CM_NAVPOINT_TITLE
oNavTitle.cTextColor = cWhite
oNavTitle.nJustify = 3
object oDropTitle = s_Text
oDropTitle.nFontID = IDS_F_CM_TITLE
oDropTitle.nResID = IDS_CM_DROPPOINT_TITLE
oDropTitle.cTextColor = cWhite
oDropTitle.nJustify = 3
object oInfoTitle = s_Text
oInfoTitle.nFontID = IDS_F_CM_TITLE
oInfoTitle.nResID = IDS_CM_INFOPOINT_TITLE
oInfoTitle.cTextColor = cWhite
oInfoTitle.nJustify = 3
//Info Point parameters
object oIP[15]
//Nav Point parameters
object oNP[15]
//Drop Point Parameters
object oDP[15]
framerate = 5
}
GUI_INIT
{
oNavOff.location = location.x + 400, location.y + nToggle_Y, nZ_BUTTON
initialize (oNavOff)
oDropOff.location = location.x + 400, location.y + nToggle_Y + nToggle_Yoff, nZ_BUTTON
initialize (oDropOff)
oInfoOff.location = location.x + 400, location.y + nToggle_Y + (2 * nToggle_Yoff), nZ_BUTTON
initialize (oInfoOff)
oNavTitle.location = oNavOff.location.x,oNavOff.location.y -22 ,nZ_TEXT
initialize(oNavTitle)
oDropTitle.location = oDropOff.location.x,oDropOff.location.y -22 ,nZ_TEXT
initialize(oDropTitle)
oInfoTitle.location = oInfoOff.location.x,oInfoOff.location.y -22 ,nZ_TEXT
initialize(oInfoTitle)
callback($$Shell_CallbackHandler$$,ShellCampaignGetMissionData, nMissID, szCampaignIcon,szMissionMap, nDayDrop)
callback($$Shell_CallbackHandler$$,ShellGetTimeofDay,nTime)
if(equal$(szMissionMap,""))
{
oMissMap.szBitmap = MAPPATH "CM_00_MM_00.tga"
}
else
{
oMissMap.szBitmap = MAPPATH szMissionMap
}
oMissMap.location = location.x ,location.y ,nZ_PANE
oMissMap.nScaleX = 150
oMissMap.nScaleY = 150
oMissMap.nHelpID = IDS_HELP_CM_MISSION_MAP
initialize(oMissMap)
oMissMap.region = 0,0 to 384,384
oRollover.szScreen = parent.nMissionHelp
mail(nMSG_NOHELP,oRollover)
if(equal$(szCampaignIcon,""))
{
oCampIcon.szBitmap = MAPPATH "CM_00_icon.tga"
}
else
{
oCampIcon.szBitmap = MAPPATH szCampaignIcon
}
oCampIcon.location = location.x + 418,location.y + 24,nZ_PANE
initialize(oCampIcon)
oCampIconTitle.szText = szCampIconTitle
oCampIconTitle.location = location.x + 400,location.y, nZ_TEXT
initialize(oCampIconTitle)
o_TOD_droplistbox.location = location.x + 400,location.y + 368, 30
o_TOD_droplistbox.nselected = nTime
initialize(o_TOD_droplistbox)
if(nDayDrop == 0)
{
deactivate(o_TOD_droplistbox)
}
else
{
activate(o_TOD_droplistbox)
}
//Populates Info Points
callback($$Shell_CallbackHandler$$,ShellCampaignGetMissionInfoCount,nMissID,nInfoCount)
if (nInfoCount == 0)
{
nInfoCount = 1
}
int nScaleFactor = (15/10)//1.5
int q
int r
int h
int w
int MM_IP_X[nInfoCount]
int MM_IP_Y[nInfoCount]
int MM_IP_W[nInfoCount]
int MM_IP_H[nInfoCount]
string MM_IP_Title[nInfoCount]
string MM_IP_Icon[nInfoCount]
string MM_IP_Rollover[nInfoCount]
string MM_IP_RightClick[nInfoCount]
callback($$Shell_CallbackHandler$$,ShellCampaginGetMissionInfoPoints,nMissID,MM_IP_X[],MM_IP_Y[],MM_IP_H[],MM_IP_W[],MM_IP_Title[],MM_IP_Rollover[],MM_IP_RightClick[],MM_IP_Icon[], 15)
for (k = 0; k < nInfoCount; k++)
{
q = MM_IP_X[k] * 15
h = q/10
r = MM_IP_Y[k] * 15
w = r/10
oIP[k] = s_InfoPoint
oIP[k].location.x = location.x + h - (MM_IP_W[k]/2)
oIP[k].location.y = location.y + w - (MM_IP_H[k]/2)
oIP[k].nIPWidth = MM_IP_W[k]
oIP[k].nIPHeight = MM_IP_H[k]
oIP[k].szIPTitle = MM_IP_Title[k]
oIP[k].szIcon = MM_IP_Icon[k]".tga"
oIP[k].szRollover = MM_IP_Rollover[k]
oIP[k].szRightClick = MM_IP_RightClick[k]
initialize(oIP[k])
if(MM_IP_X[k] == 0 && MM_IP_Y[k] == 0)
{
deactivate(oIP[k])
}
}
//Populates Nav Points
callback($$Shell_CallbackHandler$$,ShellCampaignGetMissionNavCount,nMissID,nNavCount)
if (nNavCount == 0)
{
nNavCount = 1
}
int MM_NP_X[nNavCount]
int MM_NP_Y[nNavCount]
int MM_NP_W[nNavCount]
int MM_NP_H[nNavCount]
string MM_NP_Title[nNavCount]
string MM_NP_Rollover[nNavCount]
string MM_NP_RightClick[nNavCount]
callback($$Shell_CallbackHandler$$,ShellCampaginGetMissionNavPoints,nMissID,MM_NP_X[],MM_NP_Y[],MM_NP_H[],MM_NP_W[],MM_NP_Title[],MM_NP_Rollover[],MM_NP_RightClick[], 15)
for (k = 0; k < nNavCount; k++)
{
q = MM_NP_X[k] * 15
h = q/10
r = MM_NP_Y[k] * 15
w = r/10
oNP[k] = s_InfoPoint
oNP[k].nNav = 1
oNP[k].location.x = location.x + h - (MM_NP_W[k]/2)
oNP[k].location.y = location.y + w - (MM_NP_H[k]/2)
oNP[k].nIPWidth = MM_NP_W[k]
oNP[k].nIPHeight = MM_NP_H[k]
oNP[k].szIPTitle = MM_NP_Title[k]
oNP[k].szRollover = MM_NP_Rollover[k]
oNP[k].szRightClick = MM_NP_RightClick[k]
initialize(oNP[k])
if(MM_NP_X[k] == 0 && MM_NP_Y[k] == 0)
{
deactivate(oNP[k])
}
}
//Populates Drop Points
callback($$Shell_CallbackHandler$$,ShellCampaignGetMissionDropCount,nMissID,nDropCount)
if (nDropCount == 0)
{
nDropCount = 1
}
int MM_DP_X[nDropCount]
int MM_DP_Y[nDropCount]
int MM_DP_W[nDropCount]
int MM_DP_H[nDropCount]
string MM_DP_Title[nDropCount]
string MM_DP_Rollover[nDropCount]
string MM_DP_RightClick[nDropCount]
callback($$Shell_CallbackHandler$$,ShellCampaginGetMissionDropPoints,nMissID,MM_DP_X[],MM_DP_Y[],MM_DP_H[],MM_DP_W[],MM_DP_Title[],MM_DP_Rollover[],MM_DP_RightClick[], 15)
for (k = 0; k < nDropCount; k++)
{
q = MM_DP_X[k] * 15
h = q/10
r = MM_DP_Y[k] * 15
w = r/10
oDP[k] = s_InfoPoint
oDP[k].nDrop = 1
oDP[k].location.x = location.x + h - (MM_DP_W[k]/2)
oDP[k].location.y = location.y + w - (MM_DP_H[k]/2)
oDP[k].nIPWidth = MM_DP_W[k]
oDP[k].nIPHeight = MM_DP_H[k]
oDP[k].szIPTitle = MM_DP_Title[k]
oDP[k].szRollover = MM_DP_Rollover[k]
oDP[k].szRightClick = MM_DP_RightClick[k]
initialize(oDP[k])
if(MM_DP_X[k] == 0 && MM_DP_Y[k] == 0)
{
deactivate(oDP[k])
}
}
}
GUI_ACTIVATE
{
activate(oMissMap)
activate(oCampIcon)
activate(oCampIconTitle)
activate(oNavOff)
activate(oDropOff)
activate(oInfoOff)
activate(oNavTitle)
activate(oDropTitle)
activate(oInfoTitle)
callback($$Shell_CallbackHandler$$,ShellCampaignGetMissionData, nMissID, szCampaignIcon,szMissionMap, nDayDrop)
if(nDayDrop == 0)
{
deactivate(o_TOD_droplistbox)
}
else
{
callback($$Shell_CallbackHandler$$,ShellGetTimeofDay,nTime)
o_TOD_droplistbox.nselected = nTime
initialize(o_TOD_droplistbox)
activate(o_TOD_droplistbox)
}
for (k = 0; k < nInfoCount; k++)
{
if(oIP[k].location.x == location.x && oIP[k].location.y == location.y)
{
deactivate(oIP[k])
}
else
{
activate(oIP[k])
}
}
for (k = 0; k < nNavCount; k++)
{
if(oNP[k].location.x == location.x && oNP[k].location.y == location.y)
{
deactivate(oNP[k])
}
else
{
activate(oNP[k])
}
}
for (k = 0; k < nDropCount; k++)
{
if(oDP[k].location.x == location.x && oDP[k].location.y == location.y)
{
deactivate(oDP[k])
}
else
{
activate(oDP[k])
}
}
}
GUI_DEACTIVATE
{
deactivate(oMissMap)
deactivate(oCampIcon)
deactivate(oCampIconTitle)
deactivate(oNavOff)
deactivate(oDropOff)
deactivate(oInfoOff)
deactivate(oNavTitle)
deactivate(oDropTitle)
deactivate(oInfoTitle)
deactivate(o_TOD_droplistbox)
for (k = 0; k < nInfoCount; k++)
{
deactivate(oIP[k])
}
for (k = 0; k < nNavCount; k++)
{
deactivate(oNP[k])
}
for (k = 0; k < nDropCount; k++)
{
deactivate(oDP[k])
}
}
GUI_MAILBOX
{
switch (getmessage())
{
case nMSG_CLICKED:
switch(sender)
{
case oCampIcon:
mail(nMSG_CAMPAIGNRETURN,parent)
break
}
break
}
switch (sender)
{
case o_TOD_droplistbox:
{
nTime = o_TOD_droplistbox.nSelected
callback($$Shell_CallbackHandler$$, ShellSetTime,nTime)
}
break
case oNavOff:
{
if(nNavToggle)
{
for (k = 0; k < nNavCount; k++)
{
deactivate(oNP[k])
}
nNavToggle = 0
}
else
{
for (k = 0; k < nNavCount; k++)
{
if(oNP[k].location.x == location.x && oNP[k].location.y == location.y)
{
deactivate(oNP[k])
}
else
{
activate(oNP[k])
}
}
nNavToggle = 1
}
}
break
case oDropOff:
{
if(nDropToggle)
{
for (k = 0; k < nDropCount; k++)
{
deactivate(oDP[k])
}
nDropToggle = 0
}
else
{
for (k = 0; k < nDropCount; k++)
{
if(oDP[k].location.x == location.x && oDP[k].location.y == location.y)
{
deactivate(oDP[k])
}
else
{
activate(oDP[k])
}
}
nDropToggle = 1
}
}
break
case oInfoOff:
{
if(nInfoToggle)
{
for (k = 0; k < nInfoCount; k++)
{
deactivate(oIP[k])
}
nInfoToggle = 0
}
else
{
for (k = 0; k < nInfoCount; k++)
{
if(oIP[k].location.x == location.x && oIP[k].location.y == location.y)
{
deactivate(oIP[k])
}
else
{
activate(oIP[k])
}
}
nInfoToggle = 1
}
}
break
}
}
}
s_CampaignScreen
{
GUI_CREATE
{
int i
int k
int nMR_count
int nMRSelected
string szCampMap
string szCampName
object oCampMap = s_Pane
oCampMap.nFrames = 1
oCampMap.nCurrFrame = 0
oCampMap.nMode = 0
oCampMap.fVolatile = 0
oCampMap.fRegion = 1
//Mission Region Data
callback($$Shell_CallbackHandler$$,ShellCampaignGetMissionRegionCount,nMR_count)
object oMissionRegion[nMR_count]
//Array of Mission Ids to retrieve Mission Map Data
int nMissionIds[nMR_count]
//MR parameters
int nMR_X
int nMR_Y
int nMR_H
int nMR_W
int nMR_status
int nMRNumLance
string szMR_Title
string szMR_Rollover
string szMR_RClick
// //Mission Region InfoPoints
// object oIP[32]
// int nIP_X
// int nIP_Y
// int nIP_H
// int nIP_W
// string szIP_Title
// string szIP_Rollover
// string szIP_RClick
}
GUI_INIT
{
callback($$Shell_CallbackHandler$$,ShellCampaignGetMissionRegionIDs,nMissionIds[], nMRSelected)
callback($$Shell_CallbackHandler$$,ShellCampaignGetOpData,szCampName,szCampMap)
parent.nMRID = nMissionIds[0]
parent.nMRIDHolder = 0
//Campaign Map
oCampMap.nHelpID = IDS_HELP_CM_CAMPAIGN_MAP
oCampMap.location = location
if(equal$(szCampMap,""))
{
oCampMap.szBitmap = MAPPATH "CM_00.tga"
}
else
{
oCampMap.szBitmap = MAPPATH szCampMap
}
initialize(oCampMap)
for (i = 0; i < nMR_count; i++)
{
callback($$Shell_CallbackHandler$$,ShellCampaignGetMissionRegionDATA,nMissionIds[i],nMR_X,nMR_Y,nMR_H,nMR_W,nMR_status, nMRNumLance, szMR_Title,szMR_Rollover, szMR_RClick)
oMissionRegion[i] = s_MissionRegion
oMissionRegion[i].holder = i
oMissionRegion[i].nID = nMissionIds[i]
oMissionRegion[i].nNumLance = nMRNumLance
oMissionRegion[i].location.x = location.x + nMR_X
oMissionRegion[i].location.y = location.y + nMR_Y
oMissionRegion[i].nMRWidth = nMR_W
oMissionRegion[i].nMRHeight = nMR_H
oMissionRegion[i].szMRTitle = szMR_Title
oMissionRegion[i].szRollover = szMR_Rollover
oMissionRegion[i].szRightClick = szMR_RClick
oMissionRegion[i].nMR_status = nMR_status
initialize(oMissionRegion[i])
if(nMissionIds[i] = nMRSelected)
{
parent.nPilotCount = nMRNumLance
mail(nMSG_INITLANCE,parent)
}
}
}
GUI_ACTIVATE
{
activate(oCampMap)
for (i = 0; i < nMR_count; i++)
{
activate(oMissionRegion[i])
}
}
GUI_DEACTIVATE
{
deactivate(oCampMap)
for (i = 0; i < nMR_count; i++)
{
deactivate(oMissionRegion[i])
}
}
GUI_MAILBOX
{
switch (getmessage())
{
case nMSG_MRCLICKED:
{
callback($$Shell_CallbackHandler$$,ShellCampaignSetMission, sender.nID)
nMRSelected = sender.holder
parent.nMRID = nMissionIds[sender.holder]
parent.nMRIDHolder = sender.holder
parent.nMissionHelp = sender.szRollover
parent.nPilotCount = sender.nNumLance
mail(nMSG_INITLANCE,parent)
mail(nMSG_INITMISSION,parent)
}
break
}
}
}