mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-26 09:35:28 +00:00
Remove redundant update function
This commit is contained in:
parent
e7d2a8a4dc
commit
f67dbc8aa0
@ -161,11 +161,6 @@ void OMW::Engine::frame(float frametime)
|
||||
|
||||
// update GUI
|
||||
mEnvironment.getWindowManager()->onFrame(frametime);
|
||||
if (mEnvironment.getStateManager()->getState()!=
|
||||
MWBase::StateManager::State_NoGame)
|
||||
{
|
||||
mEnvironment.getWindowManager()->update();
|
||||
}
|
||||
|
||||
unsigned int frameNumber = mViewer->getFrameStamp()->getFrameNumber();
|
||||
osg::Stats* stats = mViewer->getViewerStats();
|
||||
|
@ -102,13 +102,6 @@ namespace MWBase
|
||||
|
||||
virtual ~WindowManager() {}
|
||||
|
||||
/**
|
||||
* Should be called each frame to update windows/gui elements.
|
||||
* This could mean updating sizes of gui elements or opening
|
||||
* new dialogs.
|
||||
*/
|
||||
virtual void update() = 0;
|
||||
|
||||
/// @note This method will block until the video finishes playing
|
||||
/// (and will continually update the window while doing so)
|
||||
virtual void playVideo(const std::string& name, bool allowSkipping) = 0;
|
||||
|
@ -371,6 +371,20 @@ namespace MWGui
|
||||
|
||||
if (mIsDrowning)
|
||||
mDrowningFlashTheta += dt * osg::PI*2;
|
||||
|
||||
mSpellIcons->updateWidgets(mEffectBox, true);
|
||||
|
||||
if (mEnemyActorId != -1 && mEnemyHealth->getVisible())
|
||||
{
|
||||
updateEnemyHealthBar();
|
||||
}
|
||||
|
||||
if (mIsDrowning)
|
||||
{
|
||||
float intensity = (cos(mDrowningFlashTheta) + 2.0f) / 3.0f;
|
||||
|
||||
mDrowningFlash->setAlpha(intensity);
|
||||
}
|
||||
}
|
||||
|
||||
void HUD::setSelectedSpell(const std::string& spellId, int successChancePercent)
|
||||
@ -602,23 +616,6 @@ namespace MWGui
|
||||
|
||||
}
|
||||
|
||||
void HUD::update()
|
||||
{
|
||||
mSpellIcons->updateWidgets(mEffectBox, true);
|
||||
|
||||
if (mEnemyActorId != -1 && mEnemyHealth->getVisible())
|
||||
{
|
||||
updateEnemyHealthBar();
|
||||
}
|
||||
|
||||
if (mIsDrowning)
|
||||
{
|
||||
float intensity = (cos(mDrowningFlashTheta) + 2.0f) / 3.0f;
|
||||
|
||||
mDrowningFlash->setAlpha(intensity);
|
||||
}
|
||||
}
|
||||
|
||||
void HUD::setEnemy(const MWWorld::Ptr &enemy)
|
||||
{
|
||||
mEnemyActorId = enemy.getClass().getCreatureStats(enemy).getActorId();
|
||||
|
@ -55,8 +55,6 @@ namespace MWGui
|
||||
|
||||
MyGUI::Widget* getEffectBox() { return mEffectBox; }
|
||||
|
||||
void update();
|
||||
|
||||
void setEnemy(const MWWorld::Ptr& enemy);
|
||||
void resetEnemy();
|
||||
|
||||
|
@ -581,15 +581,6 @@ namespace MWGui
|
||||
}
|
||||
}
|
||||
|
||||
void WindowManager::update()
|
||||
{
|
||||
cleanupGarbage();
|
||||
|
||||
mHud->update();
|
||||
|
||||
updateActivatedQuickKey ();
|
||||
}
|
||||
|
||||
void WindowManager::updateVisible()
|
||||
{
|
||||
if (!mMap)
|
||||
@ -926,6 +917,10 @@ namespace MWGui
|
||||
|
||||
if (mCharGen)
|
||||
mCharGen->onFrame(frameDuration);
|
||||
|
||||
updateActivatedQuickKey ();
|
||||
|
||||
cleanupGarbage();
|
||||
}
|
||||
|
||||
void WindowManager::changeCell(const MWWorld::CellStore* cell)
|
||||
|
@ -146,13 +146,6 @@ namespace MWGui
|
||||
/// (and will continually update the window while doing so)
|
||||
virtual void playVideo(const std::string& name, bool allowSkipping);
|
||||
|
||||
/**
|
||||
* Should be called each frame to update windows/gui elements.
|
||||
* This could mean updating sizes of gui elements or opening
|
||||
* new dialogs.
|
||||
*/
|
||||
virtual void update();
|
||||
|
||||
/// Warning: do not use MyGUI::InputManager::setKeyFocusWidget directly. Instead use this.
|
||||
virtual void setKeyFocusWidget (MyGUI::Widget* widget);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user