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.
163 lines
3.7 KiB
Plaintext
163 lines
3.7 KiB
Plaintext
#include "Content\\ShellScripts\\ScriptStrings.h"
|
|
#include "Content\\ShellScripts\\stddefs.h"
|
|
#include "Content\\ShellScripts\\buttons.script"
|
|
|
|
main
|
|
{
|
|
GUI_CREATE
|
|
{
|
|
// use the whole region
|
|
location = 0, 0, 0
|
|
region = 0, 0 to getresx(), getresy()
|
|
|
|
object screen = o_RemovePilotModal
|
|
}
|
|
}
|
|
|
|
o_RemovePilotModal
|
|
{
|
|
GUI_CREATE
|
|
{
|
|
Font3d gHeaderFont3d = szPATH_FONTS localize$(IDS_F_DIALOG_TITLE)
|
|
Font3d gFont3d = szPATH_FONTS localize$(IDS_F_GEN_DESCRIPTION)
|
|
|
|
pane gFrame = GPATH "dialog_500x300m.tga"
|
|
|
|
|
|
// Initialize the OK and Cancel buttons
|
|
int iloop
|
|
object mbutton[2]
|
|
for(iloop = 0; iloop < 2; iloop++)
|
|
{
|
|
mbutton[iloop] = s_multistatepane
|
|
mbutton[iloop].total_states = 3
|
|
mbutton[iloop].textsize = 1
|
|
mbutton[iloop].file = WPATH "button_reg_138x23m_3state.tga"
|
|
mbutton[iloop].id = iloop
|
|
}
|
|
mbutton[0].text = localize$(IDS_GN_YES)
|
|
mbutton[0].location = 180, 395, 10
|
|
mbutton[1].text = localize$(IDS_GN_NO)
|
|
mbutton[1].location = 480, 395, 10
|
|
|
|
for(iloop = 0; iloop < 2; iloop++)
|
|
{
|
|
initialize(mbutton[iloop])
|
|
}
|
|
|
|
framerate = 30
|
|
|
|
sound btnTriggeredSound = SPATH "sfx_button5.wav"
|
|
|
|
// variables for fading in and out
|
|
int alpha_val = 5
|
|
int fadeout = false
|
|
|
|
focus(mbutton[1])
|
|
}
|
|
|
|
GUI_EXECUTE
|
|
{
|
|
if fadeout == true
|
|
{
|
|
// Fading out(Exiting)
|
|
if alpha_val > 0
|
|
{
|
|
alpha_val = alpha_val - 5
|
|
if alpha_val <= 0
|
|
{
|
|
alpha_val = 0
|
|
script_end "RemovePilotModal.script"
|
|
}
|
|
}
|
|
}
|
|
else
|
|
{
|
|
// Fading in(Entering)
|
|
if alpha_val < 150
|
|
{
|
|
alpha_val += 5
|
|
if alpha_val >= 150
|
|
{
|
|
alpha_val = 150
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
GUI_DRAW
|
|
{
|
|
// fade in or fade out
|
|
setpencolor(0, 0, 0, alpha_val)
|
|
drawrect 0, 0 to getresx(), getresy()
|
|
|
|
// Redraw the frame if we are not fading out(exiting)
|
|
if (fadeout == false)
|
|
{
|
|
color (gframe) = packcolor(255, 255, 255, alpha_val)
|
|
render gframe, 150, 150
|
|
|
|
// Header
|
|
print3d_attributes = gHeaderFont3d,0xffffffff,1,0,1,0,0,just_center
|
|
print3d_margins = 150, 150 to 650, 450
|
|
print3d_position = 150, 155
|
|
print3d localize$(IDS_RS_REMOVE_TITLE)
|
|
|
|
print3d_attributes = gFont3d,0xffffffff,1,1,1,0,0
|
|
print3d_margins = 180, 200 to 620, 400
|
|
print3d_position = 180, 200
|
|
print3d localize$(IDS_RS_Q_REMOVE_PILOT1)
|
|
|
|
// pilot name
|
|
print3d_attributes = gFont3d,0xffffffff,1,1,1,0,0
|
|
print3d_margins = 180, 200 to 620, 400
|
|
print3d_position = 180, 250
|
|
int nselected = @PilotEntry@screen.o_players_mclistbox.nselected
|
|
string pilotName = @PilotEntry@screen.o_players_mclistbox.column[0].list_item[nselected]
|
|
print3d pilotName
|
|
|
|
print3d_attributes = gFont3d,0xffffffff,1,1,1,0,0
|
|
print3d_margins = 180, 200 to 620, 400
|
|
print3d_position = 180, 300
|
|
print3d localize$(IDS_RS_Q_REMOVE_PILOT2)
|
|
}
|
|
}
|
|
|
|
GUI_MAILBOX
|
|
{
|
|
// Handle the OK Request
|
|
if (sender == mbutton[0])
|
|
{
|
|
play btnTriggeredSound,1
|
|
unfocus
|
|
|
|
// Pass the data to the Pilot Screen script and let it handle the data
|
|
mail(1, @PilotEntry@screen)
|
|
@PilotEntry@screen.onRemovePilot = 0
|
|
|
|
// Tell this script to fade out and deactivate all its objects
|
|
fadeout = true
|
|
for(iloop = 0; iloop < 2; iloop++)
|
|
{
|
|
deactivate(mbutton[iloop])
|
|
}
|
|
}
|
|
if (sender == mbutton[1])
|
|
{
|
|
play btnTriggeredSound,1
|
|
unfocus
|
|
|
|
// Just tell the Pilot Screen script that no changes should be made
|
|
mail(-1, @PilotEntry@screen)
|
|
@PilotEntry@screen.onRemovePilot = 0
|
|
|
|
// Tell this script to fade out and deactivate all its objects
|
|
fadeout = true
|
|
for(iloop = 0; iloop < 2; iloop++)
|
|
{
|
|
deactivate(mbutton[iloop])
|
|
}
|
|
}
|
|
}
|
|
}
|