Skip to content

Commit

Permalink
Fixed|UI|Client: Reverted a couple of problematic changes
Browse files Browse the repository at this point in the history
Startup busy mode is back, and the Home doesn’t fade itself anymore
(busy mode does that).
  • Loading branch information
skyjake committed Feb 8, 2017
1 parent 02236bd commit 078b383
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 26 deletions.
18 changes: 8 additions & 10 deletions doomsday/apps/client/src/dd_main.cpp
Expand Up @@ -189,7 +189,7 @@ class WadFileType : public de::NativeFileType
};

static dint DD_StartupWorker(void *context);
//static dint DD_DummyWorker(void *context);
static dint DD_DummyWorker(void *context);

dint isDedicated;
dint verbose; ///< For debug messages (-verbose).
Expand Down Expand Up @@ -1036,9 +1036,8 @@ static void initialize()
// Enter busy mode until startup complete.
Con_InitProgress(200);
#endif
/*BusyMode_RunNewTaskWithName(BUSYF_NO_UPLOADS | BUSYF_STARTUP | BUSYF_PROGRESS_BAR | (verbose? BUSYF_CONSOLE_OUTPUT : 0),
DD_StartupWorker, 0, "Starting up...");*/
DD_StartupWorker(nullptr);
BusyMode_RunNewTaskWithName(BUSYF_NO_UPLOADS | BUSYF_STARTUP | BUSYF_PROGRESS_BAR | (verbose? BUSYF_CONSOLE_OUTPUT : 0),
DD_StartupWorker, 0, "Starting up...");

// Engine initialization is complete. Now finish up with the GL.
#ifdef __CLIENT__
Expand All @@ -1049,13 +1048,12 @@ static void initialize()
#endif
App_Resources().initSystemTextures();

/*#ifdef __CLIENT__
#ifdef __CLIENT__
// Do deferred uploads.
Con_SetProgress(100);
#endif*/
/*BusyMode_RunNewTaskWithName(BUSYF_STARTUP | BUSYF_PROGRESS_BAR | (verbose? BUSYF_CONSOLE_OUTPUT : 0),
DD_DummyWorker, 0, "Starting up...");
*/
#endif
BusyMode_RunNewTaskWithName(BUSYF_STARTUP | BUSYF_PROGRESS_BAR | (verbose? BUSYF_CONSOLE_OUTPUT : 0),
DD_DummyWorker, 0, "Buffering...");

//
// Try to locate all required data files for all registered games.
Expand Down Expand Up @@ -1384,7 +1382,7 @@ static dint DD_StartupWorker(void * /*context*/)
return 0;
}

#if 0
#if 1
/**
* This only exists so we have something to call while the deferred uploads of the
* startup are processed.
Expand Down
23 changes: 8 additions & 15 deletions doomsday/apps/client/src/ui/home/homewidget.cpp
Expand Up @@ -48,7 +48,7 @@ static TimeDelta const SCROLL_SPAN = .5;
static TimeDelta const DISMISS_SPAN = 1.5;

DENG_GUI_PIMPL(HomeWidget)
//, DENG2_OBSERVES(App, StartupComplete)
, DENG2_OBSERVES(App, StartupComplete)
, DENG2_OBSERVES(Games, Readiness)
, DENG2_OBSERVES(DoomsdayApp, GameLoad)
, DENG2_OBSERVES(DoomsdayApp, GameChange)
Expand All @@ -70,10 +70,7 @@ DENG_GUI_PIMPL(HomeWidget)
IndirectRule *columnWidth;
LabelWidget *tabsBackground;
TabWidget *tabs;

// Fade in.
SafeWidgetPtr<FadeToBlackWidget> blanker;

int currentOffsetTab = 0;
AnimationRule *scrollOffset;
AnimationRule *dismissOffset;
Expand All @@ -88,7 +85,7 @@ DENG_GUI_PIMPL(HomeWidget)

Impl(Public *i) : Base(i)
{
//App::app().audienceForStartupComplete() += this;
App::app().audienceForStartupComplete() += this;
DoomsdayApp::games().audienceForReadiness() += this;
DoomsdayApp::app().audienceForGameChange() += this;
DoomsdayApp::app().audienceForGameLoad() += this;
Expand Down Expand Up @@ -221,6 +218,11 @@ DENG_GUI_PIMPL(HomeWidget)
}
}

void appStartupCompleted()
{
blanker->guiDeleteLater();
}

void gameReadinessUpdated()
{
updateVisibleColumnsAndTabs();
Expand Down Expand Up @@ -522,7 +524,7 @@ HomeWidget::HomeWidget()
// Hide content until first update.
d->blanker.reset(new FadeToBlackWidget);
d->blanker->rule().setRect(rule());
d->blanker->initFadeFromBlack(2.5);
d->blanker->initFadeFromBlack(0);
add(d->blanker);

add(d->taskBarHintButton);
Expand Down Expand Up @@ -595,15 +597,6 @@ void HomeWidget::update()
{
GuiWidget::update();
d->checkDismissHiding();

if (d->blanker)
{
if (!d->blanker->isStarted())
{
d->blanker->start(1.5);
}
d->blanker->disposeIfDone();
}
}

PopupWidget *HomeWidget::makeSettingsPopup()
Expand Down
1 change: 0 additions & 1 deletion doomsday/apps/client/src/ui/widgets/busywidget.cpp
Expand Up @@ -54,7 +54,6 @@ DENG_GUI_PIMPL(BusyWidget)
progress->setImageScale(.2f);
progress->rule().setRect(self().rule());
self().add(progress);
progress->hide();
}

void glInit()
Expand Down

0 comments on commit 078b383

Please sign in to comment.