summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCallum Prentice <callum@lindenlab.com>2025-06-03 17:50:15 -0700
committerCallum Prentice <callum@lindenlab.com>2025-06-03 17:50:15 -0700
commitd8db0ff30cd1775a66694bd0f1e02795c85722be (patch)
tree63f4b2d831e1baee6dab6d46321c02913d366e0c
parentde8275b14b30bf754cdba1da867cb2e6c2783639 (diff)
First commit - bare bones of it working - pointing to test page on S3
-rw-r--r--indra/newview/CMakeLists.txt2
-rw-r--r--indra/newview/app_settings/commands.xml4
-rw-r--r--indra/newview/app_settings/settings.xml11
-rw-r--r--indra/newview/llfloateravatarwelcomepack.cpp58
-rw-r--r--indra/newview/llfloateravatarwelcomepack.h45
-rw-r--r--indra/newview/llviewerfloaterreg.cpp2
-rw-r--r--indra/newview/llviewerwindow.cpp8
-rw-r--r--indra/newview/skins/default/xui/en/floater_avatar_welcome_pack.xml25
-rw-r--r--indra/newview/skins/default/xui/en/menu_viewer.xml6
-rw-r--r--indra/newview/skins/default/xui/en/strings.xml2
10 files changed, 157 insertions, 6 deletions
diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt
index 98151e2f4d..172c7f4b1f 100644
--- a/indra/newview/CMakeLists.txt
+++ b/indra/newview/CMakeLists.txt
@@ -178,6 +178,7 @@ set(viewer_SOURCE_FILES
llflexibleobject.cpp
llfloater360capture.cpp
llfloaterabout.cpp
+ llfloateravatarwelcomepack.cpp
llfloaterbvhpreview.cpp
llfloateraddpaymentmethod.cpp
llfloaterauction.cpp
@@ -849,6 +850,7 @@ set(viewer_HEADER_FILES
llflexibleobject.h
llfloater360capture.h
llfloaterabout.h
+ llfloateravatarwelcomepack.h
llfloaterbvhpreview.h
llfloateraddpaymentmethod.h
llfloaterauction.h
diff --git a/indra/newview/app_settings/commands.xml b/indra/newview/app_settings/commands.xml
index 4a3dfffde1..7bcfecf9fa 100644
--- a/indra/newview/app_settings/commands.xml
+++ b/indra/newview/app_settings/commands.xml
@@ -26,9 +26,9 @@
label_ref="Command_Avatar_Label"
tooltip_ref="Command_Avatar_Tooltip"
execute_function="Floater.ToggleOrBringToFront"
- execute_parameters="avatar"
+ execute_parameters="avatar_welcome_pack"
is_running_function="Floater.IsOpen"
- is_running_parameters="avatar"
+ is_running_parameters="avatar_welcome_pack"
/>
<command name="build"
available_in_toybox="true"
diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml
index 8cfe4f3d97..90da70763f 100644
--- a/indra/newview/app_settings/settings.xml
+++ b/indra/newview/app_settings/settings.xml
@@ -632,6 +632,17 @@
<key>Value</key>
<string>http://lecs-viewer-web-components.s3.amazonaws.com/v3.0/[GRID_LOWERCASE]/avatars.html</string>
</map>
+ <key>AvatarWelcomePack</key>
+ <map>
+ <key>Comment</key>
+ <string>Avatar Welcome Pack contents</string>
+ <key>Persist</key>
+ <integer>1</integer>
+ <key>Type</key>
+ <string>String</string>
+ <key>Value</key>
+ <string>https://sl-viewer-media-system.s3.amazonaws.com/vawp/index.html</string>
+ </map>
<!--AvatarBakedTextureUploadTimeout is in use by QA-->
<key>AvatarBakedTextureUploadTimeout</key>
<map>
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<LLMediaCtrl>("avatar_picker_contents");
+ if (mAvatarPicker)
+ {
+ mAvatarPicker->clearCache();
+ }
+
+ return true;
+}
diff --git a/indra/newview/llfloateravatarwelcomepack.h b/indra/newview/llfloateravatarwelcomepack.h
new file mode 100644
index 0000000000..a332d46708
--- /dev/null
+++ b/indra/newview/llfloateravatarwelcomepack.h
@@ -0,0 +1,45 @@
+/**
+ * @file llfloateravatarwelcomepack.h
+ * @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$
+ */
+
+#pragma once
+
+#include "llfloater.h"
+
+class LLMediaCtrl;
+
+class LLFloaterAvatarWelcomePack:
+ public LLFloater
+{
+ friend class LLFloaterReg;
+
+ private:
+ LLFloaterAvatarWelcomePack(const LLSD& key);
+ ~LLFloaterAvatarWelcomePack();
+ bool postBuild() override;
+
+ LLMediaCtrl* mAvatarPicker;
+};
diff --git a/indra/newview/llviewerfloaterreg.cpp b/indra/newview/llviewerfloaterreg.cpp
index 4d9c2f3281..c4daa6dd8b 100644
--- a/indra/newview/llviewerfloaterreg.cpp
+++ b/indra/newview/llviewerfloaterreg.cpp
@@ -40,6 +40,7 @@
#include "llfloaterautoreplacesettings.h"
#include "llfloateravatar.h"
#include "llfloateravatarpicker.h"
+#include "llfloateravatarwelcomepack.h"
#include "llfloateravatarrendersettings.h"
#include "llfloateravatartextures.h"
#include "llfloaterbanduration.h"
@@ -333,6 +334,7 @@ void LLViewerFloaterReg::registerFloaters()
LLFloaterReg::add("auction", "floater_auction.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterAuction>);
LLFloaterReg::add("avatar", "floater_avatar.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterAvatar>);
LLFloaterReg::add("avatar_picker", "floater_avatar_picker.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterAvatarPicker>);
+ LLFloaterReg::add("avatar_welcome_pack", "floater_avatar_welcome_pack.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterAvatarWelcomePack>);
LLFloaterReg::add("avatar_render_settings", "floater_avatar_render_settings.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterAvatarRenderSettings>);
LLFloaterReg::add("avatar_textures", "floater_avatar_textures.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterAvatarTextures>);
diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp
index d2685bcc48..a279664522 100644
--- a/indra/newview/llviewerwindow.cpp
+++ b/indra/newview/llviewerwindow.cpp
@@ -2299,6 +2299,14 @@ void LLViewerWindow::initWorldUI()
url = LLWeb::expandURLSubstitutions(url, LLSD());
avatar_picker->navigateTo(url, HTTP_CONTENT_TEXT_HTML);
}
+ LLMediaCtrl* avatar_welcome_pack = LLFloaterReg::getInstance("avatar_welcome_pack")->findChild<LLMediaCtrl>("avatar_picker_contents");
+ if (avatar_welcome_pack)
+ {
+ avatar_welcome_pack->setErrorPageURL(gSavedSettings.getString("GenericErrorPageURL"));
+ std::string url = gSavedSettings.getString("AvatarWelcomePack");
+ url = LLWeb::expandURLSubstitutions(url, LLSD());
+ avatar_welcome_pack->navigateTo(url, HTTP_CONTENT_TEXT_HTML);
+ }
}
}
diff --git a/indra/newview/skins/default/xui/en/floater_avatar_welcome_pack.xml b/indra/newview/skins/default/xui/en/floater_avatar_welcome_pack.xml
new file mode 100644
index 0000000000..0ea79e68c2
--- /dev/null
+++ b/indra/newview/skins/default/xui/en/floater_avatar_welcome_pack.xml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
+<floater
+ positioning="cascading"
+ legacy_header_height="225"
+ can_minimize="true"
+ can_close="true"
+ can_resize="false"
+ min_height="600"
+ min_width="800"
+ height="600"
+ layout="topleft"
+ name="Avatar Welcome Pack"
+ single_instance="true"
+ save_rect="true"
+ save_visibility="true"
+ title="AVATAR WELCOME PACK"
+ width="800">
+ <web_browser
+ top="25"
+ height="600"
+ width="800"
+ follows="all"
+ name="avatar_picker_contents"
+ trusted_content="true"/>
+</floater>
diff --git a/indra/newview/skins/default/xui/en/menu_viewer.xml b/indra/newview/skins/default/xui/en/menu_viewer.xml
index 343f0c0059..040fae3256 100644
--- a/indra/newview/skins/default/xui/en/menu_viewer.xml
+++ b/indra/newview/skins/default/xui/en/menu_viewer.xml
@@ -411,11 +411,11 @@
</menu_item_call>
<menu_item_separator/>
<menu_item_call
- label="Complete avatars..."
- name="Avatar Picker">
+ label="Avatar Welcome Pack..."
+ name="Avatar Welcome Pack">
<menu_item_call.on_click
function="Floater.ToggleOrBringToFront"
- parameter="avatar" />
+ parameter="avatar_welcome_pack" />
</menu_item_call>
<menu_item_separator/>
diff --git a/indra/newview/skins/default/xui/en/strings.xml b/indra/newview/skins/default/xui/en/strings.xml
index faa751bbf1..532d536589 100644
--- a/indra/newview/skins/default/xui/en/strings.xml
+++ b/indra/newview/skins/default/xui/en/strings.xml
@@ -4186,7 +4186,7 @@ Try enclosing path to the editor with double quotes.
name="Command_360_Capture_Label">360 snapshot</string>
<string name="Command_AboutLand_Label">About land</string>
<string name="Command_Appearance_Label">Outfits</string>
- <string name="Command_Avatar_Label">Complete avatars</string>
+ <string name="Command_Avatar_Label">Avatar Welcome Pack</string>
<string name="Command_Build_Label">Build</string>
<string name="Command_Chat_Label">Chat</string>
<string name="Command_Conversations_Label">Conversations</string>