first commit
This commit is contained in:
+21
@@ -0,0 +1,21 @@
|
||||
on(construct){
|
||||
m_focusDirs = "Up/Down";
|
||||
m_numEntries = 11;
|
||||
m_vPadding = 5;
|
||||
m_bEnabled = true;
|
||||
m_refFM = "_root.gFM";
|
||||
m_initiallySelected = false;
|
||||
m_tabIndex = -1;
|
||||
m_bVisible = true;
|
||||
m_scrollbarOffset = [];
|
||||
m_scrollbarOffset[0] = 0;
|
||||
m_scrollbarOffset[1] = 0;
|
||||
m_BgVisible = true;
|
||||
m_renderWidth = 0;
|
||||
m_renderHeight = 0;
|
||||
m_backgroundMargin = 2;
|
||||
m_useHighlights = true;
|
||||
m_alternateBackgroundColors = true;
|
||||
m_backgroundColor1 = 2622983;
|
||||
m_backgroundColor2 = 0;
|
||||
}
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
on(construct){
|
||||
m_nLength = 100;
|
||||
m_nMax = 10;
|
||||
m_nMin = 0;
|
||||
m_nValue = 0;
|
||||
}
|
||||
+10
@@ -0,0 +1,10 @@
|
||||
on(construct){
|
||||
m_focusDirs = "Up/Down";
|
||||
m_bEnabled = true;
|
||||
m_refFM = "_root.gFM";
|
||||
m_initiallySelected = false;
|
||||
m_tabIndex = -1;
|
||||
m_bVisible = true;
|
||||
m_label = "$POSTGAME_STATS_TAB";
|
||||
m_contentSymbol = "tabButtonContentClip";
|
||||
}
|
||||
+10
@@ -0,0 +1,10 @@
|
||||
on(construct){
|
||||
m_focusDirs = "Up/Down";
|
||||
m_bEnabled = true;
|
||||
m_refFM = "_root.gFM";
|
||||
m_initiallySelected = false;
|
||||
m_tabIndex = -1;
|
||||
m_bVisible = true;
|
||||
m_label = "$RESOURCES";
|
||||
m_contentSymbol = "tabButtonContentClip";
|
||||
}
|
||||
+10
@@ -0,0 +1,10 @@
|
||||
on(construct){
|
||||
m_focusDirs = "Up/Down";
|
||||
m_bEnabled = true;
|
||||
m_refFM = "_root.gFM";
|
||||
m_initiallySelected = false;
|
||||
m_tabIndex = -1;
|
||||
m_bVisible = true;
|
||||
m_label = "$STRUCTURES";
|
||||
m_contentSymbol = "tabButtonContentClip";
|
||||
}
|
||||
+10
@@ -0,0 +1,10 @@
|
||||
on(construct){
|
||||
m_focusDirs = "Up/Down";
|
||||
m_bEnabled = true;
|
||||
m_refFM = "_root.gFM";
|
||||
m_initiallySelected = false;
|
||||
m_tabIndex = -1;
|
||||
m_bVisible = true;
|
||||
m_label = "$UNITS";
|
||||
m_contentSymbol = "tabButtonContentClip";
|
||||
}
|
||||
+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();
|
||||
+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();
|
||||
+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();
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
on(construct){
|
||||
_type = "PostGame_Graph";
|
||||
}
|
||||
+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);
|
||||
};
|
||||
}
|
||||
}
|
||||
+406
@@ -0,0 +1,406 @@
|
||||
class fes_m_postgameRoundup extends Cafe2_BaseUIScreen
|
||||
{
|
||||
static var TS_TAB_UNITS = 0;
|
||||
static var TS_TAB_STRUCTURES = 1;
|
||||
static var TS_TAB_RESOURCES = 2;
|
||||
static var TS_TAB_STATS = 3;
|
||||
static var TS_TAB_MAX = 4;
|
||||
static var GRAPH_NUM_LABELS = 8;
|
||||
static var STATS_ROW_CNT = 14;
|
||||
static var STATS_ROW_H = 22;
|
||||
static var STATS_COLUMN_01_WIDTH = 300;
|
||||
static var STATS_COLUMN_02_WIDTH = 320;
|
||||
static var STATS_COLUMN_03_WIDTH = 320;
|
||||
var m_isHost = false;
|
||||
var m_isClient = false;
|
||||
var m_isAIMode = false;
|
||||
var m_win = false;
|
||||
function fes_m_postgameRoundup(screen)
|
||||
{
|
||||
super(screen);
|
||||
Cafe2_BaseUIScreen.m_thisClass = this;
|
||||
}
|
||||
function frameDelayedInit()
|
||||
{
|
||||
this.initGUI();
|
||||
this.startIntro();
|
||||
}
|
||||
function initGUI()
|
||||
{
|
||||
trace("fes_m_postgameRoundup::initGUI()");
|
||||
this.m_isHost = _global.GAME.COOPMODE == _global.ENUM.GAME_COOPMODE_HOST;
|
||||
this.m_isClient = _global.GAME.COOPMODE == _global.ENUM.GAME_COOPMODE_CLIENT;
|
||||
this.m_isAIMode = _global.GAME.COOPMODE == _global.ENUM.GAME_COOPMODE_AI;
|
||||
if(!this.m_isAIMode)
|
||||
{
|
||||
// Checked
|
||||
getUrl("FSCommand:CallGameFunction", "%SetGameSetupMode?Mode=Online");
|
||||
}
|
||||
// Checked
|
||||
getUrl("FSCommand:CallGameFunction", "Campaign_FinishMission");
|
||||
var ret = new Object();
|
||||
// 这里有在获取战役任务编号(CAMPAIGN_MISSION),但实际上没有使用这个值
|
||||
// Checked
|
||||
loadVariables("QueryGameEngine?CAMPAIGN_MISSION&POSTGAME_PLAYER_COUNT&POSTGAME_PLAYERCOLORS&POSTGAME_PLAYERNAMES&CAMPAIGN_FINAL_MOVIE&PLAY_CAMPAIGN_EPILOG_VIDEO",ret);
|
||||
if(ret.PLAY_CAMPAIGN_EPILOG_VIDEO == "1")
|
||||
{
|
||||
var movieId = ret.CAMPAIGN_FINAL_MOVIE;
|
||||
// Checked
|
||||
getURL("FSCommand:CallGameFunction","%PlayMovieAtomic?movie=" + movieId + "|allowCancel=1");
|
||||
this.m_win = true;
|
||||
}
|
||||
this.m_numPlayers = ret.POSTGAME_PLAYER_COUNT;
|
||||
this.m_playerNames = ret.POSTGAME_PLAYERNAMES.split(",");
|
||||
trace("fes_m_postgameRoundup::initGUI() - POSTGAME_PLAYERNAMES: " + ret.POSTGAME_PLAYERNAMES);
|
||||
this.m_playerColors = ret.POSTGAME_PLAYERCOLORS.split(",");
|
||||
trace("fes_m_postgameRoundup::initGUI() - POSTGAME_PLAYERCOLORS: " + ret.POSTGAME_PLAYERCOLORS);
|
||||
this.initButtons();
|
||||
this.initCommandersPanel();
|
||||
this.initChatPanel();
|
||||
this.initAchievementsPanel();
|
||||
this.initTimelineStandingsPanel();
|
||||
this.m_localMessageHandlerFunc = _global.bind1DynamicParams(this,this.localMessageHandler);
|
||||
_global.gMH.addMessageHandler(this.m_localMessageHandlerFunc);
|
||||
_global.gSM.setOnExitScreen(_global.bind0(this,this.onScreenExit));
|
||||
if(this.m_isHost)
|
||||
{
|
||||
var ret = new Object();
|
||||
// Checked
|
||||
loadVariables("QueryGameEngine?CAMPAIGN_MAP_CRC",ret);
|
||||
// Checked
|
||||
getUrl("FSCommand:CallGameFunction","%SetMap\?Map=" + ret.CAMPAIGN_MAP_CRC);
|
||||
// Checked
|
||||
getUrl("FSCommand:CallGameFunction", "CoopCampaignFlow_PostGameHostReady");
|
||||
}
|
||||
// Checked
|
||||
loadVariables("QueryGameEngine?DID_LOCAL_PLAYER_WIN",ret);
|
||||
var isLocalPlayerWin = ret.DID_LOCAL_PLAYER_WIN == "1";
|
||||
if(isLocalPlayerWin && !this.m_isClient)
|
||||
{
|
||||
// Checked
|
||||
getUrl("FSCommand:CallGameFunction", "AutoSave");
|
||||
}
|
||||
if(this.m_isClient)
|
||||
{
|
||||
// Checked
|
||||
getUrl("FSCommand:CallGameFunction", "CoopCampaignFlow_PostGameClientReady");
|
||||
}
|
||||
this.playStatsMusic(isLocalPlayerWin);
|
||||
}
|
||||
function initButtons()
|
||||
{
|
||||
trace("fes_m_postgameRoundup::initButtons()");
|
||||
var arr = new Array();
|
||||
Cafe2_BaseUIScreen.m_screen.btnMainMenu.show();
|
||||
Cafe2_BaseUIScreen.m_screen.btnMainMenu.setText("$MAINMENU");
|
||||
Cafe2_BaseUIScreen.m_screen.btnMainMenu.enable();
|
||||
Cafe2_BaseUIScreen.m_screen.btnMainMenu.setOnMouseUpFunction(_global.bind0(this,this.onMainMenuClicked));
|
||||
arr.push(Cafe2_BaseUIScreen.m_screen.btnMainMenu);
|
||||
if(this.m_isClient)
|
||||
{
|
||||
Cafe2_BaseUIScreen.m_screen.btnNext.hide();
|
||||
Cafe2_BaseUIScreen.m_screen.btnNext.disable();
|
||||
Cafe2_BaseUIScreen.m_screen.btnLoadGame.hide();
|
||||
Cafe2_BaseUIScreen.m_screen.btnLoadGame.disable();
|
||||
}
|
||||
else
|
||||
{
|
||||
Cafe2_BaseUIScreen.m_screen.btnNext.show();
|
||||
Cafe2_BaseUIScreen.m_screen.btnNext.setText("$NEXT");
|
||||
Cafe2_BaseUIScreen.m_screen.btnLoadGame.show();
|
||||
if(this.m_isHost)
|
||||
{
|
||||
Cafe2_BaseUIScreen.m_screen.btnNext.disable();
|
||||
Cafe2_BaseUIScreen.m_screen.btnLoadGame.disable();
|
||||
}
|
||||
else
|
||||
{
|
||||
Cafe2_BaseUIScreen.m_screen.btnNext.enable();
|
||||
Cafe2_BaseUIScreen.m_screen.btnLoadGame.enable();
|
||||
}
|
||||
Cafe2_BaseUIScreen.m_screen.btnNext.setOnMouseUpFunction(_global.bind0(this,this.onNextClicked));
|
||||
Cafe2_BaseUIScreen.m_screen.btnLoadGame.setOnMouseUpFunction(_global.bind0(this,this.onLoadGameClicked));
|
||||
}
|
||||
arr.push(Cafe2_BaseUIScreen.m_screen.btnNext);
|
||||
arr.push(Cafe2_BaseUIScreen.m_screen.btnLoadGame);
|
||||
Cafe2_BaseUIScreen.m_screen.panelTS.btnUnits.setOnMouseDownFunction(_global.bind0(this,this.onUnitsClicked));
|
||||
Cafe2_BaseUIScreen.m_screen.panelTS.btnUnits.show();
|
||||
Cafe2_BaseUIScreen.m_screen.panelTS.btnUnits.enable();
|
||||
arr.push(Cafe2_BaseUIScreen.m_screen.panelTS.btnUnits);
|
||||
Cafe2_BaseUIScreen.m_screen.panelTS.btnStructures.setOnMouseDownFunction(_global.bind0(this,this.onStructuresClicked));
|
||||
Cafe2_BaseUIScreen.m_screen.panelTS.btnStructures.show();
|
||||
Cafe2_BaseUIScreen.m_screen.panelTS.btnStructures.enable();
|
||||
arr.push(Cafe2_BaseUIScreen.m_screen.panelTS.btnStructures);
|
||||
Cafe2_BaseUIScreen.m_screen.panelTS.btnResources.setOnMouseDownFunction(_global.bind0(this,this.onResourcesClicked));
|
||||
Cafe2_BaseUIScreen.m_screen.panelTS.btnResources.show();
|
||||
Cafe2_BaseUIScreen.m_screen.panelTS.btnResources.enable();
|
||||
arr.push(Cafe2_BaseUIScreen.m_screen.panelTS.btnResources);
|
||||
Cafe2_BaseUIScreen.m_screen.panelTS.btnStats.setOnMouseDownFunction(_global.bind0(this,this.onStatsClicked));
|
||||
Cafe2_BaseUIScreen.m_screen.panelTS.btnStats.show();
|
||||
Cafe2_BaseUIScreen.m_screen.panelTS.btnStats.enable();
|
||||
arr.push(Cafe2_BaseUIScreen.m_screen.panelTS.btnStats);
|
||||
this.registerIntroOuttroComponents(arr);
|
||||
}
|
||||
function initCommandersPanel()
|
||||
{
|
||||
trace("fes_m_postgameRoundup::initCommandersPanel()");
|
||||
Cafe2_BaseUIScreen.m_screen.panelCommanders.tfCommanderName.text = this.m_playerNames[0];
|
||||
Cafe2_BaseUIScreen.m_screen.panelCommanders.tfCoCommanderName.text = this.m_playerNames[1];
|
||||
var localPlayerColor = Number("0x" + this.m_playerColors[0].substr(2));
|
||||
var collaboratorPlayerColor = Number("0x" + this.m_playerColors[1].substr(2));
|
||||
var localPlayerColorComponent = new Color(Cafe2_BaseUIScreen.m_screen.panelCommanders.mcCommanderColor);
|
||||
var collaboratorPlayerColorComponent = new Color(Cafe2_BaseUIScreen.m_screen.panelCommanders.mcCoCommanderColor);
|
||||
localPlayerColorComponent.setRGB(localPlayerColor);
|
||||
collaboratorPlayerColorComponent.setRGB(collaboratorPlayerColor);
|
||||
}
|
||||
function initChatPanel()
|
||||
{
|
||||
trace("fes_m_postgameRoundup::initChatPanel()");
|
||||
Cafe2_BaseUIScreen.m_screen.panelChat._visible = !this.m_isAIMode;
|
||||
}
|
||||
function initAchievementsPanel()
|
||||
{
|
||||
trace("fes_m_postgameRoundup::initAchievementsPanel()");
|
||||
Cafe2_BaseUIScreen.m_screen.panelAchievement._visible = this.m_isAIMode;
|
||||
}
|
||||
function initTimelineStandingsPanel()
|
||||
{
|
||||
trace("fes_m_postgameRoundup::initTimelineStandingsPanel()");
|
||||
var ret = new Object();
|
||||
// Checked
|
||||
loadVariables("QueryGameEngine?POSTGAME_STATS",ret);
|
||||
var mcStatsTabComponent = Cafe2_BaseUIScreen.m_screen.panelTS.mcStatsTab;
|
||||
var postGameStats = new Array();
|
||||
postGameStats = ret.POSTGAME_STATS.split(",");
|
||||
mcStatsTabComponent.lbStats.setNumEntries(fes_m_postgameRoundup.STATS_ROW_CNT);
|
||||
mcStatsTabComponent.lbStats.setVerticalPadding(0);
|
||||
var statsTextElementList = new Array();
|
||||
statsTextElementList.push({symbol:"std_mouseListboxEntryTextElementSymbol",width:fes_m_postgameRoundup.STATS_COLUMN_01_WIDTH,leftMargin:0,rightMargin:0,fontSize:14});
|
||||
statsTextElementList.push({symbol:"std_mouseListboxEntryTextElementSymbol",width:fes_m_postgameRoundup.STATS_COLUMN_02_WIDTH,leftMargin:5,rightMargin:0,fontSize:14});
|
||||
statsTextElementList.push({symbol:"std_mouseListboxEntryTextElementSymbol",width:fes_m_postgameRoundup.STATS_COLUMN_03_WIDTH,leftMargin:5,rightMargin:0,fontSize:14});
|
||||
mcStatsTabComponent.lbStats.init(statsTextElementList,fes_m_postgameRoundup.STATS_ROW_H);
|
||||
mcStatsTabComponent.lbStats.attachScrollbarController(mcStatsTabComponent.sbStats);
|
||||
mcStatsTabComponent.lbStats.moveViewToFirst();
|
||||
mcStatsTabComponent.lbStats.refreshDisplay();
|
||||
mcStatsTabComponent.lbStats.refreshScrollbar();
|
||||
this.m_playerStats0 = new Array();
|
||||
this.m_playerStats1 = new Array();
|
||||
for(var i = 0; i < postGameStats.length; ++i)
|
||||
{
|
||||
postGameStats[i] = "$" + postGameStats[i];
|
||||
this.m_playerStats0[i] = postGameStats[i] + "_0,0x" + this.m_playerColors[0].substr(2);
|
||||
this.m_playerStats1[i] = postGameStats[i] + "_1,0x" + this.m_playerColors[1].substr(2);
|
||||
trace("fes_m_postgameRoundup::initTimelineStandingsPanel() - Stat: " + postGameStats[i]);
|
||||
}
|
||||
mcStatsTabComponent.lbStats.setColumnData(0,postGameStats);
|
||||
mcStatsTabComponent.lbStats.setColumnData(1,this.m_playerStats0);
|
||||
mcStatsTabComponent.lbStats.setColumnData(2,this.m_playerStats1);
|
||||
mcStatsTabComponent.lbStats.refreshDisplay();
|
||||
mcStatsTabComponent.lbStats.refreshScrollbar();
|
||||
var firstColor = Number("0x" + this.m_playerColors[0].substr(2));
|
||||
var secondColor = Number("0x" + this.m_playerColors[1].substr(2));
|
||||
var firstColorComponent = new Color(mcStatsTabComponent.mcDot1);
|
||||
var secondColorComponent = new Color(mcStatsTabComponent.mcDot2);
|
||||
firstColorComponent.setRGB(firstColor);
|
||||
secondColorComponent.setRGB(secondColor);
|
||||
this.setTSTab(fes_m_postgameRoundup.TS_TAB_UNITS);
|
||||
this.initStatsGraphAxisLables();
|
||||
}
|
||||
function initStatsGraphAxisLables()
|
||||
{
|
||||
var graphTabComponent = Cafe2_BaseUIScreen.m_screen.panelTS.mcGraphTab_landscape;
|
||||
graphTabComponent.tf_X0.text = "$Timeline:XAxis:0";
|
||||
graphTabComponent.tf_X1.text = "$Timeline:XAxis:1";
|
||||
graphTabComponent.tf_X2.text = "$Timeline:XAxis:2";
|
||||
graphTabComponent.tf_X3.text = "$Timeline:XAxis:3";
|
||||
graphTabComponent.tf_X4.text = "$Timeline:XAxis:4";
|
||||
graphTabComponent.tf_X5.text = "$Timeline:XAxis:5";
|
||||
graphTabComponent.tf_X6.text = "$Timeline:XAxis:6";
|
||||
graphTabComponent.tf_X7.text = "$Timeline:XAxis:7";
|
||||
graphTabComponent.tf_Y0.text = "$Timeline:YAxis:0";
|
||||
graphTabComponent.tf_Y1.text = "$Timeline:YAxis:1";
|
||||
graphTabComponent.tf_Y2.text = "$Timeline:YAxis:2";
|
||||
graphTabComponent.tf_Y3.text = "$Timeline:YAxis:3";
|
||||
graphTabComponent.tf_Y4.text = "$Timeline:YAxis:4";
|
||||
graphTabComponent.tf_Y5.text = "$Timeline:YAxis:5";
|
||||
graphTabComponent.tf_Y6.text = "$Timeline:YAxis:6";
|
||||
graphTabComponent.tf_Y7.text = "$Timeline:YAxis:7";
|
||||
}
|
||||
function playStatsMusic(gameWon)
|
||||
{
|
||||
if(gameWon)
|
||||
{
|
||||
_global.PlayShellMusic(_global.SOUND.STATS_WIN);
|
||||
}
|
||||
else
|
||||
{
|
||||
_global.PlayShellMusic(_global.SOUND.STATS_LOSE);
|
||||
}
|
||||
}
|
||||
function localMessageHandler(messageCode)
|
||||
{
|
||||
var flag = true;
|
||||
switch(messageCode)
|
||||
{
|
||||
case _global.MSGCODE.FE_COOP_CAMPAIGN_STAGING_STEP_OBJECTIVE_BRIEFING:
|
||||
this.startOuttroAndCallBack(_global.bind0(this,this.leaveToCoopStaging));
|
||||
break;
|
||||
case _global.MSGCODE.FE_COOP_CAMPAIGN_STAGING_STEP_STAGING:
|
||||
this.startOuttro(_global.SCREEN.FEM_COOPSTAGING);
|
||||
break;
|
||||
case _global.MSGCODE.FE_COOP_CAMPAIGN_STAGING_STEP_RECRUITMENT:
|
||||
this.startOuttro(_global.SCREEN.FEG_RECRUITMENT_UI);
|
||||
break;
|
||||
case _global.MSGCODE.FE_COOP_CAMPAIGN_COCOMMANDER_READY:
|
||||
if(this.m_isHost)
|
||||
{
|
||||
this.cocommanderReady();
|
||||
}
|
||||
else
|
||||
{
|
||||
flag = false;
|
||||
}
|
||||
break;
|
||||
case _global.MSGCODE.FE_COOP_CAMPAIGN_COMMANDER_READY:
|
||||
if(this.m_isClient)
|
||||
{
|
||||
// Checked
|
||||
getUrl("FSCommand:CallGameFunction", "CoopCampaignFlow_PostGameClientReady");
|
||||
}
|
||||
else
|
||||
{
|
||||
flag = false;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
flag = false;
|
||||
}
|
||||
return flag;
|
||||
}
|
||||
function onScreenExit()
|
||||
{
|
||||
trace("fes_m_postgameRoundup::onScreenExit()");
|
||||
_global.gMH.removeMessageHandler(this.m_localMessageHandlerFunc);
|
||||
delete this.m_localMessageHandlerFunc;
|
||||
this.clearData();
|
||||
delete _global.fes_m_postgameRoundup;
|
||||
delete _global.Cafe2_BaseUIScreen;
|
||||
_global.PlayShellMusic(_global.SOUND.SHELL_MAIN);
|
||||
}
|
||||
function onMainMenuClicked()
|
||||
{
|
||||
trace("fes_m_postgameRoundup::onMainMenuClicked()");
|
||||
if(this.m_isHost || this.m_isClient)
|
||||
{
|
||||
// Checked
|
||||
getUrl("FSCommand:CallGameFunction", "%SetGameSetupMode?Mode=None");
|
||||
}
|
||||
// Checked
|
||||
getUrl("FSCommand:CallGameFunction", "Campaign_ExitGame");
|
||||
this.startOuttroAndCallBack(_global.bind0(this,this.leaveToMainMenu));
|
||||
}
|
||||
function onNextClicked()
|
||||
{
|
||||
trace("fes_m_postgameRoundup::onNextClicked()");
|
||||
if(this.m_isAIMode)
|
||||
{
|
||||
_global.GAME.COOPMODE = _global.ENUM.GAME_COOPMODE_CHOOSER;
|
||||
if(this.m_win)
|
||||
{
|
||||
this.startOuttroAndCallBack(_global.bind0(this,this.leaveToFactionSelection));
|
||||
}
|
||||
else
|
||||
{
|
||||
this.startOuttroAndCallBack(_global.bind0(this,this.leaveToMissionBriefing));
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// Checked
|
||||
getUrl("FSCommand:CallGameFunction", "%CoopCampaignFlow_ObjectiveBriefing");
|
||||
// Checked
|
||||
getUrl("FSCommand:CallGameFunction", "%PostGame_MPExit?Continue=1");
|
||||
}
|
||||
}
|
||||
function onUnitsClicked()
|
||||
{
|
||||
trace("fes_m_postgameRoundup::onUnitsClicked()");
|
||||
this.setTSTab(fes_m_postgameRoundup.TS_TAB_UNITS);
|
||||
}
|
||||
function onStructuresClicked()
|
||||
{
|
||||
trace("fes_m_postgameRoundup::onStructuresClicked()");
|
||||
this.setTSTab(fes_m_postgameRoundup.TS_TAB_STRUCTURES);
|
||||
}
|
||||
function onResourcesClicked()
|
||||
{
|
||||
trace("fes_m_postgameRoundup::onResourcesClicked()");
|
||||
this.setTSTab(fes_m_postgameRoundup.TS_TAB_RESOURCES);
|
||||
}
|
||||
function onStatsClicked()
|
||||
{
|
||||
trace("fes_m_postgameRoundup::onSTATSClicked()");
|
||||
this.setTSTab(fes_m_postgameRoundup.TS_TAB_STATS);
|
||||
}
|
||||
function onLoadGameClicked()
|
||||
{
|
||||
_global.GAME.MODE = _global.ENUM.GAME_MODE_CAMPAIGN;
|
||||
_global.GAME.SAVELOADSCREEN_TYPE = _global.ENUM.SAVELOADSCREEN_LOAD;
|
||||
this.startOuttro(_global.SCREEN.FEG_SAVELOAD);
|
||||
}
|
||||
function setTSTab(tabID)
|
||||
{
|
||||
trace("fes_m_postgameRoundup::setTSTab() : tabID=" + tabID);
|
||||
Cafe2_BaseUIScreen.m_screen.panelTS.btnUnits.setSelected(tabID == fes_m_postgameRoundup.TS_TAB_UNITS);
|
||||
Cafe2_BaseUIScreen.m_screen.panelTS.btnStructures.setSelected(tabID == fes_m_postgameRoundup.TS_TAB_STRUCTURES);
|
||||
Cafe2_BaseUIScreen.m_screen.panelTS.btnResources.setSelected(tabID == fes_m_postgameRoundup.TS_TAB_RESOURCES);
|
||||
Cafe2_BaseUIScreen.m_screen.panelTS.btnStats.setSelected(tabID == fes_m_postgameRoundup.TS_TAB_STATS);
|
||||
if(tabID == fes_m_postgameRoundup.TS_TAB_STATS)
|
||||
{
|
||||
Cafe2_BaseUIScreen.m_screen.panelTS.mcGraphTab_landscape._visible = false;
|
||||
Cafe2_BaseUIScreen.m_screen.panelTS.mcStatsTab._visible = true;
|
||||
return undefined;
|
||||
}
|
||||
switch(tabID)
|
||||
{
|
||||
case fes_m_postgameRoundup.TS_TAB_UNITS:
|
||||
// Checked
|
||||
getUrl("FSCommand:CallGameFunction", "%PostGame_SetGraphMode?GraphMode=0");
|
||||
break;
|
||||
case fes_m_postgameRoundup.TS_TAB_STRUCTURES:
|
||||
// Checked
|
||||
getUrl("FSCommand:CallGameFunction", "%PostGame_SetGraphMode?GraphMode=1");
|
||||
break;
|
||||
case fes_m_postgameRoundup.TS_TAB_RESOURCES:
|
||||
// Checked
|
||||
getUrl("FSCommand:CallGameFunction", "%PostGame_SetGraphMode?GraphMode=2");
|
||||
break;
|
||||
default:
|
||||
trace("ERROR: Could not find tabID in fes_m_postgameRoundup::setTSTab()");
|
||||
}
|
||||
Cafe2_BaseUIScreen.m_screen.panelTS.mcGraphTab_landscape._visible = true;
|
||||
Cafe2_BaseUIScreen.m_screen.panelTS.mcStatsTab._visible = false;
|
||||
}
|
||||
function leaveToCoopStaging()
|
||||
{
|
||||
_global.gotoShellScreen(_global.SCREEN.FEM_COOPSTAGING,[_global.SCREEN.FEG_MAIN_MENU]);
|
||||
}
|
||||
function leaveToMainMenu()
|
||||
{
|
||||
_global.gotoShellScreen(_global.SCREEN.FEG_MAIN_MENU,[]);
|
||||
}
|
||||
function leaveToFactionSelection()
|
||||
{
|
||||
_global.gotoShellScreen(_global.SCREEN.FES_FACTION_SELECT_MENU,[_global.SCREEN.FEG_MAIN_MENU]);
|
||||
}
|
||||
function leaveToMissionBriefing()
|
||||
{
|
||||
_global.GAME.PLAY_MISSION_INTRO_MOVIE = true;
|
||||
_global.gotoShellScreen(_global.SCREEN.FES_COOP_MISSION_BRIEFING,[_global.SCREEN.FEG_MAIN_MENU,_global.SCREEN.FES_FACTION_SELECT_MENU]);
|
||||
}
|
||||
function cocommanderReady()
|
||||
{
|
||||
Cafe2_BaseUIScreen.m_screen.btnNext.enable();
|
||||
Cafe2_BaseUIScreen.m_screen.btnLoadGame.enable();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
var screen = new fes_m_postgameRoundup(this);
|
||||
stop();
|
||||
+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 = "$MAINMENU";
|
||||
m_nTruncateType = 0;
|
||||
m_label = "$MAINMENU";
|
||||
m_bEnabled = true;
|
||||
m_refFM = "_root.gFM";
|
||||
m_initiallySelected = false;
|
||||
m_tabIndex = 3;
|
||||
m_bVisible = true;
|
||||
m_contentSymbol = "buttonContentSymbol";
|
||||
}
|
||||
+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 = "$NEXT";
|
||||
m_nTruncateType = 0;
|
||||
m_label = "$NEXT";
|
||||
m_bEnabled = true;
|
||||
m_refFM = "_root.gFM";
|
||||
m_initiallySelected = false;
|
||||
m_tabIndex = 4;
|
||||
m_bVisible = true;
|
||||
m_contentSymbol = "buttonContentSymbol";
|
||||
}
|
||||
+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 = "$LOAD";
|
||||
m_nTruncateType = 0;
|
||||
m_label = "$LOAD";
|
||||
m_bEnabled = true;
|
||||
m_refFM = "_root.gFM";
|
||||
m_initiallySelected = false;
|
||||
m_tabIndex = 3;
|
||||
m_bVisible = true;
|
||||
m_contentSymbol = "buttonContentSymbol";
|
||||
}
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
on(construct){
|
||||
m_title = "$POSTGAME_ROUNDUP";
|
||||
m_DropShadow = true;
|
||||
m_Outline = true;
|
||||
m_visible = true;
|
||||
}
|
||||
Reference in New Issue
Block a user