diff options
Diffstat (limited to 'indra')
-rw-r--r-- | indra/newview/llfloateranimpreview.cpp | 47 | ||||
-rw-r--r-- | indra/newview/llstartup.cpp | 14 |
2 files changed, 21 insertions, 40 deletions
diff --git a/indra/newview/llfloateranimpreview.cpp b/indra/newview/llfloateranimpreview.cpp index 9e6ef2fc4d..60f150bd96 100644 --- a/indra/newview/llfloateranimpreview.cpp +++ b/indra/newview/llfloateranimpreview.cpp @@ -570,25 +570,12 @@ void LLFloaterAnimPreview::onBtnPlay(void* user_data) { previewp->resetMotion(); previewp->mPauseRequest = NULL; - previewp->mPauseButton->setVisible(TRUE); - previewp->mPauseButton->setEnabled(TRUE); - previewp->mPlayButton->setVisible(FALSE); - previewp->mPlayButton->setEnabled(FALSE); } else if (avatarp->areAnimationsPaused()) - { - + { previewp->mPauseRequest = NULL; - previewp->mPauseButton->setVisible(TRUE); - previewp->mPauseButton->setEnabled(TRUE); - previewp->mPlayButton->setVisible(FALSE); - previewp->mPlayButton->setEnabled(FALSE); } - } - - - } //----------------------------------------------------------------------------- @@ -609,16 +596,9 @@ void LLFloaterAnimPreview::onBtnPause(void* user_data) if (!avatarp->areAnimationsPaused()) { previewp->mPauseRequest = avatarp->requestPause(); - - previewp->mPlayButton->setVisible(TRUE); - previewp->mPlayButton->setEnabled(TRUE); - previewp->mPauseButton->setVisible(FALSE); - previewp->mPauseButton->setEnabled(FALSE); } } } - - } //----------------------------------------------------------------------------- @@ -636,10 +616,6 @@ void LLFloaterAnimPreview::onBtnStop(void* user_data) previewp->resetMotion(); previewp->mPauseRequest = avatarp->requestPause(); } - previewp->mPlayButton->setVisible(TRUE); - previewp->mPlayButton->setEnabled(TRUE); - previewp->mPauseButton->setVisible(FALSE); - previewp->mPauseButton->setEnabled(FALSE); } //----------------------------------------------------------------------------- @@ -953,18 +929,22 @@ bool LLFloaterAnimPreview::validateLoopOut(const LLSD& data) //----------------------------------------------------------------------------- void LLFloaterAnimPreview::refresh() { + // Are we showing the play button (default) or the pause button? + bool show_play = true; if (!mAnimPreview) { childShow("bad_animation_text"); + // play button visible but disabled mPlayButton->setEnabled(FALSE); - mPlayButton->setVisible(TRUE); - mPauseButton->setVisible(FALSE); mStopButton->setEnabled(FALSE); childDisable("ok_btn"); } else { childHide("bad_animation_text"); + // re-enabled in case previous animation was bad + mPlayButton->setEnabled(TRUE); + mStopButton->setEnabled(TRUE); LLVOAvatar* avatarp = mAnimPreview->getDummyAvatar(); if (avatarp->isMotionActive(mMotionID)) { @@ -972,28 +952,25 @@ void LLFloaterAnimPreview::refresh() LLKeyframeMotion* motionp = (LLKeyframeMotion*)avatarp->findMotion(mMotionID); if (!avatarp->areAnimationsPaused()) { + // animation is playing if (motionp) { F32 fraction_complete = motionp->getLastUpdateTime() / motionp->getDuration(); childSetValue("playback_slider", fraction_complete); } - - mPlayButton->setVisible(FALSE); - mPauseButton->setVisible(TRUE); - + show_play = false; } - } else { + // Motion just finished playing mPauseRequest = avatarp->requestPause(); - //mPlayButton->setVisible(TRUE); - //mPlayButton->setEnabled(TRUE); - mStopButton->setEnabled(TRUE); // stop also resets, leave enabled. } childEnable("ok_btn"); mAnimPreview->requestUpdate(); } + mPlayButton->setVisible(show_play); + mPauseButton->setVisible(!show_play); } //----------------------------------------------------------------------------- diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp index 539673ab9e..73e7d99815 100644 --- a/indra/newview/llstartup.cpp +++ b/indra/newview/llstartup.cpp @@ -1634,11 +1634,15 @@ bool idle_startup() gSavedSettings.setString("TutorialURL", tutorial_url.asString()); } - LLSD use_tutorial = (*it)["use_tutorial"]; - if(use_tutorial.asString() == "true") - { - show_hud = true; - } + // For Viewer 2.0 we are not using the web-based tutorial + // If we reverse that decision, put this code back and use + // login.cgi to send a different URL with content that matches + // the Viewer 2.0 UI. + //LLSD use_tutorial = (*it)["use_tutorial"]; + //if(use_tutorial.asString() == "true") + //{ + // show_hud = true; + //} } } // Either we want to show tutorial because this is the first login |