First commit - bare bones of it working - pointing to test page on S3

master
Callum Prentice 2025-06-03 17:50:15 -07:00
parent de8275b14b
commit d8db0ff30c
10 changed files with 157 additions and 6 deletions

View File

@ -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

View File

@ -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"

View File

@ -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>

View File

@ -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;
}

View File

@ -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;
};

View File

@ -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>);

View File

@ -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);
}
}
}

View File

@ -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>

View File

@ -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/>

View File

@ -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>