Skip to content
Snippets Groups Projects
Commit f1a6e776 authored by Mnikolenko Productengine's avatar Mnikolenko Productengine
Browse files

SL-12097, SL-12098, SL-12099 UI update for Texture, Animation and Sound upload fees

parent 9621dd8b
No related branches found
No related tags found
No related merge requests found
......@@ -68,7 +68,8 @@
const S32 PREVIEW_BORDER_WIDTH = 2;
const S32 PREVIEW_RESIZE_HANDLE_SIZE = S32(RESIZE_HANDLE_WIDTH * OO_SQRT2) + PREVIEW_BORDER_WIDTH;
const S32 PREVIEW_HPAD = PREVIEW_RESIZE_HANDLE_SIZE;
const S32 PREF_BUTTON_HEIGHT = 16;
const S32 PREVIEW_VPAD = 35;
const S32 PREF_BUTTON_HEIGHT = 16 + 35;
const S32 PREVIEW_TEXTURE_HEIGHT = 300;
const F32 PREVIEW_CAMERA_DISTANCE = 4.f;
......@@ -203,7 +204,7 @@ BOOL LLFloaterBvhPreview::postBuild()
setDefaultBtn();
mPreviewRect.set(PREVIEW_HPAD,
PREVIEW_TEXTURE_HEIGHT,
PREVIEW_TEXTURE_HEIGHT + PREVIEW_VPAD,
getRect().getWidth() - PREVIEW_HPAD,
PREVIEW_HPAD + PREF_BUTTON_HEIGHT + PREVIEW_HPAD);
mPreviewImageRect.set(0.f, 1.f, 1.f, 0.f);
......@@ -403,13 +404,13 @@ void LLFloaterBvhPreview::draw()
gGL.begin( LLRender::QUADS );
{
gGL.texCoord2f(0.f, 1.f);
gGL.vertex2i(PREVIEW_HPAD, PREVIEW_TEXTURE_HEIGHT);
gGL.vertex2i(PREVIEW_HPAD, PREVIEW_TEXTURE_HEIGHT + PREVIEW_VPAD);
gGL.texCoord2f(0.f, 0.f);
gGL.vertex2i(PREVIEW_HPAD, PREVIEW_HPAD + PREF_BUTTON_HEIGHT + PREVIEW_HPAD);
gGL.texCoord2f(1.f, 0.f);
gGL.vertex2i(r.getWidth() - PREVIEW_HPAD, PREVIEW_HPAD + PREF_BUTTON_HEIGHT + PREVIEW_HPAD);
gGL.texCoord2f(1.f, 1.f);
gGL.vertex2i(r.getWidth() - PREVIEW_HPAD, PREVIEW_TEXTURE_HEIGHT);
gGL.vertex2i(r.getWidth() - PREVIEW_HPAD, PREVIEW_TEXTURE_HEIGHT + PREVIEW_VPAD);
}
gGL.end();
......
......@@ -63,8 +63,8 @@
const S32 PREVIEW_BORDER_WIDTH = 2;
const S32 PREVIEW_RESIZE_HANDLE_SIZE = S32(RESIZE_HANDLE_WIDTH * OO_SQRT2) + PREVIEW_BORDER_WIDTH;
const S32 PREVIEW_HPAD = PREVIEW_RESIZE_HANDLE_SIZE;
const S32 PREVIEW_VPAD = -24; // yuk, hard coded
const S32 PREF_BUTTON_HEIGHT = 16 + 7 + 16;
const S32 PREVIEW_VPAD = -24 + 35; // yuk, hard coded
const S32 PREF_BUTTON_HEIGHT = 16 + 7 + 16 + 35;
const S32 PREVIEW_TEXTURE_HEIGHT = 320;
//-----------------------------------------------------------------------------
......
......@@ -47,6 +47,7 @@
#include "lluictrlfactory.h"
#include "llstring.h"
#include "llpermissions.h"
#include "lltrans.h"
// linden includes
#include "llassetstorage.h"
......@@ -125,6 +126,12 @@ BOOL LLFloaterNameDesc::postBuild()
S32 expected_upload_cost = getExpectedUploadCost();
getChild<LLUICtrl>("ok_btn")->setLabelArg("[AMOUNT]", llformat("%d", expected_upload_cost));
LLTextBox* info_text = getChild<LLTextBox>("info_text");
if (info_text)
{
info_text->setValue(LLTrans::getString("UploadFeeInfo"));
}
setDefaultBtn("ok_btn");
......
......@@ -309,11 +309,11 @@ std::string LLResourceUploadInfo::getDisplayName() const
bool LLResourceUploadInfo::findAssetTypeOfExtension(const std::string& exten, LLAssetType::EType& asset_type)
{
U32 codec;
return findAssetTypeAndCodecOfExtension(exten, asset_type, codec);
return findAssetTypeAndCodecOfExtension(exten, asset_type, codec, false);
}
// static
bool LLResourceUploadInfo::findAssetTypeAndCodecOfExtension(const std::string& exten, LLAssetType::EType& asset_type, U32& codec)
bool LLResourceUploadInfo::findAssetTypeAndCodecOfExtension(const std::string& exten, LLAssetType::EType& asset_type, U32& codec, bool bulk_upload)
{
bool succ = false;
......@@ -333,6 +333,11 @@ bool LLResourceUploadInfo::findAssetTypeAndCodecOfExtension(const std::string& e
asset_type = LLAssetType::AT_ANIMATION;
succ = true;
}
else if (!bulk_upload && (exten == "bvh"))
{
asset_type = LLAssetType::AT_ANIMATION;
succ = true;
}
return succ;
}
......
......@@ -88,7 +88,7 @@ class LLResourceUploadInfo
LLAssetID getAssetId() const { return mAssetId; }
static bool findAssetTypeOfExtension(const std::string& exten, LLAssetType::EType& asset_type);
static bool findAssetTypeAndCodecOfExtension(const std::string& exten, LLAssetType::EType& asset_type, U32& codec);
static bool findAssetTypeAndCodecOfExtension(const std::string& exten, LLAssetType::EType& asset_type, U32& codec, bool bulk_upload = true);
protected:
LLResourceUploadInfo(
......
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<floater
legacy_header_height="18"
height="190"
height="180"
layout="topleft"
name="Anim Preview"
help_topic="animation_anim_preview"
......@@ -60,9 +60,9 @@
height="22"
label="Upload (L$[AMOUNT])"
layout="topleft"
left="45"
left="35"
name="ok_btn"
top_pad="60"
top_pad="15"
width="150" />
<button
follows="right|bottom"
......@@ -73,4 +73,17 @@
name="cancel_btn"
left_pad="5"
width="90" />
<text
type="string"
length="1"
follows="left|top"
height="35"
layout="topleft"
left="10"
mouse_opaque="false"
skip_link_underline="true"
name="info_text"
word_wrap="true"
top_pad="10"
width="270"/>
</floater>
......@@ -2,7 +2,7 @@
<floater
legacy_header_height="18"
can_minimize="false"
height="610"
height="645"
layout="topleft"
name="Animation Preview"
help_topic="animation_preview"
......@@ -570,4 +570,17 @@ We recommend BVH files exported from Poser 4.
name="cancel_btn"
left="142"
width="128" />
<text
type="string"
length="1"
follows="left|top"
height="35"
layout="topleft"
left="10"
mouse_opaque="false"
skip_link_underline="true"
name="info_text"
word_wrap="true"
top_pad="10"
width="270"/>
</floater>
......@@ -2,7 +2,7 @@
<floater
legacy_header_height="18"
can_minimize="false"
height="460"
height="495"
layout="topleft"
name="Image Preview"
help_topic="image_preview"
......@@ -148,4 +148,17 @@ Try saving image as 24 bit Targa (.tga).
name="ok_btn"
top_delta="0"
width="125" />
<text
type="string"
length="1"
follows="left|top"
height="35"
layout="topleft"
left="10"
mouse_opaque="false"
skip_link_underline="true"
name="info_text"
word_wrap="true"
top_pad="10"
width="270"/>
</floater>
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<floater
legacy_header_height="18"
height="190"
height="180"
layout="topleft"
name="Sound Preview"
help_topic="sound_preview"
......@@ -60,9 +60,9 @@
height="22"
label="Upload (L$[AMOUNT])"
layout="topleft"
left="45"
left="35"
name="ok_btn"
top_pad="60"
top_pad="15"
width="150" />
<button
follows="right|bottom"
......@@ -73,4 +73,17 @@
name="cancel_btn"
left_pad="5"
width="90" />
<text
type="string"
length="1"
follows="left|top"
height="35"
layout="topleft"
left="10"
mouse_opaque="false"
skip_link_underline="true"
name="info_text"
word_wrap="true"
top_pad="10"
width="270"/>
</floater>
......@@ -2365,6 +2365,8 @@ If you continue to receive this message, please contact Second Life support for
<string name="MarketplaceNoStock">out of stock</string>
<string name="MarketplaceUpdating">updating...</string>
<string name="UploadFeeInfo">Fee is based on your subscription level. Higher levels are charged lower fees. [https://secondlife.com/my/account/membership.php? Learn more]</string>
<string name="Open landmarks">Open landmarks</string>
<string name="Unconstrained">Unconstrained</string>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment