SL-19108 WIP Managing inventory thumbnail #1
parent
734b1b5d42
commit
ec02220f06
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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()
|
||||
{
|
||||
}
|
||||
|
|
@ -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
|
||||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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>);
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
|
|
@ -618,6 +618,14 @@
|
|||
function="Inventory.DoToSelected"
|
||||
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"
|
||||
|
|
|
|||
Loading…
Reference in New Issue