mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-04-02 03:06:43 +00:00
Merge branch '5468_progress_caption_overlapping' into 'master'
Issue #5468: Apparently this was always a problem but OP made "nested loading"... See merge request OpenMW/openmw!228
This commit is contained in:
commit
142a9e772b
2 changed files with 7 additions and 2 deletions
|
@ -40,6 +40,7 @@ namespace MWGui
|
||||||
, mLoadingOnTime(0.0)
|
, mLoadingOnTime(0.0)
|
||||||
, mImportantLabel(false)
|
, mImportantLabel(false)
|
||||||
, mVisible(false)
|
, mVisible(false)
|
||||||
|
, mNestedLoadingCount(0)
|
||||||
, mProgress(0)
|
, mProgress(0)
|
||||||
, mShowWallpaper(true)
|
, mShowWallpaper(true)
|
||||||
{
|
{
|
||||||
|
@ -163,11 +164,12 @@ namespace MWGui
|
||||||
|
|
||||||
void LoadingScreen::loadingOn(bool visible)
|
void LoadingScreen::loadingOn(bool visible)
|
||||||
{
|
{
|
||||||
mLoadingOnTime = mTimer.time_m();
|
|
||||||
// Early-out if already on
|
// Early-out if already on
|
||||||
if (mMainWidget->getVisible())
|
if (mNestedLoadingCount++ > 0 && mMainWidget->getVisible())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
mLoadingOnTime = mTimer.time_m();
|
||||||
|
|
||||||
// Assign dummy bounding sphere callback to avoid the bounding sphere of the entire scene being recomputed after each frame of loading
|
// Assign dummy bounding sphere callback to avoid the bounding sphere of the entire scene being recomputed after each frame of loading
|
||||||
// We are already using node masks to avoid the scene from being updated/rendered, but node masks don't work for computeBound()
|
// We are already using node masks to avoid the scene from being updated/rendered, but node masks don't work for computeBound()
|
||||||
mViewer->getSceneData()->setComputeBoundingSphereCallback(new DontComputeBoundCallback);
|
mViewer->getSceneData()->setComputeBoundingSphereCallback(new DontComputeBoundCallback);
|
||||||
|
@ -200,6 +202,8 @@ namespace MWGui
|
||||||
|
|
||||||
void LoadingScreen::loadingOff()
|
void LoadingScreen::loadingOff()
|
||||||
{
|
{
|
||||||
|
if (--mNestedLoadingCount > 0)
|
||||||
|
return;
|
||||||
mLoadingBox->setVisible(true); // restore
|
mLoadingBox->setVisible(true); // restore
|
||||||
|
|
||||||
if (mLastRenderTime < mLoadingOnTime)
|
if (mLastRenderTime < mLoadingOnTime)
|
||||||
|
|
|
@ -66,6 +66,7 @@ namespace MWGui
|
||||||
bool mImportantLabel;
|
bool mImportantLabel;
|
||||||
|
|
||||||
bool mVisible;
|
bool mVisible;
|
||||||
|
int mNestedLoadingCount;
|
||||||
|
|
||||||
size_t mProgress;
|
size_t mProgress;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue