mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-12 07:04:36 +00:00
expand playgui callbacks to also allow game modes to inject element layers
This commit is contained in:
parent
3c358d45d0
commit
5f1eec0e00
1 changed files with 13 additions and 3 deletions
|
|
@ -37,12 +37,18 @@ function PlayGui::onWake(%this)
|
||||||
if(isObject(moveMap))
|
if(isObject(moveMap))
|
||||||
moveMap.push();
|
moveMap.push();
|
||||||
|
|
||||||
callOnModules("Playgui_onWake");
|
%modulesIDList = getModulesAndGameModesList(true, "Game");
|
||||||
|
%numModsNeedingLoaded = getNumCanCallOnObjectList("Playgui_onWake", %modulesIDList);
|
||||||
|
if (%numModsNeedingLoaded)
|
||||||
|
callOnObjectList("Playgui_onWake", %modulesIdList);
|
||||||
}
|
}
|
||||||
|
|
||||||
function PlayGui::onSleep(%this)
|
function PlayGui::onSleep(%this)
|
||||||
{
|
{
|
||||||
callOnModules("Playgui_onSleep");
|
%modulesIDList = getModulesAndGameModesList(true, "Game");
|
||||||
|
%numModsNeedingLoaded = getNumCanCallOnObjectList("Playgui_onSleep", %modulesIDList);
|
||||||
|
if (%numModsNeedingLoaded)
|
||||||
|
callOnObjectList("Playgui_onSleep", %modulesIdList);
|
||||||
|
|
||||||
// pop the keymaps
|
// pop the keymaps
|
||||||
if(isObject(moveMap))
|
if(isObject(moveMap))
|
||||||
|
|
@ -51,7 +57,11 @@ function PlayGui::onSleep(%this)
|
||||||
|
|
||||||
function PlayGui::clearHud( %this )
|
function PlayGui::clearHud( %this )
|
||||||
{
|
{
|
||||||
callOnModules("Playgui_clearHud");
|
%modulesIDList = getModulesAndGameModesList(true, "Game");
|
||||||
|
%numModsNeedingLoaded = getNumCanCallOnObjectList("Playgui_clearHud", %modulesIDList);
|
||||||
|
if (%numModsNeedingLoaded)
|
||||||
|
callOnObjectList("Playgui_clearHud", %modulesIdList);
|
||||||
|
|
||||||
Canvas.popDialog( MainChatHud );
|
Canvas.popDialog( MainChatHud );
|
||||||
|
|
||||||
while ( %this.getCount() > 0 )
|
while ( %this.getCount() > 0 )
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue