Merge remote-tracking branch 'Liru/master'

This commit is contained in:
Damian Zhaoying
2013-08-09 10:17:00 -03:00
16 changed files with 71 additions and 43 deletions

View File

@@ -42,6 +42,7 @@
#include "lltextbox.h"
#include "lltooldraganddrop.h"
#include "lltrans.h"
#include "llviewborder.h"
static LLRegisterWidget<LLDropTarget> r("drop_target");
@@ -63,16 +64,23 @@ LLDropTarget::LLDropTarget(const LLDropTarget::Params& p)
setControlName(p.control_name, NULL);
mText->setOrigin(0, 0);
mText->setFollows(FOLLOWS_NONE);
mText->setMouseOpaque(false);
mText->setHAlign(LLFontGL::HCENTER);
mText->setBorderVisible(true);
mText->setBorderColor(LLUI::sColorsGroup->getColor("DefaultHighlightLight"));
mText->setVPad(1);
mBorder = new LLViewBorder("drop_border", p.rect, LLViewBorder::BEVEL_IN);
addChild(mBorder);
mBorder->setMouseOpaque(false);
if (p.fill_parent) fillParent(getParent());
if (!p.border_visible) mBorder->setBorderWidth(0);
}
LLDropTarget::~LLDropTarget()
{
delete mText;
delete mBorder;
}
// static
@@ -89,7 +97,9 @@ void LLDropTarget::initFromXML(LLXMLNodePtr node, LLView* parent)
LLView::initFromXML(node, parent);
const LLRect& rect = getRect();
mText->setRect(LLRect(0, rect.getHeight(), rect.getWidth(), 0));
const LLRect child_rect(0, rect.getHeight(), rect.getWidth(), 0);
mText->setRect(child_rect);
mBorder->setRect(child_rect);
if (node->hasAttribute("name")) // Views can't have names, but drop targets can
{
@@ -111,6 +121,13 @@ void LLDropTarget::initFromXML(LLXMLNodePtr node, LLView* parent)
node->getAttribute_bool("fill_parent", fill);
if (fill) fillParent(parent);
}
if (node->hasAttribute("border_visible"))
{
bool border_visible;
node->getAttribute_bool("border_visible", border_visible);
if (!border_visible) mBorder->setBorderWidth(0);
}
}
// virtual
@@ -154,7 +171,9 @@ void LLDropTarget::fillParent(const LLView* parent)
}
// The following block enlarges the target, but maintains the desired size for the text and border
mText->setRect(getRect()); // mText takes over the old rectangle, since the position will now be relative to the parent's rectangle for the text.
const LLRect& rect = getRect(); // Children maintain the old rectangle
mText->setRect(rect);
mBorder->setRect(rect);
const LLRect& parent_rect = parent->getRect();
setRect(LLRect(0, parent_rect.getHeight(), parent_rect.getWidth(), 0));
}

View File

@@ -44,11 +44,13 @@ class LLDropTarget : public LLView
public:
struct Params : public LLInitParam::Block<Params, LLView::Params>
{
Optional<bool> border_visible; // Whether or not to display the border
Optional<std::string> control_name; // Control to change on item drop (Per Account only)
Optional<std::string> label; // Label for the LLTextBox, used when label doesn't dynamically change on drop
Optional<bool> fill_parent; // Whether or not to fill the direct parent, to have a larger drop target. If true, the next sibling must explicitly define its rect without deltas.
Params()
: control_name("control_name", "")
: border_visible("border_visible", true)
, control_name("control_name", "")
, label("label", "")
, fill_parent("fill_parent", false)
{
@@ -74,6 +76,7 @@ public:
protected:
LLUUID mEntityID;
private:
class LLViewBorder* mBorder;
LLControlVariable* mControl;
class LLTextBox* mText;
};

View File

@@ -758,7 +758,7 @@ void LLFloaterWorldMap::updateTeleportCoordsDisplay( const LLVector3d& pos )
// convert global specified position to a local one
F32 region_local_x = (F32)fmod( pos.mdV[VX], (F64)REGION_WIDTH_METERS );
F32 region_local_y = (F32)fmod( pos.mdV[VY], (F64)REGION_WIDTH_METERS );
F32 region_local_z = (F32)llclamp( pos.mdV[VZ], 0.0, (F64)REGION_HEIGHT_METERS );
F32 region_local_z = (F32)llclamp( pos.mdV[VZ], 0.0, 8192.0/*(F64)REGION_HEIGHT_METERS*/ );
// write in the values
childSetValue("spin x", region_local_x );
@@ -868,7 +868,7 @@ void LLFloaterWorldMap::updateLocation()
void LLFloaterWorldMap::trackURL(const std::string& region_name, S32 x_coord, S32 y_coord, S32 z_coord)
{
LLSimInfo* sim_info = LLWorldMap::getInstance()->simInfoFromName(region_name);
z_coord = llclamp(z_coord, 0, 4096);
z_coord = llclamp(z_coord, 0, 8192/*4096*/);
if (sim_info)
{
LLVector3 local_pos;

View File

@@ -62,6 +62,7 @@
#include "llui.h"
#include "pipeline.h"
#include "hippogridmanager.h"
#include "hippolimits.h"
// [RLVa:KB]
#include "rlvhandler.h"
@@ -743,9 +744,9 @@ BOOL LLManipTranslate::handleHover(S32 x, S32 y, MASK mask)
}
// For safety, cap heights where objects can be dragged
if (new_position_global.mdV[VZ] > MAX_OBJECT_Z)
if (new_position_global.mdV[VZ] > gHippoLimits->getMaxHeight())
{
new_position_global.mdV[VZ] = MAX_OBJECT_Z;
new_position_global.mdV[VZ] = gHippoLimits->getMaxHeight();
}
// Grass is always drawn on the ground, so clamp its position to the ground

View File

@@ -560,9 +560,9 @@ BOOL LLPanelAvatarWeb::postBuild(void)
url_edit->setKeystrokeCallback(boost::bind(&LLPanelAvatarWeb::onURLKeystroke,this,_1));
url_edit->setCommitCallback(boost::bind(&LLPanelAvatarWeb::onCommitURL,this,_2));
childSetAction("web_profile_help",onClickWebProfileHelp,this);
getChild<LLUICtrl>("load")->setCommitCallback(boost::bind(&LLPanelAvatarWeb::onCommitLoad, this, _2));
childSetControlName("auto_load","AutoLoadWebProfiles");
childSetAction("web_profile_help",onClickWebProfileHelp,this);
mWebBrowser = getChild<LLMediaCtrl>("profile_html");
mWebBrowser->addObserver(this);

View File

@@ -552,6 +552,7 @@ void LLPanelObject::getState( )
mBtnCopySize->setEnabled( enable_scale );
mBtnPasteSize->setEnabled( enable_scale );
mBtnPasteSizeClip->setEnabled( enable_scale );
mCtrlPosZ->setMaxValue(gHippoLimits->getMaxHeight());
mCtrlScaleX->setMaxValue(gHippoLimits->getMaxPrimScale());
mCtrlScaleY->setMaxValue(gHippoLimits->getMaxPrimScale());
mCtrlScaleZ->setMaxValue(gHippoLimits->getMaxPrimScale());
@@ -2483,6 +2484,7 @@ namespace
bool texturePermsCheck(const LLUUID& id)
{
return (id.notNull() && !gInventory.isObjectDescendentOf(id, gInventory.getLibraryRootFolderID())
&& id != LLUUID(gSavedSettings.getString("DefaultObjectTexture"))
&& id != LLUUID(gSavedSettings.getString("UIImgWhiteUUID"))
&& id != LLUUID(gSavedSettings.getString("UIImgInvisibleUUID"))
&& id != LLUUID(std::string("8dcd4a48-2d37-4909-9f78-f7a9eb4ef903")) // alpha
@@ -2569,7 +2571,7 @@ void LLPanelObject::onPastePos(void* user_data)
float region_width = LLWorld::getInstance()->getRegionWidthInMeters();
mClipboardPos.mV[VX] = llclamp( mClipboardPos.mV[VX], -3.5f, region_width);
mClipboardPos.mV[VY] = llclamp( mClipboardPos.mV[VY], -3.5f, region_width);
mClipboardPos.mV[VZ] = llclamp( mClipboardPos.mV[VZ], -3.5f, 4096.f);
mClipboardPos.mV[VZ] = llclamp( mClipboardPos.mV[VZ], -3.5f, gHippoLimits->getMaxHeight());
self->mCtrlPosX->set( mClipboardPos.mV[VX] );
self->mCtrlPosY->set( mClipboardPos.mV[VY] );
@@ -2646,9 +2648,10 @@ void LLPanelObject::onPastePosClip(void* user_data)
std::string stringVec = wstring_to_utf8str(temp_string);
if(!getvectorfromclip(stringVec, &mClipboardPos)) return;
mClipboardPos.mV[VX] = llclamp(mClipboardPos.mV[VX], -3.5f, 256.f);
mClipboardPos.mV[VY] = llclamp(mClipboardPos.mV[VY], -3.5f, 256.f);
mClipboardPos.mV[VZ] = llclamp(mClipboardPos.mV[VZ], -3.5f, 4096.f);
float region_width = LLWorld::getInstance()->getRegionWidthInMeters();
mClipboardPos.mV[VX] = llclamp(mClipboardPos.mV[VX], -3.5f, region_width);
mClipboardPos.mV[VY] = llclamp(mClipboardPos.mV[VY], -3.5f, region_width);
mClipboardPos.mV[VZ] = llclamp(mClipboardPos.mV[VZ], -3.5f, gHippoLimits->getMaxHeight());
self->mCtrlPosX->set( mClipboardPos.mV[VX] );
self->mCtrlPosY->set( mClipboardPos.mV[VY] );

View File

@@ -316,7 +316,7 @@ LLSLURL::LLSLURL(const std::string& slurl)
(F32(mPosition[VY]) < 0.f) ||
(mPosition[VY] > REGION_WIDTH_METERS) ||
(F32(mPosition[VZ]) < 0.f) ||
(mPosition[VZ] > REGION_HEIGHT_METERS))
(mPosition[VZ] > 8192.f/*REGION_HEIGHT_METERS*/))
{
mType = INVALID;
return;

View File

@@ -58,6 +58,8 @@
#include "llvoavatarself.h"
#include "llworld.h"
#include "hippolimits.h"
// [RLVa:KB]
#include "rlvhandler.h"
// [/RLVa:KB]
@@ -635,9 +637,9 @@ void LLToolGrab::handleHoverActive(S32 x, S32 y, MASK mask)
}
// For safety, cap heights where objects can be dragged
if (grab_point_global.mdV[VZ] > MAX_OBJECT_Z)
if (grab_point_global.mdV[VZ] > gHippoLimits->getMaxHeight())
{
grab_point_global.mdV[VZ] = MAX_OBJECT_Z;
grab_point_global.mdV[VZ] = gHippoLimits->getMaxHeight();
}
grab_point_global = LLWorld::getInstance()->clipToVisibleRegions(mDragStartPointGlobal, grab_point_global);

View File

@@ -10,7 +10,7 @@
width="610"
height="380">
<drop_target bottom="-78" height="15" left="14" width="176" control_name="AOConfigNotecardID" fill_parent="true" name="ao_notecard" tool_tip="Drop a ZHAO notecard here. Animations have to be in the same Inventory folder as the notecard."/>
<drop_target bottom="-80" height="17" left="12" width="180" control_name="AOConfigNotecardID" fill_parent="true" name="ao_notecard" tool_tip="Drop a ZHAO notecard here. Animations have to be in the same Inventory folder as the notecard."/>
<button
name="opencard"

View File

@@ -187,10 +187,10 @@
</line_editor>
<spinner bottom="-126" decimal_digits="3" follows="top|right" height="16"
increment="0.1" initial_val="1" left="308" max_val="4" min_val="0"
mouse_opaque="true" name="billable factor" width="80">
<spinner.commit_callback
function="RegionTools.ChangeAnything" />
</spinner>
mouse_opaque="true" name="billable factor" label_width="20" width="80">
<spinner.commit_callback
function="RegionTools.ChangeAnything" />
</spinner>
<text bg_visible="false" border_drop_shadow_visible="false" border_visible="false"
bottom="-126" drop_shadow_visible="true" follows="left|top"
font="SansSerif" h_pad="0" halign="left" height="16" left_delta="-108"
@@ -199,10 +199,10 @@
</text>
<spinner bottom="-146" decimal_digits="3" follows="top|right" height="16" increment="1"
initial_val="1" left="308" max_val="100" min_val="0" mouse_opaque="true"
name="land cost" width="80">
<spinner.commit_callback
function="RegionTools.ChangeAnything" />
</spinner>
name="land cost" label_width="20" width="80">
<spinner.commit_callback
function="RegionTools.ChangeAnything" />
</spinner>
<text bg_visible="false" border_drop_shadow_visible="false" border_visible="false"
bottom="-146" drop_shadow_visible="true" follows="left|top"
font="SansSerif" h_pad="0" halign="left" height="16" left_delta="-108"

View File

@@ -766,7 +766,7 @@
text_enabled_color="0, 100, 40, 255" width="87" />
<spinner bottom_delta="-18" decimal_digits="4" follows="left|top" height="16"
increment="0.01" initial_val="0" label="Z" label_width="10" left_delta="0"
max_val="4096" min_val="-3.5" mouse_opaque="true" name="Pos Z"
min_val="-3.5" mouse_opaque="true" name="Pos Z"
text_enabled_color="0, 67, 132, 255" width="87" />
<button bottom_delta="35" follows="top|right" font="SansSerifSmall" halign="center"
height="18" label="C" left_delta="90" mouse_opaque="true" name="copypos" enabled="true"

View File

@@ -158,21 +158,21 @@
<spinner bottom_delta="0" decimal_digits="0" follows="bottom|right" height="16"
increment="1" initial_val="128" left="1090" max_val="255" min_val="0"
mouse_opaque="true" name="spin x"
tool_tip="X coordinate of location to show on map" width="48" >
tool_tip="X coordinate of location to show on map" label_width="0" width="48" >
<spinner.commit_callback
function="WMap.Coordinates" />
</spinner>
<spinner bottom_delta="0" decimal_digits="0" follows="bottom|right" height="16"
increment="1" initial_val="128" left_delta="50" max_val="255" min_val="0"
mouse_opaque="true" name="spin y"
tool_tip="Y coordinate of location to show on map" width="48" >
tool_tip="Y coordinate of location to show on map" label_width="0" width="48" >
<spinner.commit_callback
function="WMap.Coordinates" />
</spinner>
<spinner bottom_delta="0" decimal_digits="0" follows="bottom|right" height="16"
increment="1" initial_val="0" left_delta="50" max_val="4096" min_val="0"
increment="1" initial_val="0" left_delta="50" max_val="8192" min_val="0"
mouse_opaque="true" name="spin z"
tool_tip="Z coordinate of location to show on map" width="48" >
tool_tip="Z coordinate of location to show on map" label_width="0" width="48" >
<spinner.commit_callback
function="WMap.Coordinates" />
</spinner>

View File

@@ -158,7 +158,7 @@
mouse_opaque="true" name="Give item:" v_pad="0" width="75">
Give item:
</text>
<drop_target bottom="-425" height="15" left_delta="81" width="318" fill_parent="true" name="drop_target_rect" label="Drop inventory item here." tool_tip="Drop inventory items here to give them to this person."/>
<drop_target bottom="-427" height="17" left_delta="79" width="321" fill_parent="true" name="drop_target_rect" label="Drop inventory item here." tool_tip="Drop inventory items here to give them to this person."/>
<check_box bottom="-447" follows="left|top" font="SansSerifSmall" height="16"
initial_value="false" label="Show in search" left="75" mouse_opaque="true"
name="allow_publish"
@@ -209,7 +209,7 @@
mouse_opaque="true" name="web_profile_help" width="18" />
<check_box bottom_delta="0" follows="right|top" font="SansSerifSmall" height="16"
initial_value="false" label="Automatically load web profiles"
left_delta="90" mouse_opaque="true" name="auto_load"
left_delta="90" mouse_opaque="true" name="auto_load" control_name="AutoLoadWebProfiles"
tool_tip="Automatically load ALL profile webpages without asking first."
width="127" />
<web_browser border_visible="false" bottom="-444" follows="top|left|right" height="400"

View File

@@ -107,7 +107,7 @@ and you can&apos;t send a folder.
name="drop_target2" width="76" />
<icon bottom_delta="7" height="64" image_name="icon_groupnoticeinventory.tga"
left_delta="5" mouse_opaque="true" name="drop_icon" width="64" />
<group_drop_target bottom="24" left="67" fill_parent="true" height="14" width="207" name="drop_target"
<group_drop_target bottom="24" left="67" fill_parent="true" height="14" width="207" name="drop_target" border_visible="false"
tool_tip="Drag an inventory item onto the message box to send it with the notice. You must have permission to copy and transfer the object to send it with the notice."/>
</panel>
<panel border="false" bottom="0" follows="all" height="268" label="View Past Notice"

View File

@@ -74,21 +74,21 @@ The following wildcards are available to enhance your autoresponses: #n for user
<check_box bottom_delta="0" left_delta="100" follows="left|top" control_name="AutoresponseAnyoneItem" name="AutoresponseAnyoneItem" label="Send item"/>
<check_box bottom_delta="0" left_delta="80" follows="left|top" control_name="AutoresponseAnyoneShow" name="AutoresponseAnyoneShow" label="Show that this was sent"/>
<text_editor bottom_delta="-47" left="8" font="SansSerifSmall" follows="left|top" height="45" max_length="1100" control_name="AutoresponseAnyoneMessage" name="AutoresponseAnyoneMessage" width="480" word_wrap="true" spell_check="true" hide_scrollbar="true"/>
<drop_target bottom_delta="-122" left="10" height="15" width="476" control_name="AutoresponseAnyoneItemID" name="AutoresponseAnyoneItemID" tool_tip="Drop an item here to have it sent with the above response."/>
<check_box bottom_delta="80" left="6" follows="left|top" control_name="AutoresponseNonFriends" name="AutoresponseNonFriends" label="Autorespond to nonfriends" tool_tip="Send the message in the box below to people who are not your friends"/>
<drop_target bottom_delta="-124" left="8" height="17" width="480" control_name="AutoresponseAnyoneItemID" name="AutoresponseAnyoneItemID" tool_tip="Drop an item here to have it sent with the above response."/>
<check_box bottom_delta="82" left="6" follows="left|top" control_name="AutoresponseNonFriends" name="AutoresponseNonFriends" label="Autorespond to nonfriends" tool_tip="Send the message in the box below to people who are not your friends"/>
<check_box bottom_delta="0" left_delta="250" follows="left|top" control_name="AutoresponseNonFriendsItem" name="AutoresponseNonFriendsItem" label="Send item"/>
<check_box bottom_delta="0" left_delta="80" follows="left|top" control_name="AutoresponseNonFriendsShow" name="AutoresponseNonFriendsShow" label="Show that this was sent"/>
<text_editor bottom_delta="-47" left="8" font="SansSerifSmall" follows="left|top" height="45" max_length="1100" control_name="AutoresponseNonFriendsMessage" name="AutoresponseNonFriendsMessage" width="480" word_wrap="true" spell_check="true" hide_scrollbar="true"/>
<drop_target bottom_delta="-122" left="10" height="15" width="476" control_name="AutoresponseNonFriendsItemID" name="AutoresponseNonFriendsItemID" tool_tip="Drop an item here to have it sent with the above response."/>
<check_box bottom_delta="80" left="6" follows="left|top" control_name="AutoresponseMuted" name="AutoresponseMuted" label="Autorespond to people you have muted" tool_tip="Send the message in the box below to people you have muted."/>
<drop_target bottom_delta="-124" left="8" height="17" width="480" control_name="AutoresponseNonFriendsItemID" name="AutoresponseNonFriendsItemID" tool_tip="Drop an item here to have it sent with the above response."/>
<check_box bottom_delta="82" left="6" follows="left|top" control_name="AutoresponseMuted" name="AutoresponseMuted" label="Autorespond to people you have muted" tool_tip="Send the message in the box below to people you have muted."/>
<check_box bottom_delta="0" left_delta="250" follows="left|top" control_name="AutoresponseMutedItem" name="AutoresponseMutedItem" label="Send item"/>
<text_editor bottom_delta="-47" left="8" font="SansSerifSmall" follows="left|top" height="45" max_length="1100" control_name="AutoresponseMutedMessage" name="AutoresponseMutedMessage" width="480" word_wrap="true" spell_check="true" hide_scrollbar="true"/>
<drop_target bottom_delta="-122" left="10" height="15" width="476" control_name="AutoresponseMutedItemID" name="AutoresponseMutedItemID" tool_tip="Drop an item here to have it sent with the above response."/>
<text bottom_delta="86" left="8" follows="left|top" name="BusyModeResponseText" tool_tip="Send the message in the box below to people who message when you are busy.">Busy Mode Response:</text>
<drop_target bottom_delta="-124" left="8" height="17" width="480" control_name="AutoresponseMutedItemID" name="AutoresponseMutedItemID" tool_tip="Drop an item here to have it sent with the above response."/>
<text bottom_delta="88" left="8" follows="left|top" name="BusyModeResponseText" tool_tip="Send the message in the box below to people who message when you are busy.">Busy Mode Response:</text>
<check_box bottom_delta="-5" left_delta="250" follows="left|top" control_name="BusyModeResponseItem" name="BusyModeResponseItem" label="Send item"/>
<check_box bottom_delta="0" left_delta="80" follows="left|top" control_name="BusyModeResponseShow" name="BusyModeResponseShow" label="Show that this was sent"/>
<text_editor bottom_delta="-47" left="8" font="SansSerifSmall" follows="left|top" height="45" max_length="1100" control_name="BusyModeResponse" name="BusyModeResponse" width="480" word_wrap="true" spell_check="true" hide_scrollbar="true"/>
<drop_target bottom_delta="-122" left="10" height="15" width="476" control_name="BusyModeResponseItemID" name="BusyModeResponseItemID" tool_tip="Drop an item here to have it sent with the above response."/>
<drop_target bottom_delta="-124" left="8" height="17" width="480" control_name="BusyModeResponseItemID" name="BusyModeResponseItemID" tool_tip="Drop an item here to have it sent with the above response."/>
</panel>
<panel border="true" left="1" bottom="-408" height="408" width="500" label="Spam" name="Spam">

View File

@@ -136,7 +136,7 @@
<combo_item name="High" value="High">High</combo_item>
</combo_box>
<check_box name="EmeraldBuildPrefsEmbedItem" left="5" bottom_delta="-20" follows="top" initial_value="false" label="Put an item into new objects" control_name="EmeraldBuildPrefs_EmbedItem"/>
<drop_target control_name="EmeraldBuildPrefs_Item" bottom_delta="-5" left="10" height="15" name="build_item_add_disp_rect" width="270"/>
<drop_target control_name="EmeraldBuildPrefs_Item" bottom_delta="-3" left="9" height="17" name="build_item_add_disp_rect" width="274"/>
<check_box bottom_delta="4" follows="top" left_delta="274" label="Highlight selected prims" name="EmBuildPrefsRenderHighlight_toggle" control_name="RenderHighlightSelections"/>
<check_box bottom_delta="-20" follows="top" initial_value="false" label="Axis arrow on root prim position" tool_tip="Default behaviour is to show the axis on the center of mass of a linkset. If enabled, the axis will be shown on the root prim of the linkset instead." name="EmBuildPrefsActualRoot_toggle" control_name="AscentBuildPrefs_ActualRoot"/>
</panel>