From f1a6e776b41f15ffc0ed4cf245136143bcd1a852 Mon Sep 17 00:00:00 2001 From: Mnikolenko Productengine Date: Mon, 25 Nov 2019 22:52:07 +0200 Subject: SL-12097, SL-12098, SL-12099 UI update for Texture, Animation and Sound upload fees --- indra/newview/llfloaterbvhpreview.cpp | 9 +++++---- indra/newview/llfloaterimagepreview.cpp | 4 ++-- indra/newview/llfloaternamedesc.cpp | 7 +++++++ indra/newview/llviewerassetupload.cpp | 9 +++++++-- indra/newview/llviewerassetupload.h | 2 +- .../default/xui/en/floater_animation_anim_preview.xml | 19 ++++++++++++++++--- .../default/xui/en/floater_animation_bvh_preview.xml | 15 ++++++++++++++- .../skins/default/xui/en/floater_image_preview.xml | 15 ++++++++++++++- .../skins/default/xui/en/floater_sound_preview.xml | 19 ++++++++++++++++--- indra/newview/skins/default/xui/en/strings.xml | 2 ++ 10 files changed, 84 insertions(+), 17 deletions(-) (limited to 'indra') diff --git a/indra/newview/llfloaterbvhpreview.cpp b/indra/newview/llfloaterbvhpreview.cpp index 1f54b5f838..131d9b077b 100644 --- a/indra/newview/llfloaterbvhpreview.cpp +++ b/indra/newview/llfloaterbvhpreview.cpp @@ -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(); diff --git a/indra/newview/llfloaterimagepreview.cpp b/indra/newview/llfloaterimagepreview.cpp index d4b0fa85ab..696f748613 100644 --- a/indra/newview/llfloaterimagepreview.cpp +++ b/indra/newview/llfloaterimagepreview.cpp @@ -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; //----------------------------------------------------------------------------- diff --git a/indra/newview/llfloaternamedesc.cpp b/indra/newview/llfloaternamedesc.cpp index 89e93102dd..87a741bb7b 100644 --- a/indra/newview/llfloaternamedesc.cpp +++ b/indra/newview/llfloaternamedesc.cpp @@ -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("ok_btn")->setLabelArg("[AMOUNT]", llformat("%d", expected_upload_cost)); + + LLTextBox* info_text = getChild("info_text"); + if (info_text) + { + info_text->setValue(LLTrans::getString("UploadFeeInfo")); + } setDefaultBtn("ok_btn"); diff --git a/indra/newview/llviewerassetupload.cpp b/indra/newview/llviewerassetupload.cpp index 4cbb88d4f1..51c8f4ab79 100644 --- a/indra/newview/llviewerassetupload.cpp +++ b/indra/newview/llviewerassetupload.cpp @@ -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; } diff --git a/indra/newview/llviewerassetupload.h b/indra/newview/llviewerassetupload.h index 6301359021..08b03e3059 100644 --- a/indra/newview/llviewerassetupload.h +++ b/indra/newview/llviewerassetupload.h @@ -88,7 +88,7 @@ public: 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( diff --git a/indra/newview/skins/default/xui/en/floater_animation_anim_preview.xml b/indra/newview/skins/default/xui/en/floater_animation_anim_preview.xml index b5538a511c..c4ffba33fd 100644 --- a/indra/newview/skins/default/xui/en/floater_animation_anim_preview.xml +++ b/indra/newview/skins/default/xui/en/floater_animation_anim_preview.xml @@ -1,7 +1,7 @@