mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-25 15:35:23 +00:00
Queue screen fade operations invoked by scripts
This commit is contained in:
parent
f56debdb11
commit
6e1a11f322
@ -330,11 +330,11 @@ namespace MWBase
|
||||
virtual void pinWindow (MWGui::GuiWindow window) = 0;
|
||||
|
||||
/// Fade the screen in, over \a time seconds
|
||||
virtual void fadeScreenIn(const float time) = 0;
|
||||
virtual void fadeScreenIn(const float time, bool clearQueue=true) = 0;
|
||||
/// Fade the screen out to black, over \a time seconds
|
||||
virtual void fadeScreenOut(const float time) = 0;
|
||||
virtual void fadeScreenOut(const float time, bool clearQueue=true) = 0;
|
||||
/// Fade the screen to a specified percentage of black, over \a time seconds
|
||||
virtual void fadeScreenTo(const int percent, const float time) = 0;
|
||||
virtual void fadeScreenTo(const int percent, const float time, bool clearQueue=true) = 0;
|
||||
/// Darken the screen to a specified percentage
|
||||
virtual void setBlindness(const int percent) = 0;
|
||||
|
||||
|
@ -1748,21 +1748,24 @@ namespace MWGui
|
||||
updateVisible();
|
||||
}
|
||||
|
||||
void WindowManager::fadeScreenIn(const float time)
|
||||
void WindowManager::fadeScreenIn(const float time, bool clearQueue)
|
||||
{
|
||||
mScreenFader->clearQueue();
|
||||
if (clearQueue)
|
||||
mScreenFader->clearQueue();
|
||||
mScreenFader->fadeOut(time);
|
||||
}
|
||||
|
||||
void WindowManager::fadeScreenOut(const float time)
|
||||
void WindowManager::fadeScreenOut(const float time, bool clearQueue)
|
||||
{
|
||||
mScreenFader->clearQueue();
|
||||
if (clearQueue)
|
||||
mScreenFader->clearQueue();
|
||||
mScreenFader->fadeIn(time);
|
||||
}
|
||||
|
||||
void WindowManager::fadeScreenTo(const int percent, const float time)
|
||||
void WindowManager::fadeScreenTo(const int percent, const float time, bool clearQueue)
|
||||
{
|
||||
mScreenFader->clearQueue();
|
||||
if (clearQueue)
|
||||
mScreenFader->clearQueue();
|
||||
mScreenFader->fadeTo(percent, time);
|
||||
}
|
||||
|
||||
|
@ -325,11 +325,11 @@ namespace MWGui
|
||||
virtual void pinWindow (MWGui::GuiWindow window);
|
||||
|
||||
/// Fade the screen in, over \a time seconds
|
||||
virtual void fadeScreenIn(const float time);
|
||||
virtual void fadeScreenIn(const float time, bool clearQueue);
|
||||
/// Fade the screen out to black, over \a time seconds
|
||||
virtual void fadeScreenOut(const float time);
|
||||
virtual void fadeScreenOut(const float time, bool clearQueue);
|
||||
/// Fade the screen to a specified percentage of black, over \a time seconds
|
||||
virtual void fadeScreenTo(const int percent, const float time);
|
||||
virtual void fadeScreenTo(const int percent, const float time, bool clearQueue);
|
||||
/// Darken the screen to a specified percentage
|
||||
virtual void setBlindness(const int percent);
|
||||
|
||||
|
@ -246,7 +246,7 @@ namespace MWScript
|
||||
Interpreter::Type_Float time = runtime[0].mFloat;
|
||||
runtime.pop();
|
||||
|
||||
MWBase::Environment::get().getWindowManager()->fadeScreenIn(time);
|
||||
MWBase::Environment::get().getWindowManager()->fadeScreenIn(time, false);
|
||||
}
|
||||
};
|
||||
|
||||
@ -259,7 +259,7 @@ namespace MWScript
|
||||
Interpreter::Type_Float time = runtime[0].mFloat;
|
||||
runtime.pop();
|
||||
|
||||
MWBase::Environment::get().getWindowManager()->fadeScreenOut(time);
|
||||
MWBase::Environment::get().getWindowManager()->fadeScreenOut(time, false);
|
||||
}
|
||||
};
|
||||
|
||||
@ -275,7 +275,7 @@ namespace MWScript
|
||||
Interpreter::Type_Float time = runtime[0].mFloat;
|
||||
runtime.pop();
|
||||
|
||||
MWBase::Environment::get().getWindowManager()->fadeScreenTo(alpha, time);
|
||||
MWBase::Environment::get().getWindowManager()->fadeScreenTo(alpha, time, false);
|
||||
}
|
||||
};
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user