From d8db0ff30cd1775a66694bd0f1e02795c85722be Mon Sep 17 00:00:00 2001 From: Callum Prentice Date: Tue, 3 Jun 2025 17:50:15 -0700 Subject: First commit - bare bones of it working - pointing to test page on S3 --- indra/newview/llfloateravatarwelcomepack.cpp | 58 ++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100644 indra/newview/llfloateravatarwelcomepack.cpp (limited to 'indra/newview/llfloateravatarwelcomepack.cpp') diff --git a/indra/newview/llfloateravatarwelcomepack.cpp b/indra/newview/llfloateravatarwelcomepack.cpp new file mode 100644 index 0000000000..82e44d1398 --- /dev/null +++ b/indra/newview/llfloateravatarwelcomepack.cpp @@ -0,0 +1,58 @@ +/** + * @file llfloateravatarwelcomepack.cpp + * @author Callum Prentice (callum@lindenlab.com) + * @brief Floater container for the Avatar Welcome Pack we app + * + * $LicenseInfo:firstyear=2011&license=viewerlgpl$ + * Second Life Viewer Source Code + * Copyright (C) 2011, Linden Research, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; + * version 2.1 of the License only. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA + * $/LicenseInfo$ + */ + +#include "llviewerprecompiledheaders.h" + +#include "llfloateravatarwelcomepack.h" +#include "lluictrlfactory.h" +#include "llmediactrl.h" + +LLFloaterAvatarWelcomePack::LLFloaterAvatarWelcomePack(const LLSD& key) + : LLFloater(key) +{ +} + +LLFloaterAvatarWelcomePack::~LLFloaterAvatarWelcomePack() +{ + if (mAvatarPicker) + { + mAvatarPicker->navigateStop(); + mAvatarPicker->clearCache(); //images are reloading each time already + mAvatarPicker->unloadMediaSource(); + } +} + +bool LLFloaterAvatarWelcomePack::postBuild() +{ + mAvatarPicker = findChild("avatar_picker_contents"); + if (mAvatarPicker) + { + mAvatarPicker->clearCache(); + } + + return true; +} -- cgit v1.2.3 From ddbcf74a8f171adabf3b61a8ce3419eea0d1e018 Mon Sep 17 00:00:00 2001 From: Callum Prentice Date: Thu, 5 Jun 2025 22:31:43 -0700 Subject: Open Avatar Welcome Pack floater on first login (or cleared settings) and move it to the center of the screen. Adjust the size of the floater (height) slightly. --- indra/newview/llfloateravatarwelcomepack.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'indra/newview/llfloateravatarwelcomepack.cpp') diff --git a/indra/newview/llfloateravatarwelcomepack.cpp b/indra/newview/llfloateravatarwelcomepack.cpp index 82e44d1398..06b6de0cbf 100644 --- a/indra/newview/llfloateravatarwelcomepack.cpp +++ b/indra/newview/llfloateravatarwelcomepack.cpp @@ -48,6 +48,7 @@ LLFloaterAvatarWelcomePack::~LLFloaterAvatarWelcomePack() bool LLFloaterAvatarWelcomePack::postBuild() { + center(); mAvatarPicker = findChild("avatar_picker_contents"); if (mAvatarPicker) { -- cgit v1.2.3 From a366a49daff63af865aa5e3bda9186d8b0db4814 Mon Sep 17 00:00:00 2001 From: Callum Prentice Date: Fri, 6 Jun 2025 17:21:19 -0700 Subject: tweak the size of the AWP floater to take account of new image sizes. Do not center floater anymore because it obscures the avatar. --- indra/newview/llfloateravatarwelcomepack.cpp | 1 - 1 file changed, 1 deletion(-) (limited to 'indra/newview/llfloateravatarwelcomepack.cpp') diff --git a/indra/newview/llfloateravatarwelcomepack.cpp b/indra/newview/llfloateravatarwelcomepack.cpp index 06b6de0cbf..82e44d1398 100644 --- a/indra/newview/llfloateravatarwelcomepack.cpp +++ b/indra/newview/llfloateravatarwelcomepack.cpp @@ -48,7 +48,6 @@ LLFloaterAvatarWelcomePack::~LLFloaterAvatarWelcomePack() bool LLFloaterAvatarWelcomePack::postBuild() { - center(); mAvatarPicker = findChild("avatar_picker_contents"); if (mAvatarPicker) { -- cgit v1.2.3