diff options
author | Andrey Kleshchev <andreykproductengine@lindenlab.com> | 2023-02-15 02:19:49 +0200 |
---|---|---|
committer | Andrey Kleshchev <andreykproductengine@lindenlab.com> | 2023-02-17 23:09:51 +0200 |
commit | ec02220f068c7e7ec61e8c8af7a3c4c96c112172 (patch) | |
tree | 7c0b3acb78b5253ea76990490fc1247415dccc1e /indra/newview | |
parent | 734b1b5d421254c45b3eb0fe0a5bbc8159e489fc (diff) |
SL-19108 WIP Managing inventory thumbnail #1
Diffstat (limited to 'indra/newview')
-rw-r--r-- | indra/newview/CMakeLists.txt | 2 | ||||
-rw-r--r-- | indra/newview/llfloaterchangeitemthumbnail.cpp | 41 | ||||
-rw-r--r-- | indra/newview/llfloaterchangeitemthumbnail.h | 38 | ||||
-rw-r--r-- | indra/newview/llinventorybridge.cpp | 6 | ||||
-rw-r--r-- | indra/newview/llviewerfloaterreg.cpp | 2 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/floater_change_item_thumbnail.xml | 118 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/menu_inventory.xml | 8 |
7 files changed, 215 insertions, 0 deletions
diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index 402cc70a64..da9c9c5320 100644 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -233,6 +233,7 @@ set(viewer_SOURCE_FILES llfloaterbuyland.cpp llfloatercamera.cpp llfloatercamerapresets.cpp + llfloaterchangeitemthumbnail.cpp llfloaterchatvoicevolume.cpp llfloaterclassified.cpp llfloatercolorpicker.cpp @@ -872,6 +873,7 @@ set(viewer_HEADER_FILES llfloaterbuycurrencyhtml.h llfloaterbuyland.h llfloatercamerapresets.h + llfloaterchangeitemthumbnail.h llfloatercamera.h llfloaterchatvoicevolume.h llfloaterclassified.h diff --git a/indra/newview/llfloaterchangeitemthumbnail.cpp b/indra/newview/llfloaterchangeitemthumbnail.cpp new file mode 100644 index 0000000000..7590fc35d1 --- /dev/null +++ b/indra/newview/llfloaterchangeitemthumbnail.cpp @@ -0,0 +1,41 @@ +/** + * @file llfloaterchangeitemthumbnail.cpp + * @brief LLFloaterChangeItemThumbnail class implementation + * + * $LicenseInfo:firstyear=2023&license=viewerlgpl$ + * Second Life Viewer Source Code + * Copyright (C) 2023, 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 "llfloaterchangeitemthumbnail.h" + +#include "lllineeditor.h" + + +LLFloaterChangeItemThumbnail::LLFloaterChangeItemThumbnail(const LLSD& key) + : LLPreview(key) +{ +} + +LLFloaterChangeItemThumbnail::~LLFloaterChangeItemThumbnail() +{ +} diff --git a/indra/newview/llfloaterchangeitemthumbnail.h b/indra/newview/llfloaterchangeitemthumbnail.h new file mode 100644 index 0000000000..94792f07b6 --- /dev/null +++ b/indra/newview/llfloaterchangeitemthumbnail.h @@ -0,0 +1,38 @@ +/** + * @file llfloaterchangeitemthumbnail.h + * @brief LLFloaterChangeItemThumbnail class definition + * + * $LicenseInfo:firstyear=2023&license=viewerlgpl$ + * Second Life Viewer Source Code + * Copyright (C) 2023, 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$ + */ + +#ifndef LL_LLFLOATERCHANGEITEMTHUMBNAIL_H +#define LL_LLFLOATERCHANGEITEMTHUMBNAIL_H + +#include "llfloater.h" + +class LLFloaterChangeItemThumbnail : public LLFloater +{ +public: + LLFloaterChangeItemThumbnail(const LLSD& key); + ~LLFloaterChangeItemThumbnail(); +}; +#endif // LL_LLFLOATERCHANGEITEMTHUMBNAIL_H diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index 31801c0aa0..1b36c718f5 100644 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -1719,6 +1719,12 @@ void LLItemBridge::performAction(LLInventoryModel* model, std::string action) restoreItem(); return; } + else if ("thumbnail" == action) + { + LLSD data(mUUID); + LLFloaterReg::showInstance("change_item_thumbnail", data); + return; + } else if ("copy_uuid" == action) { // Single item only diff --git a/indra/newview/llviewerfloaterreg.cpp b/indra/newview/llviewerfloaterreg.cpp index 6b854065a6..06fba187bb 100644 --- a/indra/newview/llviewerfloaterreg.cpp +++ b/indra/newview/llviewerfloaterreg.cpp @@ -56,6 +56,7 @@ #include "llfloaterbvhpreview.h" #include "llfloatercamera.h" #include "llfloatercamerapresets.h" +#include "llfloaterchangeitemthumbnail.h" #include "llfloaterchatvoicevolume.h" #include "llfloaterclassified.h" #include "llfloaterconversationlog.h" @@ -327,6 +328,7 @@ void LLViewerFloaterReg::registerFloaters() LLFloaterReg::add("camera", "floater_camera.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterCamera>); LLFloaterReg::add("camera_presets", "floater_camera_presets.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterCameraPresets>); LLFloaterReg::add("chat_voice", "floater_voice_chat_volume.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterChatVoiceVolume>); + LLFloaterReg::add("change_item_thumbnail", "floater_change_item_thumbnail.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterChangeItemThumbnail>); LLFloaterReg::add("nearby_chat", "floater_im_session.xml", (LLFloaterBuildFunc)&LLFloaterIMNearbyChat::buildFloater); LLFloaterReg::add("classified", "floater_classified.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterClassified>); LLFloaterReg::add("compile_queue", "floater_script_queue.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterCompileQueue>); diff --git a/indra/newview/skins/default/xui/en/floater_change_item_thumbnail.xml b/indra/newview/skins/default/xui/en/floater_change_item_thumbnail.xml new file mode 100644 index 0000000000..c2c4c07ca1 --- /dev/null +++ b/indra/newview/skins/default/xui/en/floater_change_item_thumbnail.xml @@ -0,0 +1,118 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes" ?> +<floater + can_resize="false" + height="366" + layout="topleft" + name="change_item_thumbnail" + help_topic="change_item_thumbnail" + title="CHANGE ITEM IMAGE" + width="320"> + <icon + follows="top|left" + height="16" + image_name="Inv_Object" + layout="topleft" + left="5" + mouse_opaque="true" + name="item_type_icon" + top="5" + width="16" /> + <line_editor + border_style="line" + border_thickness="1" + follows="left|top|right" + font="SansSerif" + height="19" + layout="topleft" + top_delta="-2" + left_pad="5" + max_length_bytes="127" + name="item_name" + width="286" /> + + <thumbnail + name="item_thumbnail" + follows="top|left" + layout="topleft" + left="31" + top_pad="9" + height="256" + width="256" + /> + + <button + follows="right|bottom" + height="32" + label="A" + layout="topleft" + left="37" + name="upload_local" + top_pad="9" + width="32" /> + + <button + follows="right|bottom" + height="32" + label="B" + layout="topleft" + left_pad="10" + name="upload_snapshot" + top_delta="0" + width="32" /> + + <button + follows="right|bottom" + height="32" + label="C" + layout="topleft" + left_pad="10" + name="use_texture" + top_delta="0" + width="32" /> + + <button + follows="right|bottom" + height="32" + label="D" + layout="topleft" + left_pad="10" + name="to_clipboard" + top_delta="0" + width="32" /> + + <button + follows="right|bottom" + height="32" + label="E" + layout="topleft" + left_pad="10" + name="from_clipboard" + top_delta="0" + width="32" /> + + <button + follows="right|bottom" + height="32" + label="F" + layout="topleft" + left_pad="10" + name="remove" + top_delta="0" + width="32" /> + + <text + type="string" + halign="center" + length="1" + follows="left|top" + height="17" + layout="topleft" + left="5" + right="-5" + name="LabelOwnerTitle" + top_pad="12" + width="78"> + tooltip + </text> + +</floater> diff --git a/indra/newview/skins/default/xui/en/menu_inventory.xml b/indra/newview/skins/default/xui/en/menu_inventory.xml index 5fe53526c7..97a93245ff 100644 --- a/indra/newview/skins/default/xui/en/menu_inventory.xml +++ b/indra/newview/skins/default/xui/en/menu_inventory.xml @@ -619,6 +619,14 @@ parameter="rename" /> </menu_item_call> <menu_item_call + label="Image..." + layout="topleft" + name="thumbnail"> + <menu_item_call.on_click + function="Inventory.DoToSelected" + parameter="thumbnail" /> + </menu_item_call> + <menu_item_call label="Copy Asset UUID" layout="topleft" name="Copy Asset UUID"> |