Files
firestorm/_UNUSED/GameleapCode5_03/Content/ShellScripts/NetMissionReview.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

441 lines
12 KiB
Plaintext

#include "Content\\ShellScripts\\stddefs.h"
#include "Content\\ShellScripts\\common_shell.script"
#include "Content\\ShellScripts\\ScriptStrings.h"
#include "Content\\ShellScripts\\ShellFunctionHeaders.hpp"
#include "Content\\ShellScripts\\buttons.script"
#include "Content\\ShellScripts\\c_Text.script"
#include "Content\\ShellScripts\\editbox.script"
#include "Content\\ShellScripts\\c_Pane.script"
#include "Content\\ShellScripts\\Multiplayer\\mc_listboxes.script"
#include "Content\\ShellScripts\\c_rollover.script"
#include "Content\\ShellScripts\\NetParams.h"
#include "Content\\GameTypes.h"
main
{
GUI_CREATE
{
// use the whole region
location = 0, 0, 0
// object pointer = o_MousePointer
// pointer.showMousePointer = 1
script_run szPATH_SCRIPTS "NetMouse.script", 0x1900
int MAX_ITEMS = 60
int MAX_MC_ITEMS = 30 //MAXIMUM NUMBER OF ITEMS LISTED
int MAX_MC_COLUMNS = 1
int MAX_MCCB_ITEMS = 30
int MAX_MCCB_COLUMNS = 2
object screen = oReviewScreen
// focus(screen)
}
}
oReviewScreen
{
GUI_CREATE
{
int sender_is_me
int stoped = 0
int VBButtonX = 590
int VBButtonXOff = 45
int VBButtonY = 470
int valid_player
int clicked = 0
//BackGround Pane
object oBackground = s_Pane
oBackground.location = 0,0,10
oBackground.szBitmap = szPATH_GRAPHICS "MP_Review_BackGround.tga"
oBackground.nFrames = 1
oBackground.nMode = 1
oBackground.fVolatile = 0
oBackground.fRegion = 0
initialize(oBackground)
//Text
//Page title
object oPlayerName = s_Text
oPlayerName.location = 35 ,20,nZ_TEXT
oPlayerName.nFontID = IDS_F_LOAD_TITLE
oPlayerName.cTextColor = 0xFFff7200
oPlayerName.nJustify = 3
oPlayerName.nLayoutWidth = 395
oPlayerName.nLayoutHeight = 40
oPlayerName.szText = localize$(IDS_MP_HLM_MISSION_REVIEW)
initialize(oPlayerName)
//Buttons
object o_Close_button = s_multistatepane
o_Close_button.file = WPATH "button_reg_200x27m_4state.tga"
o_Close_button.text = localize$(IDS_OM_VA_CLOSE)
o_Close_button.total_states = 4
o_Close_button.location = VBButtonX - 15,VBButtonY + 60,nZ_BUTTON
initialize (o_Close_button)
object o_play_button = s_multistatepane
o_play_button.file = szPATH_GRAPHICS "MP_R_VidPlay.tga"
o_play_button.text = " "
o_play_button.total_states = 3
o_play_button.location = VBButtonX + (1*VBButtonXOff), VBButtonY , nZ_BUTTON
initialize (o_play_button)
object o_Stop_button = s_multistatepane
o_Stop_button.text = " "
o_Stop_button.total_states = 3
o_Stop_button.location = VBButtonX + (2*VBButtonXOff), VBButtonY, nZ_BUTTON
o_Stop_button.file = szPATH_GRAPHICS "MP_R_VidStop.tga"
initialize (o_Stop_button)
object o_Prev_button = s_multistatepane
o_Prev_button.file = szPATH_GRAPHICS "MP_R_VidBack.tga"
o_Prev_button.text = " "
o_Prev_button.total_states = 3
o_Prev_button.location = VBButtonX + (0*VBButtonXOff), VBButtonY, nZ_BUTTON
initialize (o_Prev_button)
object o_Next_button = s_multistatepane
o_Next_button.file = szPATH_GRAPHICS "MP_R_VidForward.tga"
o_Next_button.text = " "
o_Next_button.total_states = 3
o_Next_button.location = VBButtonX + (3*VBButtonXOff), VBButtonY, nZ_BUTTON
initialize (o_Next_button)
sound btnTriggeredSound = SPATH "sfx_button5.wav"
int nNumMechs = 16
object oMechCatcher[nNumMechs]
int MechX[nNumMechs]
int MechY[nNumMechs]
MechX[0] = 437
MechX[1] = MechX[0] + (1*84)
MechX[2] = MechX[0] + (2*84)
MechX[3] = MechX[0] + (3*84)
MechX[4] = MechX[0]
MechX[5] = MechX[0] + (1*84)
MechX[6] = MechX[0] + (2*84)
MechX[7] = MechX[0] + (3*84)
MechX[8] = MechX[0]
MechX[9] = MechX[0] + (1*84)
MechX[10] = MechX[0] + (2*84)
MechX[11] = MechX[0] + (3*84)
MechX[12] = MechX[0]
MechX[13] = MechX[0] + (1*84)
MechX[14] = MechX[0] + (2*84)
MechX[15] = MechX[0] + (3*84)
MechY[0] = 17
MechY[1] = MechY[0]
MechY[2] = MechY[0]
MechY[3] = MechY[0]
MechY[4] = MechY[0] + (1*102)
MechY[5] = MechY[0] + (1*102)
MechY[6] = MechY[0] + (1*102)
MechY[7] = MechY[0] + (1*102)
MechY[8] = MechY[0] + (2*102)
MechY[9] = MechY[0] + (2*102)
MechY[10] = MechY[0] + (2*102)
MechY[11] = MechY[0] + (2*102)
MechY[12] = MechY[0] + (3*102)
MechY[13] = MechY[0] + (3*102)
MechY[14] = MechY[0] + (3*102)
MechY[15] = MechY[0] + (3*102)
for(int i=0;i<nNumMechs;i++)
{
oMechCatcher[i] = s_MechCatcher
oMechCatcher[i].location= MechX[i],MechY[i],255
oMechCatcher[i].nID = i
initialize(oMechCatcher[i])
}
//---------------------------------------------------
int greatest_x = 0
int greatest_y = 0
int k
int x
object o_chat_box = s_mc_listbox
o_chat_box.location = 35,467,70
o_chat_box.boxFont3d = FPATH localize$(IDS_F_CHAT_BOX) //MUST BE INITIALIZED
o_chat_box.itemWidth = 526 - 16 // //MUST BE INITIALIZED
o_chat_box.itemHeight = 1 //This refers to the height of a step (or scroll distance in pixels) defined by you. NOT the height of all items
o_chat_box.itemHeight_padding = 4//10
o_chat_box.list_size = 0 //MAX_MCCB_ITEMS
o_chat_box.NUM_OF_COLUMNS = 1
o_chat_box.column_header_height = 0 // //MUST BE INITIALIZED
o_chat_box.max_displayed = 529-463//30 // max number of itemheight's. maz_displayed*itemheight = height of listbox //MUST BE INITIALIZED
o_chat_box.uniform_item_height = 0
o_chat_box.SelectedHighlightColor = packcolor (51, 55, 115, 0) //CAN BE INITIALIZED
o_chat_box.boxhighlightColor = packcolor (0,0,0,0) //CAN BE INITIALIZED
o_chat_box.selectedColor = packcolor (255,255,255,0) //CAN BE INITIALIZED
o_chat_box.backColor = packcolor (0, 0, 0, 255) //CAN BE INITIALIZED
o_chat_box.itemhighlightcolor = packcolor (255,255,255,255)
o_chat_box.label = localize$(IDS_MP_LOBBY_CHAT) // //CAN BE INITIALIZED
o_chat_box.labelFont3d = FPATH localize$(IDS_F_GEN_LABEL) //CAN BE INITIALIZED
o_chat_box.offsetLabel = 0,-18 // //CAN BE INITIALIZED offsetLabel of text from button = 0,-25
o_chat_box.buttonwidth = 16 // //CAN BE INITIALIZED
o_chat_box.first_delay = 10 //time delay value n/60; for the buttons
o_chat_box.second_delay = 1 //time delay value n/60; for the buttons
o_chat_box.column[0].location.x = 3
o_chat_box.column[0].fontcolor = packcolor (255,255,255,255)
o_chat_box.column[0].fontAlignment = just_left
for (k = 0; k < o_chat_box.list_size; k++)
{
if exists(o_chat_box.column[0].list_icon[k])
{
if getwidth(o_chat_box.column[0].list_icon[k]) > greatest_x
greatest_x = getwidth(o_chat_box.column[0].list_icon[k])
if getheight(o_chat_box.column[0].list_icon[k]) > greatest_y
greatest_y = getheight(o_chat_box.column[0].list_icon[k])
}
}
if greatest_x > 0 && greatest_y > 0
bitmap_create black = greatest_x,greatest_y //comment out if you don't have any images
for x = 0;x < MAX_MCCB_ITEMS; x++
{
o_chat_box.list_order[x] = x
o_chat_box.column[0].list_item[x] = ""
}
initialize (o_chat_box)
////////////////////////////////////////////////////////////////////////////////////////////////////////////
object o_chat_entry = s_editbox
o_chat_entry.location = 35,543,20
o_chat_entry.boxValue = "" //CAN BE INITIALIZED holds the contents of the edit box
o_chat_entry.boxWidth = 528 //MUST BE INTIALIZED width of the edit field of the box
o_chat_entry.boxHeight = 20 //MUST BE INTIALIZED height of the edit field of the box//
o_chat_entry.boxtextlimit = 100
o_chat_entry.boxFont3d = FPATH localize$(IDS_F_CHAT_ENTRY) //MUST BE INTIALIZED
o_chat_entry.boxTextOffset = 3,3 //CAN BE INITIALIZED
o_chat_entry.labelFont3d = FPATH localize$(IDS_F_GEN_LABEL) //MUST BE INTIALIZED
o_chat_entry.offset = -190,0 //CAN BE INITIALIZED offset of text from button
o_chat_entry.Auto_Update = FALSE
enableIME(true, o_chat_entry)
initialize (o_chat_entry)
focus(o_chat_entry)
}
GUI_CHAR
{
if getchar() > 0
o_chat_entry.boxValue = o_chat_entry.boxValue chr$(getchar())
focus(o_chat_entry)
o_chat_entry.highlight = false
}
GUI_EXECUTE
{
if $$m_currentChatCount$$ > 0
{
string temp_val = $$m_chatFrom$$[$$m_currentChatCount$$-1] ":> " $$m_chatArray$$[$$m_currentChatCount$$-1]
if equal$(temp_val,o_chat_box.column[0].list_item[$$m_currentChatCount$$-1])
{
}
else
{
o_chat_box.list_size = $$m_currentChatCount$$
for x = 0;x < $$m_currentChatCount$$; x++
{
o_chat_box.column[0].list_item[x] = $$m_chatFrom$$[x] ":> " $$m_chatArray$$[x]
}
if (o_chat_box.o_thumbslider.thumb_pressed == false)
{
o_chat_box.reset_location = 2
}
else
{
o_chat_box.reset_location = 1
}
initialize (o_chat_box)
}
}
if sender_is_me == TRUE //&& focused == o_chat_box
{
focus(o_chat_entry)
sender_is_me = FALSE
}
focus(o_chat_entry)
}
GUI_MAILBOX
{
switch (sender)
{
case o_Close_button:
{
play btnTriggeredSound,1
unfocus
callback($$SetShellCommand$$, ReturnNetworkLobbyCommand)
script_end @NetMouse@
}
break
case o_play_button:
{
play btnTriggeredSound,1
callback($$Shell_CallbackHandler$$,MissionReviewSlowDown)
unfocus
}
break
case o_Stop_button:
{
if(stoped == 0)
{
stoped = 1
o_Stop_button.file = szPATH_GRAPHICS "MP_R_VidStop1.tga"
initialize (o_Stop_button)
}
else
if(stoped == 1)
{
stoped = 0
o_Stop_button.file = szPATH_GRAPHICS "MP_R_VidStop.tga"
initialize (o_Stop_button)
}
play btnTriggeredSound,1
callback($$Shell_CallbackHandler$$,MissionReviewPause)
unfocus
}
break
case o_Prev_button:
{
play btnTriggeredSound,1
callback($$Shell_CallbackHandler$$,MissionReviewRewind)
unfocus
}
break
case o_Next_button:
{
play btnTriggeredSound,1
callback($$Shell_CallbackHandler$$,MissionReviewSpeedUp)
unfocus
}
break
case o_chat_entry:
{
int out_going_count = 0
for int loopit = 0; loopit < 255; loopit++
{
valid_player = callback($$IsPlayerConnectionValid$$,loopit)
if (valid_player)
{
$$m_outgiongChatToPlayer$$[out_going_count] = loopit
out_going_count++
}
}
$$m_outgoingChatToPlayerCount$$ = out_going_count
$$m_outgoingChat$$ = o_chat_entry.boxvalue
sender_is_me = true
callback($$SendChat$$)
o_chat_entry.boxvalue = ""
initialize(o_chat_entry)
sender_is_me = true
focus(o_chat_entry)
}
break
}
// switch (getmessage())
// {
// case :
// {
// }
// break
// }
}
GUI_DESTROY
{
focus(NULL)
}
}
s_MechCatcher
{
GUI_CREATE
{
int nID
int nX = 79
int nY = 90
int overme
region = 0,0 to nX,nY
int cOver = packcolor(0,137,254,40)
int cSelected = packcolor(0,0,254,80)
}
REGION_ENTERED
{
overme = 1
}
REGION_EXITED
{
overme = 0
}
LBUTTON_UPDATE
{
if (mouse.left == BUTTON_CLICKED)
{
callback($$Shell_CallbackHandler$$,MissionReviewCenterOn,nID)
parent.clicked = nID
unfocus
}
}
GUI_DRAW
{
if(overme)
{
setpencolor(cOver)
if(nID == 2 || nID == 6 || nID == 10 || nID == 14)
{
ldrawrect 0,0 to nX+2,nY
}
else
if(nID == 3 || nID == 7 || nID == 11 || nID == 15)
{
ldrawrect 0,0 to nX+3,nY
}
else
{
ldrawrect 0,0 to nX,nY
}
}
if(parent.clicked == nID)
{
setpencolor(cSelected)
if(nID == 2 || nID == 6 || nID == 10 || nID == 14)
{
ldrawrect 0,0 to nX+2,nY
}
else
if(nID == 3 || nID == 7 || nID == 11 || nID == 15)
{
ldrawrect 0,0 to nX+3,nY
}
else
{
ldrawrect 0,0 to nX,nY
}
}
}
}