From 6b203f2ee4bbaf893b7256e35581403b18de68f3 Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Thu, 19 Mar 2020 21:39:05 +0200 Subject: SL-12607 FMOD Logo --- indra/llcommon/indra_constants.cpp | 2 ++ indra/llcommon/indra_constants.h | 2 ++ indra/newview/llprogressview.cpp | 14 +++++++++++ indra/newview/llprogressview.h | 3 +++ indra/newview/llstartup.cpp | 1 + indra/newview/llviewertexturelist.cpp | 29 ++++++++++++++++++++++ indra/newview/llviewerwindow.cpp | 4 +++ indra/newview/llviewerwindow.h | 1 + .../skins/default/xui/en/panel_progress.xml | 22 ++++++++++++++++ indra/newview/viewer_manifest.py | 15 +++++++++++ 10 files changed, 93 insertions(+) (limited to 'indra') diff --git a/indra/llcommon/indra_constants.cpp b/indra/llcommon/indra_constants.cpp index e13176e8fa..53f98adbbf 100644 --- a/indra/llcommon/indra_constants.cpp +++ b/indra/llcommon/indra_constants.cpp @@ -84,3 +84,5 @@ const LLUUID IMG_USE_BAKED_AUX1 ("9742065b-19b5-297c-858a-29711d539043"); const LLUUID IMG_USE_BAKED_AUX2 ("03642e83-2bd1-4eb9-34b4-4c47ed586d2d"); const LLUUID IMG_USE_BAKED_AUX3 ("edd51b77-fc10-ce7a-4b3d-011dfc349e4f"); +const LLUUID IMG_LOGO_FMOD("876982f5-f5fd-4a68-b5e7-727f3ae3487b"); + diff --git a/indra/llcommon/indra_constants.h b/indra/llcommon/indra_constants.h index 0fbf4b966b..7d20286ac9 100644 --- a/indra/llcommon/indra_constants.h +++ b/indra/llcommon/indra_constants.h @@ -218,6 +218,8 @@ LL_COMMON_API extern const LLUUID IMG_USE_BAKED_AUX1; LL_COMMON_API extern const LLUUID IMG_USE_BAKED_AUX2; LL_COMMON_API extern const LLUUID IMG_USE_BAKED_AUX3; +LL_COMMON_API extern const LLUUID IMG_LOGO_FMOD; + LL_COMMON_API extern const LLUUID DEFAULT_WATER_NORMAL; diff --git a/indra/newview/llprogressview.cpp b/indra/newview/llprogressview.cpp index 083a913ef8..dfa6c97b26 100644 --- a/indra/newview/llprogressview.cpp +++ b/indra/newview/llprogressview.cpp @@ -42,6 +42,7 @@ #include "llbutton.h" #include "llcallbacklist.h" #include "llfocusmgr.h" +#include "lliconctrl.h" #include "llnotifications.h" #include "llprogressbar.h" #include "llstartup.h" @@ -183,6 +184,7 @@ void LLProgressView::setVisible(BOOL visible) if (getVisible() && !visible) { LLPanel::setVisible(FALSE); + setShowLogos(FALSE); } // showing progress view else if (visible && (!getVisible() || mFadeToWorldTimer.getStarted())) @@ -309,6 +311,18 @@ void LLProgressView::setMessage(const std::string& msg) getChild("message_text")->setValue(mMessage); } +void LLProgressView::setShowLogos(const BOOL logos_visible) +{ + LLIconCtrl* logo = getChild("fmod_logo"); + if (logos_visible) + { + logo->setValue(IMG_LOGO_FMOD); + } + logo->setVisible(logos_visible); + getChild("fmod_text")->setVisible(logos_visible); + getChild("message_text")->setVisible(!logos_visible); +} + void LLProgressView::setCancelButtonVisible(BOOL b, const std::string& label) { mCancelBtn->setVisible( b ); diff --git a/indra/newview/llprogressview.h b/indra/newview/llprogressview.h index 813576b21d..1d4ae3a66f 100644 --- a/indra/newview/llprogressview.h +++ b/indra/newview/llprogressview.h @@ -70,6 +70,9 @@ public: void setStartupComplete(); + // turns on logos, hides message of the day + void setShowLogos(const BOOL logos_visible); + void setCancelButtonVisible(BOOL b, const std::string& label); static void onCancelButtonClicked( void* ); diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp index fdf0ff3506..cb76ac6f74 100644 --- a/indra/newview/llstartup.cpp +++ b/indra/newview/llstartup.cpp @@ -734,6 +734,7 @@ bool idle_startup() display_startup(); // LLViewerMedia::initBrowser(); LLStartUp::setStartupState( STATE_LOGIN_SHOW ); + gViewerWindow->setShowLogos(TRUE); return FALSE; } diff --git a/indra/newview/llviewertexturelist.cpp b/indra/newview/llviewertexturelist.cpp index 06524847d1..b29e65923b 100644 --- a/indra/newview/llviewertexturelist.cpp +++ b/indra/newview/llviewertexturelist.cpp @@ -190,6 +190,35 @@ void LLViewerTextureList::doPreloadImages() mImagePreloads.insert(image); } + // Normally images are located in 'skins' folder in working directory, + // but 3p images were added from packages and had to stay in separate folder + // with path relative to exe. + + std::string full_path = gDirUtilp->getExpandedFilename(LL_PATH_EXECUTABLE, "3p_icons", "fmod.png"); + if (full_path.empty()) + { + LL_WARNS() << "Failed to find local image file fmod.png at " << full_path << LL_ENDL; + } + else if (gDirUtilp->fileExists(full_path)) + { + image = LLViewerTextureManager::getFetchedTextureFromUrl("file://" + full_path, FTT_LOCAL_FILE, MIPMAP_YES, LLViewerFetchedTexture::BOOST_UI, LLViewerTexture::FETCHED_TEXTURE, + 0, 0, IMG_LOGO_FMOD); + if (image) + { + image->setAddressMode(LLTexUnit::TAM_WRAP); + mImagePreloads.insert(image); + // Speed up load (this texture will be used early) + image->setKnownDrawSize(364, 98); + image->processTextureStats(); + image->setDecodePriority(LLViewerFetchedTexture::maxDecodePriority()); + image->updateFetch(); + // Fmod logo is only needed at startup, if we will get more logos + // for startup, might be good idea to save resources and do loading + // in scope of llprogressview and then unload everything once no + // longer needed + } + } + LLPointer img_blak_square_tex(new LLImageRaw(2, 2, 3)); memset(img_blak_square_tex->getData(), 0, img_blak_square_tex->getDataSize()); LLPointer img_blak_square(new LLViewerFetchedTexture(img_blak_square_tex, FTT_DEFAULT, FALSE)); diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index ff5dff1c9b..89f3b17021 100644 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -5151,6 +5151,10 @@ void LLViewerWindow::setProgressCancelButtonVisible( BOOL b, const std::string& } } +void LLViewerWindow::setShowLogos(const BOOL show_3p_logos) +{ + mProgressView->setShowLogos(show_3p_logos); +} LLProgressView *LLViewerWindow::getProgressView() const { diff --git a/indra/newview/llviewerwindow.h b/indra/newview/llviewerwindow.h index 385bbd57e5..9adfe7b5c5 100644 --- a/indra/newview/llviewerwindow.h +++ b/indra/newview/llviewerwindow.h @@ -309,6 +309,7 @@ public: void setProgressPercent(const F32 percent); void setProgressMessage(const std::string& msg); void setProgressCancelButtonVisible( BOOL b, const std::string& label = LLStringUtil::null ); + void setShowLogos(const BOOL show_3p_logos); LLProgressView *getProgressView() const; void revealIntroPanel(); void setStartupComplete(); diff --git a/indra/newview/skins/default/xui/en/panel_progress.xml b/indra/newview/skins/default/xui/en/panel_progress.xml index 860caf2d21..03caf8e8ad 100644 --- a/indra/newview/skins/default/xui/en/panel_progress.xml +++ b/indra/newview/skins/default/xui/en/panel_progress.xml @@ -106,6 +106,28 @@ top="145" right="-90" word_wrap="true"/> + + + Made with FMOD Studio by Firelight Technologies Pty Ltd. +