first commit
This commit is contained in:
+2
@@ -0,0 +1,2 @@
|
||||
trace("feg_m_MesaageBox start up");
|
||||
stop();
|
||||
+18
@@ -0,0 +1,18 @@
|
||||
on(construct){
|
||||
m_width = 200;
|
||||
m_textAlign = false;
|
||||
m_labelPosition = "right align";
|
||||
m_label_x = 0;
|
||||
m_label_y = 0;
|
||||
m_focusDirs = "Up/Down";
|
||||
m_iconType = "default";
|
||||
m_extLabel = "";
|
||||
m_nTruncateType = 0;
|
||||
m_label = "";
|
||||
m_bEnabled = true;
|
||||
m_refFM = "_root.gFM";
|
||||
m_initiallySelected = false;
|
||||
m_tabIndex = 0;
|
||||
m_bVisible = true;
|
||||
m_contentSymbol = "buttonContentSymbol";
|
||||
}
|
||||
@@ -0,0 +1,111 @@
|
||||
function onLoad()
|
||||
{
|
||||
trace("feg_m_disconnect::onLoad()");
|
||||
this.onEnterFrame = _global.bind0(this,frameDelayedInit);
|
||||
}
|
||||
function frameDelayedInit()
|
||||
{
|
||||
this.onEnterFrame = null;
|
||||
m_refGlobalEventHandler = _root.gEH;
|
||||
this.disconnectMC.quitButton.setOnMouseUpFunction(this.quitButtonClicked);
|
||||
gMH.addMessageHandler(localMessageHandler);
|
||||
this.disconnectMC.quitButton.enable();
|
||||
var _loc3_ = this.disconnectMC;
|
||||
m_playerClips = [_loc3_.entry0,_loc3_.entry1,_loc3_.entry2,_loc3_.entry3,_loc3_.entry4,_loc3_.entry5];
|
||||
hideDisconnect();
|
||||
}
|
||||
function quitButtonClicked()
|
||||
{
|
||||
hideDisconnect();
|
||||
// Checked
|
||||
getUrl("FSCommand:CallGameFunction", "%DisconnectQuitGame");
|
||||
}
|
||||
function onUnload()
|
||||
{
|
||||
trace("feg_m_disconnect::onUnload()");
|
||||
gMH.removeMessageHandler(localMessageHandler);
|
||||
delete _global.feg_m_disconnect;
|
||||
}
|
||||
function localMessageHandler(messageCode)
|
||||
{
|
||||
trace("feg_m_disconnect::localMessageHandler() messageCode = \'" + messageCode + "\'");
|
||||
var _loc2_ = false;
|
||||
switch(messageCode)
|
||||
{
|
||||
case _global.MSGCODE.FE_SHOW_MP_DISCONNECT:
|
||||
showDisconnect();
|
||||
_loc2_ = true;
|
||||
break;
|
||||
case _global.MSGCODE.FE_HIDE_MP_DISCONNECT:
|
||||
hideDisconnect();
|
||||
_loc2_ = true;
|
||||
}
|
||||
return _loc2_;
|
||||
}
|
||||
function showDisconnect()
|
||||
{
|
||||
trace("feg_m_disconnect::showDisconnect()");
|
||||
if(m_refGlobalEventHandler.getCurrentLocalEventHandler() == undefined)
|
||||
{
|
||||
m_refGlobalEventHandler.setLocalEventHandler(null);
|
||||
}
|
||||
m_eventHandlerIndex = m_refGlobalEventHandler.addPriorityLocalEventHandler(localEventHandler,m_eventHandlerPriority);
|
||||
var _loc3_ = this.disconnectMC.quitButton;
|
||||
_loc3_.setText("$APT:DISCONNECTQUITGAME");
|
||||
_loc3_.show();
|
||||
_loc3_.enable();
|
||||
this.shadeMC._visible = true;
|
||||
this.disconnectMC._visible = true;
|
||||
m_playAudio = true;
|
||||
updateScreen();
|
||||
this.onEnterFrame = _global.bind0(this,updateScreen);
|
||||
}
|
||||
function hideDisconnect()
|
||||
{
|
||||
trace("feg_m_disconnect::hideDisconnect()");
|
||||
this.onEnterFrame = null;
|
||||
m_playAudio = false;
|
||||
this.shadeMC._visible = false;
|
||||
this.disconnectMC._visible = false;
|
||||
if(m_eventHandlerIndex != -1)
|
||||
{
|
||||
m_refGlobalEventHandler.removeLocalEventHandler(m_eventHandlerIndex);
|
||||
}
|
||||
m_eventHandlerIndex = -1;
|
||||
}
|
||||
function localEventHandler(keyCode, controller)
|
||||
{
|
||||
m_FM.handleDefaultInputs(keyCode);
|
||||
}
|
||||
function updateScreen()
|
||||
{
|
||||
var ret = new Object();
|
||||
// Checked
|
||||
loadVariables("QueryGameEngine?DISCONNECT_INFO",ret);
|
||||
var names = _loc5_.DISCONNECT_INFO_NAMES.split(",");
|
||||
var times = _loc5_.DISCONNECT_INFO_TIMES.split(",");
|
||||
var i = 0;
|
||||
for(var j = 0; j < m_playerClips.length; ++j)
|
||||
{
|
||||
m_playerClips[j]._visible = false;
|
||||
if(names[j].length > 0)
|
||||
{
|
||||
m_playerClips[i]._visible = true;
|
||||
m_playerClips[i].playerTF.text = names[j];
|
||||
m_playerClips[i].timeTF.text = times[j];
|
||||
i = i + 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
trace("feg_m_disconnect loading now");
|
||||
var PADDING = 5;
|
||||
var m_messageCallback;
|
||||
var m_playAudio = false;
|
||||
var m_eventHandlerIndex = -1;
|
||||
var m_eventHandlerPriority = 1;
|
||||
var m_refGlobalEventHandler;
|
||||
var m_playerClips;
|
||||
var OVERLAP_OFFSET = 4;
|
||||
onLoad();
|
||||
trace("feg_m_disconnect loaded");
|
||||
stop();
|
||||
Reference in New Issue
Block a user