Commit 8f80020e authored by Cinder's avatar Cinder
Browse files

ALCH-161 - Make the Object Contents floater not disgusting

parent 234ccc50
......@@ -56,9 +56,6 @@ LLFloaterOpenObject::LLFloaterOpenObject(const LLSD& key)
mPanelInventoryObject(NULL),
mDirty(TRUE)
{
mCommitCallbackRegistrar.add("OpenObject.MoveToInventory", boost::bind(&LLFloaterOpenObject::onClickMoveToInventory, this));
mCommitCallbackRegistrar.add("OpenObject.MoveAndWear", boost::bind(&LLFloaterOpenObject::onClickMoveAndWear, this));
mCommitCallbackRegistrar.add("OpenObject.ReplaceOutfit", boost::bind(&LLFloaterOpenObject::onClickReplace, this));
mCommitCallbackRegistrar.add("OpenObject.Cancel", boost::bind(&LLFloaterOpenObject::onClickCancel, this));
}
......@@ -72,6 +69,7 @@ BOOL LLFloaterOpenObject::postBuild()
{
getChild<LLUICtrl>("object_name")->setTextArg("[DESC]", std::string("Object") ); // *Note: probably do not want to translate this
mPanelInventoryObject = getChild<LLPanelObjectInventory>("object_contents");
getChild<LLUICtrl>("copy_flyout")->setCommitCallback(boost::bind(&LLFloaterOpenObject::onClickCopy, this, _1));
refresh();
return TRUE;
......@@ -238,21 +236,15 @@ void LLFloaterOpenObject::callbackMoveInventory(S32 result, void* data)
delete cat;
}
void LLFloaterOpenObject::onClickMoveToInventory()
void LLFloaterOpenObject::onClickCopy(LLUICtrl* ctrl)
{
moveToInventory(false);
closeFloater();
}
void LLFloaterOpenObject::onClickMoveAndWear()
{
moveToInventory(true, false);
closeFloater();
}
void LLFloaterOpenObject::onClickReplace()
{
moveToInventory(true, true);
const std::string& action = ctrl->getValue().asString();
if (action == "replace")
moveToInventory(true, true);
else if (action == "add")
moveToInventory(true, false);
else
moveToInventory(false);
closeFloater();
}
......
......@@ -62,9 +62,7 @@ protected:
void moveToInventory(bool wear, bool replace = false);
void onClickMoveToInventory();
void onClickMoveAndWear();
void onClickReplace();
void onClickCopy(LLUICtrl* ctrl);
void onClickCancel();
static void callbackCreateInventoryCategory(const LLUUID& category_id, LLUUID object_id, bool wear, bool replace = false);
static void callbackMoveInventory(S32 result, void* data);
......
......@@ -3,9 +3,9 @@
legacy_header_height="18"
can_resize="true"
default_tab_group="1"
height="370"
height="322"
layout="topleft"
min_height="190"
min_height="160"
min_width="285"
name="objectcontents"
help_topic="objectcontents"
......@@ -31,80 +31,40 @@
background_visible="false"
draw_border="false"
follows="all"
height="240"
height="250"
layout="topleft"
left="10"
name="object_contents"
top_pad="0"
width="284" />
<view_border
bevel_style="none"
follows="bottom|left"
height="50"
highlight_light_color="0.6 0.6 0.6"
<flyout_button
follows="left|right|bottom"
height="23"
label="Copy To Inventory"
layout="topleft"
left="10"
name="border"
name="copy_flyout"
top_pad="5"
width="270"/>
<text
follows="bottom|left"
height="15"
layout="topleft"
left="15"
name="border_note"
text_color="White"
top_delta="5">
Copy to inventory and wear
</text>
<button
follows="bottom|left"
height="23"
label="Add to outfit"
label_selected="Add to outfit"
layout="topleft"
left="15"
name="copy_and_wear_button"
top_pad="3"
width="135">
<button.commit_callback
function="OpenObject.MoveAndWear" />
</button>
<button
follows="bottom|left"
height="23"
label="Replace outfit"
label_selected="Replace outfit"
layout="topleft"
left_pad="5"
name="copy_and_replace_button"
width="120">
<button.commit_callback
function="OpenObject.ReplaceOutfit" />
</button>
<button
follows="bottom|left"
height="23"
label="Only copy to inventory"
label_selected="Only copy to inventory"
layout="topleft"
left="15"
name="copy_to_inventory_button"
tab_group="1"
top_pad="9"
width="135">
<button.commit_callback
function="OpenObject.MoveToInventory" />
</button>
width="153">
<flyout_button.item
label="Replace outfit with contents"
name="replace"
value="replace" />
<flyout_button.item
label="Add contents to outfit"
name="add"
value="add" />
</flyout_button>
<button
follows="bottom|left"
follows="bottom|right"
height="23"
label="Cancel"
label_selected="Cancel"
layout="topleft"
left_pad="5"
name="cancel_button"
width="120">
width="125">
<button.commit_callback
function="OpenObject.Cancel" />
</button>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment