first commit
This commit is contained in:
Binary file not shown.
|
After Width: | Height: | Size: 89 B |
BIN
Binary file not shown.
|
After Width: | Height: | Size: 89 B |
BIN
Binary file not shown.
|
After Width: | Height: | Size: 140 B |
Binary file not shown.
|
After Width: | Height: | Size: 140 B |
+12
@@ -0,0 +1,12 @@
|
||||
on(construct){
|
||||
m_focusDirs = "Up/Down";
|
||||
m_refFM = "_root.gFM";
|
||||
m_initiallySelected = false;
|
||||
m_tabIndex = -1;
|
||||
m_bVisible = true;
|
||||
m_visibleEntryCount = 3;
|
||||
m_width = 150;
|
||||
m_contentSymbol = "TextDropdownMenuContentSymbol";
|
||||
m_entrySymbol = "std_mouseListboxEntryTextElementSymbol";
|
||||
m_ButtonWidth = 27;
|
||||
}
|
||||
+21
@@ -0,0 +1,21 @@
|
||||
on(construct){
|
||||
m_focusDirs = "Up/Down";
|
||||
m_numEntries = 6;
|
||||
m_vPadding = 5;
|
||||
m_bEnabled = true;
|
||||
m_refFM = "_root.gFM";
|
||||
m_initiallySelected = false;
|
||||
m_tabIndex = -1;
|
||||
m_bVisible = true;
|
||||
m_scrollbarOffset = [];
|
||||
m_scrollbarOffset[0] = 10;
|
||||
m_scrollbarOffset[1] = 0;
|
||||
m_BgVisible = true;
|
||||
m_renderWidth = 0;
|
||||
m_renderHeight = 0;
|
||||
m_backgroundMargin = 2;
|
||||
m_useHighlights = true;
|
||||
m_alternateBackgroundColors = false;
|
||||
m_backgroundColor1 = 0;
|
||||
m_backgroundColor2 = 0;
|
||||
}
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
on(construct){
|
||||
m_nLength = 100;
|
||||
m_nMax = 10;
|
||||
m_nMin = 0;
|
||||
m_nValue = 0;
|
||||
}
|
||||
+21
@@ -0,0 +1,21 @@
|
||||
on(construct){
|
||||
m_focusDirs = "Up/Down";
|
||||
m_numEntries = 6;
|
||||
m_vPadding = 5;
|
||||
m_bEnabled = true;
|
||||
m_refFM = "_root.gFM";
|
||||
m_initiallySelected = false;
|
||||
m_tabIndex = -1;
|
||||
m_bVisible = true;
|
||||
m_scrollbarOffset = [];
|
||||
m_scrollbarOffset[0] = 10;
|
||||
m_scrollbarOffset[1] = 0;
|
||||
m_BgVisible = true;
|
||||
m_renderWidth = 322;
|
||||
m_renderHeight = 165;
|
||||
m_backgroundMargin = 2;
|
||||
m_useHighlights = true;
|
||||
m_alternateBackgroundColors = false;
|
||||
m_backgroundColor1 = 0;
|
||||
m_backgroundColor2 = 0;
|
||||
}
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
on(construct){
|
||||
m_nLength = 100;
|
||||
m_nMax = 10;
|
||||
m_nMin = 0;
|
||||
m_nValue = 0;
|
||||
}
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
on(construct){
|
||||
_type = "RenderImage";
|
||||
_imageMap = "CocommanderPortrait";
|
||||
_mode = "ALPHA";
|
||||
}
|
||||
+18
@@ -0,0 +1,18 @@
|
||||
on(construct){
|
||||
m_width = 200;
|
||||
m_textAlign = true;
|
||||
m_labelPosition = "right align";
|
||||
m_label_x = 0;
|
||||
m_label_y = 0;
|
||||
m_focusDirs = "Up/Down";
|
||||
m_iconType = "default";
|
||||
m_extLabel = "$REPLAY_BRIEFING";
|
||||
m_nTruncateType = 0;
|
||||
m_label = "$REPLAY_BRIEFING";
|
||||
m_bEnabled = true;
|
||||
m_refFM = "_root.gFM";
|
||||
m_initiallySelected = false;
|
||||
m_tabIndex = -1;
|
||||
m_bVisible = true;
|
||||
m_contentSymbol = "play_buttonContentMC";
|
||||
}
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
on(construct){
|
||||
m_numLines = 6;
|
||||
m_width = 462;
|
||||
m_chatMode = 1;
|
||||
m_preservePlacement = false;
|
||||
m_height = 190;
|
||||
}
|
||||
+1
@@ -0,0 +1 @@
|
||||
stop();
|
||||
+1
@@ -0,0 +1 @@
|
||||
stop();
|
||||
+1
@@ -0,0 +1 @@
|
||||
stop();
|
||||
+1
@@ -0,0 +1 @@
|
||||
stop();
|
||||
+1
@@ -0,0 +1 @@
|
||||
stop();
|
||||
+1
@@ -0,0 +1 @@
|
||||
stop();
|
||||
+1
@@ -0,0 +1 @@
|
||||
stop();
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
this._parent.outtroComplete();
|
||||
stop();
|
||||
+1
@@ -0,0 +1 @@
|
||||
stop();
|
||||
+1
@@ -0,0 +1 @@
|
||||
stop();
|
||||
+1
@@ -0,0 +1 @@
|
||||
stop();
|
||||
+1
@@ -0,0 +1 @@
|
||||
stop();
|
||||
+1
@@ -0,0 +1 @@
|
||||
stop();
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
this._parent.introComplete();
|
||||
stop();
|
||||
+1
@@ -0,0 +1 @@
|
||||
stop();
|
||||
+1
@@ -0,0 +1 @@
|
||||
stop();
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
this._parent.outtroComplete();
|
||||
stop();
|
||||
+1
@@ -0,0 +1 @@
|
||||
stop();
|
||||
+1
@@ -0,0 +1 @@
|
||||
stop();
|
||||
+1
@@ -0,0 +1 @@
|
||||
stop();
|
||||
+1
@@ -0,0 +1 @@
|
||||
stop();
|
||||
+1
@@ -0,0 +1 @@
|
||||
stop();
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
this._parent.introComplete();
|
||||
stop();
|
||||
+1
@@ -0,0 +1 @@
|
||||
stop();
|
||||
+1
@@ -0,0 +1 @@
|
||||
stop();
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
this._parent.outtroComplete();
|
||||
stop();
|
||||
+1
@@ -0,0 +1 @@
|
||||
stop();
|
||||
+1
@@ -0,0 +1 @@
|
||||
stop();
|
||||
+1
@@ -0,0 +1 @@
|
||||
stop();
|
||||
+1
@@ -0,0 +1 @@
|
||||
stop();
|
||||
+1
@@ -0,0 +1 @@
|
||||
stop();
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
this._parent.introComplete();
|
||||
stop();
|
||||
+1
@@ -0,0 +1 @@
|
||||
stop();
|
||||
+1
@@ -0,0 +1 @@
|
||||
stop();
|
||||
+1
@@ -0,0 +1 @@
|
||||
stop();
|
||||
+1
@@ -0,0 +1 @@
|
||||
stop();
|
||||
+1
@@ -0,0 +1 @@
|
||||
stop();
|
||||
+1
@@ -0,0 +1 @@
|
||||
stop();
|
||||
+1
@@ -0,0 +1 @@
|
||||
stop();
|
||||
+1
@@ -0,0 +1 @@
|
||||
stop();
|
||||
+1
@@ -0,0 +1 @@
|
||||
stop();
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
this._parent.introComplete();
|
||||
stop();
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
this._parent.outtroComplete();
|
||||
stop();
|
||||
+1
@@ -0,0 +1 @@
|
||||
stop();
|
||||
+1
@@ -0,0 +1 @@
|
||||
stop();
|
||||
+1
@@ -0,0 +1 @@
|
||||
stop();
|
||||
+1
@@ -0,0 +1 @@
|
||||
stop();
|
||||
+1
@@ -0,0 +1 @@
|
||||
stop();
|
||||
+1
@@ -0,0 +1 @@
|
||||
stop();
|
||||
+1
@@ -0,0 +1 @@
|
||||
stop();
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
this._parent.introComplete();
|
||||
stop();
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
this._parent.outtroComplete();
|
||||
stop();
|
||||
+1
@@ -0,0 +1 @@
|
||||
stop();
|
||||
+1
@@ -0,0 +1 @@
|
||||
stop();
|
||||
+1
@@ -0,0 +1 @@
|
||||
stop();
|
||||
+1
@@ -0,0 +1 @@
|
||||
stop();
|
||||
+1
@@ -0,0 +1 @@
|
||||
stop();
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
this._parent.introComplete();
|
||||
stop();
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
this._parent.outtroComplete();
|
||||
stop();
|
||||
+1
@@ -0,0 +1 @@
|
||||
stop();
|
||||
+1
@@ -0,0 +1 @@
|
||||
stop();
|
||||
+1
@@ -0,0 +1 @@
|
||||
stop();
|
||||
+1
@@ -0,0 +1 @@
|
||||
stop();
|
||||
+1
@@ -0,0 +1 @@
|
||||
stop();
|
||||
+1
@@ -0,0 +1 @@
|
||||
stop();
|
||||
+1
@@ -0,0 +1 @@
|
||||
stop();
|
||||
+1
@@ -0,0 +1 @@
|
||||
stop();
|
||||
+1
@@ -0,0 +1 @@
|
||||
stop();
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
this._parent.introComplete();
|
||||
stop();
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
this._parent.outtroComplete();
|
||||
stop();
|
||||
+1
@@ -0,0 +1 @@
|
||||
stop();
|
||||
+1
@@ -0,0 +1 @@
|
||||
stop();
|
||||
+1
@@ -0,0 +1 @@
|
||||
stop();
|
||||
+1
@@ -0,0 +1 @@
|
||||
stop();
|
||||
+1
@@ -0,0 +1 @@
|
||||
stop();
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
this._parent.introComplete();
|
||||
stop();
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
this._parent.outtroComplete();
|
||||
stop();
|
||||
+193
@@ -0,0 +1,193 @@
|
||||
class Cafe2_BaseUIScreen
|
||||
{
|
||||
var m_changeToScreen = null;
|
||||
var m_executeOuttroCallBack = null;
|
||||
var m_uiComponentArray = new Array();
|
||||
function Cafe2_BaseUIScreen(screen)
|
||||
{
|
||||
Cafe2_BaseUIScreen.m_screen = screen;
|
||||
Cafe2_BaseUIScreen.m_screen.onEnterFrame = _global.bind0(this,this.frameDelayedInitCallback);
|
||||
}
|
||||
function frameDelayedInit()
|
||||
{
|
||||
trace("\n\nCafe2_BaseUIScreen::frameDelayedInitCallback() :");
|
||||
var _loc1_ = new Array("N.B. You *must* override frameDelayedInit() in your","\nscreens and move the call to initGUI() to frameDelayedInit().\n");
|
||||
trace(_loc1_[0] + _loc1_[1]);
|
||||
}
|
||||
function frameDelayedInitCallback()
|
||||
{
|
||||
Cafe2_BaseUIScreen.m_screen.onEnterFrame = null;
|
||||
this.frameDelayedInit();
|
||||
}
|
||||
function outtroComplete(theComponent)
|
||||
{
|
||||
trace("Cafe2_BaseUIScreen::outtroComplete() " + theComponent);
|
||||
var _loc2_ = 0;
|
||||
while(_loc2_ < Cafe2_BaseUIScreen.m_thisClass.m_uiComponentArray.length)
|
||||
{
|
||||
if(theComponent == Cafe2_BaseUIScreen.m_thisClass.m_uiComponentArray[_loc2_])
|
||||
{
|
||||
break;
|
||||
}
|
||||
_loc2_ = _loc2_ + 1;
|
||||
}
|
||||
Cafe2_BaseUIScreen.m_thisClass.m_uiComponentArray.splice(_loc2_,1);
|
||||
if(Cafe2_BaseUIScreen.m_thisClass.m_uiComponentArray.length <= 0)
|
||||
{
|
||||
if(Cafe2_BaseUIScreen.m_thisClass.m_changeToScreen != null)
|
||||
{
|
||||
_global.gSM.changeMainScreen(Cafe2_BaseUIScreen.m_thisClass.m_changeToScreen);
|
||||
}
|
||||
}
|
||||
}
|
||||
function introComplete(theComponent)
|
||||
{
|
||||
trace("Cafe2_BaseUIScreen::introComplete()");
|
||||
theComponent.restoreVisualState();
|
||||
Cafe2_BaseUIScreen.m_thisClass.m_introCount--;
|
||||
if(Cafe2_BaseUIScreen.m_thisClass.m_introCount <= 0)
|
||||
{
|
||||
Cafe2_BaseUIScreen.m_thisClass.onIntrosComplete();
|
||||
}
|
||||
}
|
||||
function onIntrosComplete()
|
||||
{
|
||||
trace("Cafe2_BaseUIScreen::onIntrosComplete()");
|
||||
_global.gEH.setLocalEventHandler(this.localEventHandler);
|
||||
_global.gEH.enableCurrentLocalEventHandler();
|
||||
}
|
||||
function registerIntroOuttroComponents(components)
|
||||
{
|
||||
trace("Cafe2_BaseUIScreen::registerIntroOuttroComponents()");
|
||||
this.m_uiComponentArray = components;
|
||||
this.m_introCount = this.m_uiComponentArray.length;
|
||||
var _loc2_ = 0;
|
||||
while(_loc2_ < this.m_introCount)
|
||||
{
|
||||
this.m_uiComponentArray[_loc2_].setIntroCallback(this.introComplete);
|
||||
_loc2_ = _loc2_ + 1;
|
||||
}
|
||||
}
|
||||
function executeBackFunction(theComponent)
|
||||
{
|
||||
trace("Cafe2_BaseUIScreen::executeBackFunction" + theComponent);
|
||||
var _loc2_ = 0;
|
||||
while(_loc2_ < Cafe2_BaseUIScreen.m_thisClass.m_uiComponentArray.length)
|
||||
{
|
||||
if(theComponent == Cafe2_BaseUIScreen.m_thisClass.m_uiComponentArray[_loc2_])
|
||||
{
|
||||
break;
|
||||
}
|
||||
_loc2_ = _loc2_ + 1;
|
||||
}
|
||||
Cafe2_BaseUIScreen.m_thisClass.m_uiComponentArray.splice(_loc2_,1);
|
||||
if(Cafe2_BaseUIScreen.m_thisClass.m_uiComponentArray.length <= 0)
|
||||
{
|
||||
_global.gSM.goBackScreen();
|
||||
}
|
||||
}
|
||||
function startIntro()
|
||||
{
|
||||
trace("Cafe2_BaseUIScreen::startIntro()");
|
||||
var _loc3_ = this.m_uiComponentArray.length;
|
||||
var _loc2_ = 0;
|
||||
while(_loc2_ < _loc3_)
|
||||
{
|
||||
this.m_uiComponentArray[_loc2_].intro();
|
||||
_loc2_ = _loc2_ + 1;
|
||||
}
|
||||
}
|
||||
function startOuttro(newScreen)
|
||||
{
|
||||
trace("Cafe2_BaseUIScreen::startOuttro");
|
||||
this.m_changeToScreen = newScreen;
|
||||
var _loc3_ = Cafe2_BaseUIScreen.m_thisClass.m_uiComponentArray.length;
|
||||
if(_loc3_ > 0)
|
||||
{
|
||||
var _loc2_ = 0;
|
||||
while(_loc2_ < _loc3_)
|
||||
{
|
||||
Cafe2_BaseUIScreen.m_thisClass.m_uiComponentArray[_loc2_].outtro(this.outtroComplete);
|
||||
_loc2_ = _loc2_ + 1;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
this.outtroComplete(null);
|
||||
}
|
||||
}
|
||||
function startOuttroAndCallBack(doAfterOuttroComplete)
|
||||
{
|
||||
trace("Cafe2_BaseUIScreen::startOuttro");
|
||||
this.m_executeOuttroCallBack = doAfterOuttroComplete;
|
||||
var _loc3_ = Cafe2_BaseUIScreen.m_thisClass.m_uiComponentArray.length;
|
||||
if(_loc3_ > 0)
|
||||
{
|
||||
var _loc2_ = 0;
|
||||
while(_loc2_ < _loc3_)
|
||||
{
|
||||
Cafe2_BaseUIScreen.m_thisClass.m_uiComponentArray[_loc2_].outtro(this.outtroAndCallBackComplete);
|
||||
_loc2_ = _loc2_ + 1;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
this.outtroAndCallBackComplete(null);
|
||||
}
|
||||
}
|
||||
function outtroAndCallBackComplete(theComponent)
|
||||
{
|
||||
trace("Cafe2_BaseUIScreen::outtroComplete() " + theComponent);
|
||||
var _loc1_ = 0;
|
||||
while(_loc1_ < Cafe2_BaseUIScreen.m_thisClass.m_uiComponentArray.length)
|
||||
{
|
||||
if(theComponent == Cafe2_BaseUIScreen.m_thisClass.m_uiComponentArray[_loc1_])
|
||||
{
|
||||
break;
|
||||
}
|
||||
_loc1_ = _loc1_ + 1;
|
||||
}
|
||||
Cafe2_BaseUIScreen.m_thisClass.m_uiComponentArray.splice(_loc1_,1);
|
||||
if(Cafe2_BaseUIScreen.m_thisClass.m_uiComponentArray.length <= 0)
|
||||
{
|
||||
Cafe2_BaseUIScreen.m_thisClass.m_executeOuttroCallBack();
|
||||
}
|
||||
}
|
||||
function backButtonClicked()
|
||||
{
|
||||
trace("Cafe2_BaseUIScreen::backButtonClicked()");
|
||||
var _loc3_ = Cafe2_BaseUIScreen.m_thisClass.m_uiComponentArray.length;
|
||||
if(_loc3_ > 0)
|
||||
{
|
||||
var _loc2_ = 0;
|
||||
while(_loc2_ < _loc3_)
|
||||
{
|
||||
Cafe2_BaseUIScreen.m_thisClass.m_uiComponentArray[_loc2_].outtro(Cafe2_BaseUIScreen.m_thisClass.executeBackFunction);
|
||||
_loc2_ = _loc2_ + 1;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
_global.gSM.goBackScreen();
|
||||
}
|
||||
}
|
||||
function localEventHandler(keyCode, controller)
|
||||
{
|
||||
trace("Cafe2_BaseUIScreen::localEventHandler() keyCode == " + keyCode);
|
||||
_global.gFM.handleDefaultInputs(keyCode);
|
||||
}
|
||||
function clearData()
|
||||
{
|
||||
Cafe2_BaseUIScreen.m_screen = null;
|
||||
Cafe2_BaseUIScreen.m_thisClass = null;
|
||||
this.m_changeToScreen = null;
|
||||
this.m_uiComponentArray = null;
|
||||
}
|
||||
function bind0(obj, func)
|
||||
{
|
||||
return function()
|
||||
{
|
||||
func.call(obj);
|
||||
};
|
||||
}
|
||||
}
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
interface IListboxEventListener
|
||||
{
|
||||
}
|
||||
+466
@@ -0,0 +1,466 @@
|
||||
class fes_m_objectivesBriefing extends Cafe2_BaseUIScreen implements IListboxEventListener
|
||||
{
|
||||
static var OB_PANEL_CHAT = 0;
|
||||
static var OB_PANEL_MISSION_SUMMARY = 1;
|
||||
static var OB_PANEL_CO_COMMANDER = 2;
|
||||
static var OB_PANEL_MAX = 3;
|
||||
var m_Difficulty = 0;
|
||||
var m_isGoingBackToMissionBriefing = false;
|
||||
var m_subtitle = false;
|
||||
var m_subtitleVisible = false;
|
||||
function fes_m_objectivesBriefing(screen)
|
||||
{
|
||||
super(screen);
|
||||
Cafe2_BaseUIScreen.m_thisClass = this;
|
||||
this.m_localMessageHandlerFunc = _global.bind1DynamicParams(this,this.localMessageHandler);
|
||||
m_mapIds = new Array();
|
||||
}
|
||||
function OnListboxIndexMouseClick(index, previouslySelectedIndex)
|
||||
{
|
||||
}
|
||||
function OnListboxIndexElementMouseClick(index, element, previouslySelectedIndex)
|
||||
{
|
||||
}
|
||||
function frameDelayedInit()
|
||||
{
|
||||
this.initGUI();
|
||||
_global.gMH.addMessageHandler(this.m_localMessageHandlerFunc);
|
||||
}
|
||||
function initGUI()
|
||||
{
|
||||
var ret = new Object();
|
||||
// Checked
|
||||
loadVariables("QueryGameEngine?CAMPAIGN_MISSION",ret);
|
||||
this.m_missionIdx = ret.CAMPAIGN_MISSION;
|
||||
this.initButtons();
|
||||
this.initPanels();
|
||||
Cafe2_BaseUIScreen.m_screen.mcGameStartsIn._visible = false;
|
||||
Cafe2_BaseUIScreen.m_screen.subtitleMC.textMC.subtitleTF.text = "";
|
||||
Cafe2_BaseUIScreen.m_screen.subtitleMC.gotoAndPlay("_init");
|
||||
var ret = new Object();
|
||||
// Checked
|
||||
loadVariables("QueryGameEngine?GAME_SETTING?Setting=GAME_SHOW_SUBTITLES",ret);
|
||||
var dataStrList = ret.DATA.split(",");
|
||||
this.m_subtitle = Number(dataStrList[0]) == 0 ? false : true;
|
||||
this.m_subtitleVisible = false;
|
||||
trace("fes_m_objectivesBriefing:initGUI: showSubtitle = " + this.m_subtitle);
|
||||
_global.objBriefing = this;
|
||||
this.registerIntroOuttroComponents([Cafe2_BaseUIScreen.m_screen.btnBack,Cafe2_BaseUIScreen.m_screen.btnMainMenu,Cafe2_BaseUIScreen.m_screen.btnPlay,Cafe2_BaseUIScreen.m_screen.panelMap.btnReplayMap]);
|
||||
this.startIntro();
|
||||
_global.gSM.setOnExitScreen(_global.bind0(this,this.onScreenExit));
|
||||
}
|
||||
function requestShowSubtitle()
|
||||
{
|
||||
trace("fes_m_objectivesBriefing::requestShowSubtitle: " + this.m_subtitle);
|
||||
if(this.m_subtitle && !this.m_subtitleVisible)
|
||||
{
|
||||
Cafe2_BaseUIScreen.m_screen.subtitleMC.gotoAndPlay("_fadeIn");
|
||||
this.m_subtitleVisible = true;
|
||||
}
|
||||
}
|
||||
function setSubtitle(token)
|
||||
{
|
||||
trace("fes_m_objectivesBriefing::setSubtitle: " + this.m_subtitle);
|
||||
if(this.m_subtitle)
|
||||
{
|
||||
Cafe2_BaseUIScreen.m_screen.subtitleMC.textMC.subtitleTF.text = token + "&Outline";
|
||||
}
|
||||
}
|
||||
function requestHideSubtitle()
|
||||
{
|
||||
trace("fes_m_objectivesBriefing::requestHideSubtitle");
|
||||
if(this.m_subtitleVisible)
|
||||
{
|
||||
this.m_subtitleVisible = false;
|
||||
Cafe2_BaseUIScreen.m_screen.subtitleMC.gotoAndPlay("_fadeOut");
|
||||
}
|
||||
}
|
||||
function initButtons()
|
||||
{
|
||||
var btnMainMenuComponent = Cafe2_BaseUIScreen.m_screen.btnMainMenu;
|
||||
var btnPlayComponent = Cafe2_BaseUIScreen.m_screen.btnPlay;
|
||||
var btnBackComponent = Cafe2_BaseUIScreen.m_screen.btnBack;
|
||||
var gfxCoCmdrCheckmarkComponent = Cafe2_BaseUIScreen.m_screen.commanderPanelMC.gfxCoCmdrCheckmark;
|
||||
switch(_global.GAME.COOPMODE)
|
||||
{
|
||||
case _global.ENUM.GAME_COOPMODE_AI:
|
||||
btnMainMenuComponent._visible = false;
|
||||
btnMainMenuComponent.disable();
|
||||
btnPlayComponent._visible = true;
|
||||
btnPlayComponent.enable();
|
||||
btnPlayComponent.setOnMouseUpFunction(_global.bind0(this,this.OnPlayClicked));
|
||||
btnBackComponent._visible = true;
|
||||
btnBackComponent.enable();
|
||||
btnBackComponent.setOnMouseUpFunction(_global.bind0(this,this.onBackClicked));
|
||||
gfxCoCmdrCheckmarkComponent._visible = true;
|
||||
break;
|
||||
case _global.ENUM.GAME_COOPMODE_HOST:
|
||||
btnMainMenuComponent._visible = true;
|
||||
btnMainMenuComponent.enable();
|
||||
btnMainMenuComponent.setOnMouseUpFunction(_global.bind0(this,this.OnAbortClicked));
|
||||
btnMainMenuComponent.setLabel("$ABORT_BUTTON");
|
||||
btnPlayComponent._visible = true;
|
||||
btnPlayComponent.disable();
|
||||
btnPlayComponent.setOnMouseUpFunction(_global.bind0(this,this.OnPlayClicked));
|
||||
btnBackComponent._visible = true;
|
||||
btnBackComponent.enable();
|
||||
btnBackComponent.setOnMouseUpFunction(_global.bind0(this,this.onBackClicked));
|
||||
gfxCoCmdrCheckmarkComponent._visible = false;
|
||||
radTopRight.setText("$CHAT");
|
||||
break;
|
||||
default:
|
||||
btnMainMenuComponent._visible = true;
|
||||
btnMainMenuComponent.enable();
|
||||
btnMainMenuComponent.setOnMouseUpFunction(_global.bind0(this,this.OnAbortClicked));
|
||||
btnMainMenuComponent.setLabel("$ABORT_BUTTON");
|
||||
btnPlayComponent.setText("$READY");
|
||||
btnPlayComponent._visible = true;
|
||||
btnPlayComponent.enable();
|
||||
btnPlayComponent.setOnMouseUpFunction(_global.bind0(this,this.OnPlayClicked));
|
||||
gfxCoCmdrCheckmarkComponent._visible = false;
|
||||
btnBackComponent._visible = false;
|
||||
btnBackComponent.disable();
|
||||
radTopRight.setText("$CHAT");
|
||||
}
|
||||
Cafe2_BaseUIScreen.m_screen.rctlTopTabs.SetSelectedRadioButton(Cafe2_BaseUIScreen.m_screen.radTopLeft);
|
||||
Cafe2_BaseUIScreen.m_screen.radTopLeft.setOnMouseDownFunction(_global.bind0(this,this.OnTopLeftClicked));
|
||||
Cafe2_BaseUIScreen.m_screen.radTopRight.setOnMouseDownFunction(_global.bind0(this,this.OnTopRightClicked));
|
||||
Cafe2_BaseUIScreen.m_screen.panelMap.btnReplayMap._visible = true;
|
||||
Cafe2_BaseUIScreen.m_screen.panelMap.btnReplayMap.enable();
|
||||
Cafe2_BaseUIScreen.m_screen.panelMap.btnReplayMap.setOnMouseUpFunction(_global.bind0(this,this.OnReplayMapClicked));
|
||||
}
|
||||
function initPanels()
|
||||
{
|
||||
var ret = new Object();
|
||||
// 该变量从未使用过
|
||||
var arr = new Array();
|
||||
var difficultyMap = ["$EASYDIFFICULTY","$MEDIUMDIFFICULTY","$HARDDIFFICULTY"];
|
||||
var ddDifficultyComponent = Cafe2_BaseUIScreen.m_screen.panelDifficulty.ddDifficulty;
|
||||
ddDifficultyComponent.setData(difficultyMap,difficultyMap);
|
||||
ddDifficultyComponent.setOnChange(_global.bind0(this,this.OnDifficultyClicked));
|
||||
ddDifficultyComponent.setSelectedIndex(1);
|
||||
ddDifficultyComponent.show();
|
||||
this.updateDifficultySetting();
|
||||
switch(_global.GAME.COOPMODE)
|
||||
{
|
||||
case _global.ENUM.GAME_COOPMODE_AI:
|
||||
this.initAIPanel();
|
||||
// Checked
|
||||
getUrl("FSCommand:CallGameFunction", "%Mission_SetAI?AIIndex=0");
|
||||
this.initSoloCampaignPlayerSlots();
|
||||
ddDifficultyComponent.enable();
|
||||
break;
|
||||
case _global.ENUM.GAME_COOPMODE_HOST:
|
||||
ddDifficultyComponent.enable();
|
||||
this.initCoopCampaignPlayerSlots();
|
||||
break;
|
||||
case _global.ENUM.GAME_COOPMODE_CLIENT:
|
||||
ddDifficultyComponent.disable();
|
||||
this.initCoopCampaignPlayerSlots();
|
||||
}
|
||||
this.displayObjectiveBriefingText();
|
||||
// Checked
|
||||
loadVariables(
|
||||
"QueryGameEngine?CAMPAIGN_SHORT_MISSION_NAME&MISSION_BRIEFING_FLA?MissionIndex=" +
|
||||
this.m_missionIdx,
|
||||
ret
|
||||
);
|
||||
var missionBriefingFlashMoviePath = ret.MISSION_BRIEFING_FLA;
|
||||
if(missionBriefingFlashMoviePath != undefined)
|
||||
{
|
||||
this.m_mcMap = Cafe2_BaseUIScreen.m_screen.panelMap.mcMapClip;
|
||||
this.m_mcMap.loadMovie(missionBriefingFlashMoviePath + ".swf");
|
||||
this.m_mcMap._visible = true;
|
||||
this.m_mcMap.briefingMC.gotoAndPlay(1);
|
||||
}
|
||||
else
|
||||
{
|
||||
trace("ERROR: No mission briefing fla specified for mission " + this.m_missionIdx + " in fes_m_objectivesBriefing::initPanels()");
|
||||
}
|
||||
Cafe2_BaseUIScreen.m_screen.panelMap.tfMissionName.text = ret.CAMPAIGN_SHORT_MISSION_NAME;
|
||||
this.setCurrentPanel(fes_m_objectivesBriefing.OB_PANEL_MISSION_SUMMARY);
|
||||
}
|
||||
function refreshReadyCheckbox()
|
||||
{
|
||||
var gfxCoCmdrCheckmarkComponent = Cafe2_BaseUIScreen.m_screen.commanderPanelMC.gfxCoCmdrCheckmark;
|
||||
var ret = new Object();
|
||||
// Checked
|
||||
loadVariables("QueryGameEngine?READY_STATUS?Slot=1",ret);
|
||||
var readyStatusValueBoolean = ret.READY_STATUS_VALUE == "1";
|
||||
gfxCoCmdrCheckmarkComponent._visible = readyStatusValueBoolean;
|
||||
if(_global.GAME.COOPMODE == _global.ENUM.GAME_COOPMODE_HOST)
|
||||
{
|
||||
if(readyStatusValueBoolean)
|
||||
{
|
||||
Cafe2_BaseUIScreen.m_screen.btnPlay.enable();
|
||||
}
|
||||
else
|
||||
{
|
||||
Cafe2_BaseUIScreen.m_screen.btnPlay.disable();
|
||||
}
|
||||
}
|
||||
}
|
||||
function refreshDifficulty()
|
||||
{
|
||||
var ret = new Object();
|
||||
// Checked
|
||||
loadVariables("QueryGameEngine?CAMPAIGN_DIFFICULTY",ret);
|
||||
Cafe2_BaseUIScreen.m_screen.panelDifficulty.ddDifficulty.setSelectedIndex(ret.CAMPAIGN_DIFFICULTY);
|
||||
}
|
||||
function localMessageHandler(messageCode)
|
||||
{
|
||||
var flag = true;
|
||||
switch(messageCode)
|
||||
{
|
||||
case _global.MSGCODE.FE_MP_UPDATE_GAME_SETTINGS:
|
||||
this.refreshReadyCheckbox();
|
||||
this.refreshDifficulty();
|
||||
flag = true;
|
||||
break;
|
||||
case _global.MSGCODE.FE_COOP_CAMPAIGN_STAGING_STEP_MISSION_BRIEFING:
|
||||
this.goToPreviousScreen();
|
||||
break;
|
||||
case _global.MSGCODE.FE_COOP_CAMPAIGN_STAGING_START_COUNT_DOWN:
|
||||
this.setCurrentPanel(fes_m_objectivesBriefing.OB_PANEL_CHAT);
|
||||
break;
|
||||
default:
|
||||
flag = false;
|
||||
}
|
||||
return flag;
|
||||
}
|
||||
function onScreenExit()
|
||||
{
|
||||
trace("fes_m_objectivesBriefing::onScreenExit(), LAST_VO_PLAYED = " + _global.SOUND.LAST_VO_PLAYED);
|
||||
_global.stopSound(_global.SOUND.LAST_VO_PLAYED);
|
||||
this.m_mcMap.unloadMovie();
|
||||
this.m_mcMap = null;
|
||||
_global.gMH.removeMessageHandler(this.m_localMessageHandlerFunc);
|
||||
delete this.m_localMessageHandlerFunc;
|
||||
this.m_localMessageHandlerFunc = null;
|
||||
if(!this.m_isGoingBackToMissionBriefing)
|
||||
{
|
||||
_global.PlayShellMusic(_global.SOUND.SHELL_MAIN);
|
||||
}
|
||||
this.clearData();
|
||||
delete _global.fes_m_objectivesBriefing;
|
||||
delete _global.Cafe2_BaseUIScreen;
|
||||
}
|
||||
function onBackClicked()
|
||||
{
|
||||
// Checked
|
||||
getUrl("FSCommand:CallGameFunction", "%StopMissionLaunch");
|
||||
// Checked
|
||||
getUrl("FSCommand:CallGameFunction", "%CoopCampaignFlow_MissionBriefing");
|
||||
this.goToPreviousScreen();
|
||||
}
|
||||
function goToPreviousScreen()
|
||||
{
|
||||
this.m_isGoingBackToMissionBriefing = true;
|
||||
_global.gSM.goBackScreen();
|
||||
}
|
||||
function OnAbortClicked()
|
||||
{
|
||||
// Checked
|
||||
getUrl("FSCommand:CallGameFunction", "Campaign_ExitGame");
|
||||
_global.GAME.MODE = _global.ENUM.GAME_MODE_NONE;
|
||||
// Checked
|
||||
getUrl("FSCommand:CallGameFunction", "%SetGameSetupMode?Mode=None");
|
||||
_global.gSM.changeMainScreen(_global.SCREEN.FEG_MAIN_MENU);
|
||||
}
|
||||
function OnPlayClicked()
|
||||
{
|
||||
if(_global.GAME.COOPMODE == _global.ENUM.GAME_COOPMODE_CLIENT)
|
||||
{
|
||||
this.toggleReadyStatus();
|
||||
}
|
||||
else
|
||||
{
|
||||
if(_global.GAME.COOPMODE == _global.ENUM.GAME_COOPMODE_HOST)
|
||||
{
|
||||
// Checked
|
||||
getUrl("FSCommand:CallGameFunction", "%CoopCampaignFlow_StartCountDown");
|
||||
this.setCurrentPanel(fes_m_objectivesBriefing.OB_PANEL_CHAT);
|
||||
}
|
||||
this.startGamePlay();
|
||||
}
|
||||
_global.stopSound(_global.SOUND.LAST_VO_PLAYED);
|
||||
}
|
||||
function toggleReadyStatus()
|
||||
{
|
||||
// Checked
|
||||
getUrl("FSCommand:CallGameFunction", "%ToggleReadyStatus");
|
||||
}
|
||||
function OnReplayMapClicked()
|
||||
{
|
||||
_global.stopSound(_global.SOUND.LAST_VO_PLAYED);
|
||||
this.m_mcMap.gotoAndPlay("_run");
|
||||
}
|
||||
function OnTopRightClicked()
|
||||
{
|
||||
if(_global.GAME.COOPMODE == _global.ENUM.GAME_COOPMODE_AI)
|
||||
{
|
||||
this.setCurrentPanel(fes_m_objectivesBriefing.OB_PANEL_CO_COMMANDER);
|
||||
}
|
||||
else
|
||||
{
|
||||
this.setCurrentPanel(fes_m_objectivesBriefing.OB_PANEL_CHAT);
|
||||
}
|
||||
}
|
||||
function OnTopLeftClicked()
|
||||
{
|
||||
this.setCurrentPanel(fes_m_objectivesBriefing.OB_PANEL_MISSION_SUMMARY);
|
||||
}
|
||||
function OnDifficultyClicked()
|
||||
{
|
||||
this.updateDifficultySetting();
|
||||
}
|
||||
function updateDifficultySetting()
|
||||
{
|
||||
this.m_Difficulty = Cafe2_BaseUIScreen.m_screen.panelDifficulty.ddDifficulty.getCurrentIndex();
|
||||
// Checked
|
||||
getURL("FSCommand:CallGameFunction","%Campaign_SetDifficulty?Difficulty=" + this.m_Difficulty);
|
||||
// Checked
|
||||
getURL("FSCommand:CallGameFunction","%SetCampaignDifficulty?Difficulty=" + this.m_Difficulty);
|
||||
}
|
||||
function startGamePlay()
|
||||
{
|
||||
if(_global.GAME.COOPMODE == _global.ENUM.GAME_COOPMODE_AI)
|
||||
{
|
||||
// Checked
|
||||
getUrl("FSCommand:CallGameFunction", "%Campaign_StartMission");
|
||||
}
|
||||
else
|
||||
{
|
||||
// Checked
|
||||
getUrl("FSCommand:CallGameFunction", "%StartGame");
|
||||
}
|
||||
}
|
||||
function setCurrentPanel(panelID)
|
||||
{
|
||||
if(panelID < 0 || panelID >= fes_m_objectivesBriefing.OB_PANEL_MAX)
|
||||
{
|
||||
trace("ERROR: Invalid panelID param in fes_m_objectivesBriefing::setCurrentPanel()");
|
||||
return undefined;
|
||||
}
|
||||
for(var i = 0; i < fes_m_objectivesBriefing.OB_PANEL_MAX; ++i)
|
||||
{
|
||||
if(i == panelID)
|
||||
{
|
||||
this.showPanel(i,true);
|
||||
}
|
||||
else
|
||||
{
|
||||
this.showPanel(i,false);
|
||||
}
|
||||
}
|
||||
}
|
||||
function showPanel(panelID, vis)
|
||||
{
|
||||
switch(panelID)
|
||||
{
|
||||
case fes_m_objectivesBriefing.OB_PANEL_CHAT:
|
||||
Cafe2_BaseUIScreen.m_screen.panelChat._visible = vis;
|
||||
break;
|
||||
case fes_m_objectivesBriefing.OB_PANEL_MISSION_SUMMARY:
|
||||
Cafe2_BaseUIScreen.m_screen.panelSummary._visible = vis;
|
||||
break;
|
||||
case fes_m_objectivesBriefing.OB_PANEL_CO_COMMANDER:
|
||||
Cafe2_BaseUIScreen.m_screen.panelCoCommanders._visible = vis;
|
||||
break;
|
||||
default:
|
||||
trace("ERROR: Invalid panelID param in fes_m_objectivesBriefing::setCurrentPanel()");
|
||||
}
|
||||
}
|
||||
function displayObjectiveBriefingText()
|
||||
{
|
||||
var ret = new Object();
|
||||
// Checked
|
||||
loadVariables("QueryGameEngine?MISSION_BRIEFING_OBJECTIVES?MissionIndex=" + this.m_missionIdx,ret);
|
||||
var missionBriefingObjectivesList = ret.MISSION_BRIEFING_OBJECTIVES.split(",");
|
||||
Cafe2_BaseUIScreen.m_screen.panelSummary.objectiveListScrollBar.show();
|
||||
Cafe2_BaseUIScreen.m_screen.panelSummary.objectiveListScrollBar.enable();
|
||||
Cafe2_BaseUIScreen.m_screen.panelSummary.objectiveList.setNumEntries(7);
|
||||
Cafe2_BaseUIScreen.m_screen.panelSummary.objectiveList.setVerticalPadding(0);
|
||||
Cafe2_BaseUIScreen.m_screen.panelSummary.objectiveList.addListener(this);
|
||||
Cafe2_BaseUIScreen.m_screen.panelSummary.objectiveList.disableEntryHitRegion();
|
||||
var arr = new Array();
|
||||
arr.push({symbol:"std_mouseListboxEntryTextElementSymbol",width:406,leftMargin:10,rightMargin:40,useHighlights:false,isSelectable:false,useHitRegion:false,autoSize:true});
|
||||
Cafe2_BaseUIScreen.m_screen.panelSummary.objectiveList.init(arr,29);
|
||||
Cafe2_BaseUIScreen.m_screen.panelSummary.objectiveList.attachScrollbarController(Cafe2_BaseUIScreen.m_screen.panelSummary.objectiveListScrollBar);
|
||||
Cafe2_BaseUIScreen.m_screen.panelSummary.objectiveList.setColumnData(0,missionBriefingObjectivesList);
|
||||
Cafe2_BaseUIScreen.m_screen.panelSummary.objectiveList.setSelectedIndex(0);
|
||||
Cafe2_BaseUIScreen.m_screen.panelSummary.objectiveList.refreshDisplay();
|
||||
Cafe2_BaseUIScreen.m_screen.panelSummary.objectiveList.refreshScrollbar();
|
||||
Cafe2_BaseUIScreen.m_screen.panelSummary.objectiveList.moveViewToFirst();
|
||||
}
|
||||
function initAI_descriptionText()
|
||||
{
|
||||
var listComponent = Cafe2_BaseUIScreen.m_screen.panelCoCommanders.AI_descriptionList;
|
||||
var scrollBarComponent = Cafe2_BaseUIScreen.m_screen.panelCoCommanders.AL_descriptionistScrollBar;
|
||||
scrollBarComponent.enable();
|
||||
scrollBarComponent.show();
|
||||
listComponent.setNumEntries(6);
|
||||
listComponent.setVerticalPadding(0);
|
||||
listComponent.addListener(this);
|
||||
listComponent.disableEntryHitRegion();
|
||||
var arr = new Array();
|
||||
arr.push({symbol:"std_mouseListboxEntryTextElementSymbol",width:280,leftMargin:10,rightMargin:40,useHighlights:false,isSelectable:false,useHitRegion:false,autoSize:true});
|
||||
listComponent.init(arr,29);
|
||||
listComponent.attachScrollbarController(scrollBarComponent);
|
||||
var arr = new Array();
|
||||
arr[0] = this.m_AiCoCommanderDescs[0];
|
||||
listComponent.setColumnData(0,arr);
|
||||
listComponent.setSelectedIndex(0);
|
||||
listComponent.refreshDisplay();
|
||||
listComponent.refreshScrollbar();
|
||||
listComponent.moveViewToFirst();
|
||||
listComponent.show();
|
||||
}
|
||||
function initCoopCampaignPlayerSlots()
|
||||
{
|
||||
var ret = new Object();
|
||||
var playerStatusStrList = undefined;
|
||||
// Checked
|
||||
loadVariables("QueryGameEngine?PLAYER_STATUS?Slot=0",ret);
|
||||
playerStatusStrList = ret.PLAYER_STATUS.split(",");
|
||||
Cafe2_BaseUIScreen.m_screen.commanderPanelMC.commanderNameTF.text = "$PLAYER_STATUS_0_0";
|
||||
// Checked
|
||||
loadVariables("QueryGameEngine?PLAYER_STATUS?Slot=1",ret);
|
||||
playerStatusStrList = ret.PLAYER_STATUS.split(",");
|
||||
Cafe2_BaseUIScreen.m_screen.commanderPanelMC.co_commanderNameTF.text = "$PLAYER_STATUS_1_0";
|
||||
}
|
||||
function initSoloCampaignPlayerSlots()
|
||||
{
|
||||
var ret = new Object();
|
||||
// Checked
|
||||
loadVariables("QueryGameEngine?FE_CURRENT_PROFILE",ret);
|
||||
Cafe2_BaseUIScreen.m_screen.commanderPanelMC.commanderNameTF.text = ret.FE_CURRENT_PROFILE;
|
||||
Cafe2_BaseUIScreen.m_screen.commanderPanelMC.co_commanderNameTF.text = this.m_AiCoCommanderNames[0];
|
||||
Cafe2_BaseUIScreen.m_screen.panelCoCommanders.CoCommanderName.text = this.m_AiCoCommanderNames[0] + "&Outline";
|
||||
}
|
||||
function initAIPanel()
|
||||
{
|
||||
this.m_AiCoCommanderNames = new Array();
|
||||
this.m_AiCoCommanderDescs = new Array();
|
||||
var ret = new Object();
|
||||
// Checked
|
||||
loadVariables(
|
||||
"QueryGameEngine?MISSION_COMMANDER_DESCRIPTIONS?MissionIndex=" +
|
||||
this.m_missionIdx +
|
||||
"&MISSION_COMMANDER_DISPLAY_TOKENS?MissionIndex=" +
|
||||
this.m_missionIdx,
|
||||
ret
|
||||
);
|
||||
this.m_AiCoCommanderNames = ret.MISSION_COMMANDER_DISPLAY_TOKENS.split(",");
|
||||
this.m_AiCoCommanderDescs = ret.MISSION_COMMANDER_DESCRIPTIONS.split(",");
|
||||
if(this.m_AiCoCommanderNames.length != this.m_AiCoCommanderDescs.length)
|
||||
{
|
||||
trace("ERROR: Number of portaits != number of descriptions in fes_m_objectivesBriefing::initPanels().");
|
||||
}
|
||||
if(this.m_AiCoCommanderDescs.length == 0)
|
||||
{
|
||||
trace("ERROR: No co-commander portraits loaded in fes_m_objectivesBriefing::initPanels().");
|
||||
}
|
||||
this.initAI_descriptionText();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
var screen = new fes_m_objectivesBriefing(this);
|
||||
stop();
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user