mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-02-24 09:03:48 +00:00
Merge pull request #1398 from Azaezel/alpha41/stoppedClock
Alpha41/stopped clock
This commit is contained in:
commit
f56f0f811a
2 changed files with 15 additions and 5 deletions
|
|
@ -179,8 +179,8 @@ void GuiClockHud::setReverseTime(F32 time)
|
|||
// Set the current time in seconds.
|
||||
mTimeReversed = true;
|
||||
mTimeOffset = S32(time * 1000) + Platform::getVirtualMilliseconds();
|
||||
mPausedTime = S32(F32(mTimeOffset + Platform::getVirtualMilliseconds()) / 1000);
|
||||
mSignificantTimeReached = false;
|
||||
mPausedTime = getTime();
|
||||
}
|
||||
|
||||
void GuiClockHud::setTime(F32 time)
|
||||
|
|
@ -188,8 +188,8 @@ void GuiClockHud::setTime(F32 time)
|
|||
// Set the current time in seconds.
|
||||
mTimeReversed = false;
|
||||
mTimeOffset = S32(time * 1000) - Platform::getVirtualMilliseconds();
|
||||
mPausedTime = S32(F32(mTimeOffset - Platform::getVirtualMilliseconds()) / 1000);
|
||||
mSignificantTimeReached = false;
|
||||
mPausedTime = getTime();
|
||||
}
|
||||
|
||||
F32 GuiClockHud::getTime()
|
||||
|
|
|
|||
|
|
@ -37,12 +37,18 @@ function PlayGui::onWake(%this)
|
|||
if(isObject(moveMap))
|
||||
moveMap.push();
|
||||
|
||||
callOnModules("Playgui_onWake");
|
||||
%modulesIDList = getModulesAndGameModesList(true, "Game");
|
||||
%numModsNeedingLoaded = getNumCanCallOnObjectList("Playgui_onWake", %modulesIDList);
|
||||
if (%numModsNeedingLoaded)
|
||||
callOnObjectList("Playgui_onWake", %modulesIdList);
|
||||
}
|
||||
|
||||
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
|
||||
if(isObject(moveMap))
|
||||
|
|
@ -51,7 +57,11 @@ function PlayGui::onSleep(%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 );
|
||||
|
||||
while ( %this.getCount() > 0 )
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue