merge changes for vmrg-230
commit
0a87371567
|
|
@ -103,6 +103,7 @@ Aleric Inglewood
|
|||
STORM-163
|
||||
STORM-955
|
||||
STORM-960
|
||||
STORM-1793
|
||||
Ales Beaumont
|
||||
VWR-9352
|
||||
SNOW-240
|
||||
|
|
@ -598,6 +599,7 @@ Jonathan Yap
|
|||
STORM-1685
|
||||
STORM-1718
|
||||
STORM-1721
|
||||
STORM-1718
|
||||
STORM-1727
|
||||
STORM-1725
|
||||
STORM-1719
|
||||
|
|
@ -612,11 +614,17 @@ Jonathan Yap
|
|||
STORM-1733
|
||||
STORM-1741
|
||||
STORM-1790
|
||||
STORM-1795
|
||||
STORM-1788
|
||||
STORM-1803
|
||||
STORM-1795
|
||||
STORM-1799
|
||||
STORM-1796
|
||||
STORM-1807
|
||||
STORM-1808
|
||||
STORM-1809
|
||||
STORM-1793
|
||||
STORM-1810
|
||||
Kadah Coba
|
||||
STORM-1060
|
||||
Jondan Lundquist
|
||||
|
|
@ -1247,6 +1255,8 @@ WolfPup Lowenhar
|
|||
VWR-20741
|
||||
VWR-20933
|
||||
Wundur Primbee
|
||||
Xellessanova Zenith
|
||||
STORM-1793
|
||||
Xiki Luik
|
||||
xstorm Radek
|
||||
YongYong Francois
|
||||
|
|
|
|||
|
|
@ -37,6 +37,8 @@
|
|||
tooltip_ref="Command_Build_Tooltip"
|
||||
execute_function="Build.Toggle"
|
||||
execute_parameters="build"
|
||||
is_enabled_function="Build.Enabled"
|
||||
is_enabled_parameters="build"
|
||||
is_running_function="Floater.IsOpen"
|
||||
is_running_parameters="build"
|
||||
/>
|
||||
|
|
|
|||
|
|
@ -169,11 +169,7 @@ bool LLAgent::isActionAllowed(const LLSD& sdname)
|
|||
|
||||
const std::string& param = sdname.asString();
|
||||
|
||||
if (param == "build")
|
||||
{
|
||||
retval = gAgent.canEditParcel();
|
||||
}
|
||||
else if (param == "speak")
|
||||
if (param == "speak")
|
||||
{
|
||||
if ( gAgent.isVoiceConnected() &&
|
||||
LLViewerParcelMgr::getInstance()->allowAgentVoice() &&
|
||||
|
|
|
|||
|
|
@ -106,7 +106,11 @@ void LLFloaterScriptDebug::addScriptLine(const std::string &utf8mesg, const std:
|
|||
if (objectp)
|
||||
{
|
||||
objectp->setIcon(LLViewerTextureManager::getFetchedTextureFromFile("script_error.j2c", TRUE, LLViewerTexture::BOOST_UI));
|
||||
floater_label = llformat("%s(%.2f, %.2f)", user_name.c_str(), objectp->getPositionRegion().mV[VX], objectp->getPositionRegion().mV[VY]);
|
||||
floater_label = llformat("%s(%.0f, %.0f, %.0f)",
|
||||
user_name.c_str(),
|
||||
objectp->getPositionRegion().mV[VX],
|
||||
objectp->getPositionRegion().mV[VY],
|
||||
objectp->getPositionRegion().mV[VZ]);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
|||
|
|
@ -4633,14 +4633,14 @@ void LLAnimationBridge::performAction(LLInventoryModel* model, std::string actio
|
|||
{
|
||||
if (getItem())
|
||||
{
|
||||
LLPreviewAnim::e_activation_type activate = LLPreviewAnim::NONE;
|
||||
if ("playworld" == action) activate = LLPreviewAnim::PLAY;
|
||||
if ("playlocal" == action) activate = LLPreviewAnim::AUDITION;
|
||||
LLSD::String activate = "NONE";
|
||||
if ("playworld" == action) activate = "Inworld";
|
||||
if ("playlocal" == action) activate = "Locally";
|
||||
|
||||
LLPreviewAnim* preview = LLFloaterReg::showTypedInstance<LLPreviewAnim>("preview_anim", LLSD(mUUID));
|
||||
if (preview)
|
||||
{
|
||||
preview->activate(activate);
|
||||
preview->play(activate);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -74,6 +74,8 @@ const F32 DOT_SCALE = 0.75f;
|
|||
const F32 MIN_PICK_SCALE = 2.f;
|
||||
const S32 MOUSE_DRAG_SLOP = 2; // How far the mouse needs to move before we think it's a drag
|
||||
|
||||
const F64 COARSEUPDATE_MAX_Z = 1020.0f;
|
||||
|
||||
LLNetMap::LLNetMap (const Params & p)
|
||||
: LLUICtrl (p),
|
||||
mBackgroundColor (p.bg_color()),
|
||||
|
|
@ -300,7 +302,8 @@ void LLNetMap::draw()
|
|||
}
|
||||
|
||||
LLVector3 map_center_agent = gAgent.getPosAgentFromGlobal(mObjectImageCenterGlobal);
|
||||
map_center_agent -= gAgentCamera.getCameraPositionAgent();
|
||||
LLVector3 camera_position = gAgentCamera.getCameraPositionAgent();
|
||||
map_center_agent -= camera_position;
|
||||
map_center_agent.mV[VX] *= mScale/region_width;
|
||||
map_center_agent.mV[VY] *= mScale/region_width;
|
||||
|
||||
|
|
@ -321,9 +324,6 @@ void LLNetMap::draw()
|
|||
|
||||
gGL.popMatrix();
|
||||
|
||||
LLVector3d pos_global;
|
||||
LLVector3 pos_map;
|
||||
|
||||
// Mouse pointer in local coordinates
|
||||
S32 local_mouse_x;
|
||||
S32 local_mouse_y;
|
||||
|
|
@ -333,91 +333,68 @@ void LLNetMap::draw()
|
|||
F32 closest_dist_squared = F32_MAX; // value will be overridden in the loop
|
||||
F32 min_pick_dist_squared = (mDotRadius * MIN_PICK_SCALE) * (mDotRadius * MIN_PICK_SCALE);
|
||||
|
||||
LLVector3 pos_map;
|
||||
uuid_vec_t avatar_ids;
|
||||
std::vector<LLVector3d> positions;
|
||||
bool unknown_relative_z;
|
||||
|
||||
LLWorld::getInstance()->getAvatars(&avatar_ids, &positions, gAgentCamera.getCameraPositionGlobal());
|
||||
|
||||
// Draw avatars
|
||||
for (LLWorld::region_list_t::const_iterator iter = LLWorld::getInstance()->getRegionList().begin();
|
||||
iter != LLWorld::getInstance()->getRegionList().end(); ++iter)
|
||||
for (U32 i = 0; i < avatar_ids.size(); i++)
|
||||
{
|
||||
LLViewerRegion* regionp = *iter;
|
||||
const LLVector3d& origin_global = regionp->getOriginGlobal();
|
||||
pos_map = globalPosToView(positions[i]);
|
||||
LLUUID uuid = avatar_ids[i];
|
||||
|
||||
S32 count = regionp->mMapAvatars.count();
|
||||
S32 i;
|
||||
LLVector3 pos_local;
|
||||
U32 compact_local;
|
||||
U8 bits;
|
||||
// TODO: it'd be very cool to draw these in sorted order from lowest Z to highest.
|
||||
// just be careful to sort the avatar IDs along with the positions. -MG
|
||||
for (i = 0; i < count; i++)
|
||||
bool show_as_friend = (LLAvatarTracker::instance().getBuddyInfo(uuid) != NULL);
|
||||
|
||||
LLColor4 color = show_as_friend ? map_avatar_friend_color : map_avatar_color;
|
||||
|
||||
unknown_relative_z = positions[i].mdV[VZ] == COARSEUPDATE_MAX_Z &&
|
||||
camera_position.mV[VZ] >= COARSEUPDATE_MAX_Z;
|
||||
|
||||
LLWorldMapView::drawAvatar(
|
||||
pos_map.mV[VX], pos_map.mV[VY],
|
||||
color,
|
||||
pos_map.mV[VZ], mDotRadius,
|
||||
unknown_relative_z);
|
||||
|
||||
if(uuid.notNull())
|
||||
{
|
||||
compact_local = regionp->mMapAvatars.get(i);
|
||||
|
||||
bits = compact_local & 0xFF;
|
||||
pos_local.mV[VZ] = F32(bits) * 4.f;
|
||||
compact_local >>= 8;
|
||||
|
||||
bits = compact_local & 0xFF;
|
||||
pos_local.mV[VY] = (F32)bits;
|
||||
compact_local >>= 8;
|
||||
|
||||
bits = compact_local & 0xFF;
|
||||
pos_local.mV[VX] = (F32)bits;
|
||||
|
||||
pos_global.setVec( pos_local );
|
||||
pos_global += origin_global;
|
||||
|
||||
pos_map = globalPosToView(pos_global);
|
||||
|
||||
LLUUID uuid(NULL);
|
||||
BOOL show_as_friend = FALSE;
|
||||
if( i < regionp->mMapAvatarIDs.count())
|
||||
bool selected = false;
|
||||
uuid_vec_t::iterator sel_iter = gmSelected.begin();
|
||||
for (; sel_iter != gmSelected.end(); sel_iter++)
|
||||
{
|
||||
uuid = regionp->mMapAvatarIDs.get(i);
|
||||
show_as_friend = (LLAvatarTracker::instance().getBuddyInfo(uuid) != NULL);
|
||||
}
|
||||
|
||||
LLColor4 color = show_as_friend ? map_avatar_friend_color : map_avatar_color;
|
||||
LLWorldMapView::drawAvatar(
|
||||
pos_map.mV[VX], pos_map.mV[VY],
|
||||
color,
|
||||
pos_map.mV[VZ], mDotRadius);
|
||||
|
||||
if(uuid.notNull())
|
||||
{
|
||||
bool selected = false;
|
||||
uuid_vec_t::iterator sel_iter = gmSelected.begin();
|
||||
for (; sel_iter != gmSelected.end(); sel_iter++)
|
||||
if(*sel_iter == uuid)
|
||||
{
|
||||
if(*sel_iter == uuid)
|
||||
{
|
||||
selected = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if(selected)
|
||||
{
|
||||
if( (pos_map.mV[VX] < 0) ||
|
||||
(pos_map.mV[VY] < 0) ||
|
||||
(pos_map.mV[VX] >= getRect().getWidth()) ||
|
||||
(pos_map.mV[VY] >= getRect().getHeight()) )
|
||||
{
|
||||
S32 x = llround( pos_map.mV[VX] );
|
||||
S32 y = llround( pos_map.mV[VY] );
|
||||
LLWorldMapView::drawTrackingCircle( getRect(), x, y, color, 1, 10);
|
||||
} else
|
||||
{
|
||||
LLWorldMapView::drawTrackingDot(pos_map.mV[VX],pos_map.mV[VY],color,0.f);
|
||||
}
|
||||
selected = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
F32 dist_to_cursor_squared = dist_vec_squared(LLVector2(pos_map.mV[VX], pos_map.mV[VY]),
|
||||
LLVector2(local_mouse_x,local_mouse_y));
|
||||
if(dist_to_cursor_squared < min_pick_dist_squared && dist_to_cursor_squared < closest_dist_squared)
|
||||
if(selected)
|
||||
{
|
||||
closest_dist_squared = dist_to_cursor_squared;
|
||||
mClosestAgentToCursor = regionp->mMapAvatarIDs.get(i);
|
||||
if( (pos_map.mV[VX] < 0) ||
|
||||
(pos_map.mV[VY] < 0) ||
|
||||
(pos_map.mV[VX] >= getRect().getWidth()) ||
|
||||
(pos_map.mV[VY] >= getRect().getHeight()) )
|
||||
{
|
||||
S32 x = llround( pos_map.mV[VX] );
|
||||
S32 y = llround( pos_map.mV[VY] );
|
||||
LLWorldMapView::drawTrackingCircle( getRect(), x, y, color, 1, 10);
|
||||
} else
|
||||
{
|
||||
LLWorldMapView::drawTrackingDot(pos_map.mV[VX],pos_map.mV[VY],color,0.f);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
F32 dist_to_cursor_squared = dist_vec_squared(LLVector2(pos_map.mV[VX], pos_map.mV[VY]),
|
||||
LLVector2(local_mouse_x,local_mouse_y));
|
||||
if(dist_to_cursor_squared < min_pick_dist_squared && dist_to_cursor_squared < closest_dist_squared)
|
||||
{
|
||||
closest_dist_squared = dist_to_cursor_squared;
|
||||
mClosestAgentToCursor = uuid;
|
||||
}
|
||||
}
|
||||
|
||||
// Draw dot for autopilot target
|
||||
|
|
@ -440,7 +417,7 @@ void LLNetMap::draw()
|
|||
}
|
||||
|
||||
// Draw dot for self avatar position
|
||||
pos_global = gAgent.getPositionGlobal();
|
||||
LLVector3d pos_global = gAgent.getPositionGlobal();
|
||||
pos_map = globalPosToView(pos_global);
|
||||
S32 dot_width = llround(mDotRadius * 2.f);
|
||||
LLUIImagePtr you = LLWorldMapView::sAvatarYouLargeImage;
|
||||
|
|
@ -514,9 +491,11 @@ void LLNetMap::reshape(S32 width, S32 height, BOOL called_from_parent)
|
|||
createObjectImage();
|
||||
}
|
||||
|
||||
LLVector3 LLNetMap::globalPosToView( const LLVector3d& global_pos )
|
||||
LLVector3 LLNetMap::globalPosToView(const LLVector3d& global_pos)
|
||||
{
|
||||
LLVector3d relative_pos_global = global_pos - gAgentCamera.getCameraPositionGlobal();
|
||||
LLVector3d camera_position = gAgentCamera.getCameraPositionGlobal();
|
||||
|
||||
LLVector3d relative_pos_global = global_pos - camera_position;
|
||||
LLVector3 pos_local;
|
||||
pos_local.setVec(relative_pos_global); // convert to floats from doubles
|
||||
|
||||
|
|
@ -541,7 +520,7 @@ LLVector3 LLNetMap::globalPosToView( const LLVector3d& global_pos )
|
|||
void LLNetMap::drawTracking(const LLVector3d& pos_global, const LLColor4& color,
|
||||
BOOL draw_arrow )
|
||||
{
|
||||
LLVector3 pos_local = globalPosToView( pos_global );
|
||||
LLVector3 pos_local = globalPosToView(pos_global);
|
||||
if( (pos_local.mV[VX] < 0) ||
|
||||
(pos_local.mV[VY] < 0) ||
|
||||
(pos_local.mV[VX] >= getRect().getWidth()) ||
|
||||
|
|
|
|||
|
|
@ -43,19 +43,7 @@ extern LLAgent gAgent;
|
|||
LLPreviewAnim::LLPreviewAnim(const LLSD& key)
|
||||
: LLPreview( key )
|
||||
{
|
||||
}
|
||||
|
||||
// static
|
||||
void LLPreviewAnim::endAnimCallback( void *userdata )
|
||||
{
|
||||
LLHandle<LLFloater>* handlep = ((LLHandle<LLFloater>*)userdata);
|
||||
LLFloater* self = handlep->get();
|
||||
delete handlep; // done with the handle
|
||||
if (self)
|
||||
{
|
||||
self->getChild<LLUICtrl>("Anim play btn")->setValue(FALSE);
|
||||
self->getChild<LLUICtrl>("Anim audition btn")->setValue(FALSE);
|
||||
}
|
||||
mCommitCallbackRegistrar.add("PreviewAnim.Play", boost::bind(&LLPreviewAnim::play, this, _2));
|
||||
}
|
||||
|
||||
// virtual
|
||||
|
|
@ -68,105 +56,114 @@ BOOL LLPreviewAnim::postBuild()
|
|||
getChild<LLUICtrl>("desc")->setValue(item->getDescription());
|
||||
}
|
||||
|
||||
childSetAction("Anim play btn",playAnim, this);
|
||||
childSetAction("Anim audition btn",auditionAnim, this);
|
||||
|
||||
childSetCommitCallback("desc", LLPreview::onText, this);
|
||||
getChild<LLLineEditor>("desc")->setPrevalidate(&LLTextValidate::validateASCIIPrintableNoPipe);
|
||||
|
||||
|
||||
return LLPreview::postBuild();
|
||||
}
|
||||
|
||||
void LLPreviewAnim::activate(e_activation_type type)
|
||||
{
|
||||
switch ( type )
|
||||
{
|
||||
case PLAY:
|
||||
{
|
||||
playAnim( (void *) this );
|
||||
break;
|
||||
}
|
||||
case AUDITION:
|
||||
{
|
||||
auditionAnim( (void *) this );
|
||||
break;
|
||||
}
|
||||
default:
|
||||
{
|
||||
//do nothing
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// static
|
||||
void LLPreviewAnim::playAnim( void *userdata )
|
||||
// llinventorybridge also calls into here
|
||||
void LLPreviewAnim::play(const LLSD& param)
|
||||
{
|
||||
LLPreviewAnim* self = (LLPreviewAnim*) userdata;
|
||||
const LLInventoryItem *item = self->getItem();
|
||||
const LLInventoryItem *item = getItem();
|
||||
|
||||
if(item)
|
||||
{
|
||||
LLUUID itemID=item->getAssetUUID();
|
||||
|
||||
LLButton* btn = self->getChild<LLButton>("Anim play btn");
|
||||
if (btn)
|
||||
std::string btn_name = param.asString();
|
||||
LLButton* btn_inuse;
|
||||
LLButton* btn_other;
|
||||
|
||||
if ("Inworld" == btn_name)
|
||||
{
|
||||
btn->toggleState();
|
||||
btn_inuse = getChild<LLButton>("Inworld");
|
||||
btn_other = getChild<LLButton>("Locally");
|
||||
}
|
||||
else if ("Locally" == btn_name)
|
||||
{
|
||||
btn_inuse = getChild<LLButton>("Locally");
|
||||
btn_other = getChild<LLButton>("Inworld");
|
||||
}
|
||||
else
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (btn_inuse)
|
||||
{
|
||||
btn_inuse->toggleState();
|
||||
}
|
||||
|
||||
if (btn_other)
|
||||
{
|
||||
btn_other->setEnabled(false);
|
||||
}
|
||||
|
||||
if (self->getChild<LLUICtrl>("Anim play btn")->getValue().asBoolean() )
|
||||
if (getChild<LLUICtrl>(btn_name)->getValue().asBoolean() )
|
||||
{
|
||||
self->mPauseRequest = NULL;
|
||||
gAgent.sendAnimationRequest(itemID, ANIM_REQUEST_START);
|
||||
if("Inworld" == btn_name)
|
||||
{
|
||||
gAgent.sendAnimationRequest(itemID, ANIM_REQUEST_START);
|
||||
}
|
||||
else
|
||||
{
|
||||
gAgentAvatarp->startMotion(item->getAssetUUID());
|
||||
}
|
||||
|
||||
LLMotion* motion = gAgentAvatarp->findMotion(itemID);
|
||||
if (motion)
|
||||
{
|
||||
motion->setDeactivateCallback(&endAnimCallback, (void *)(new LLHandle<LLFloater>(self->getHandle())));
|
||||
mItemID = itemID;
|
||||
mDidStart = false;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
gAgentAvatarp->stopMotion(itemID);
|
||||
gAgent.sendAnimationRequest(itemID, ANIM_REQUEST_STOP);
|
||||
|
||||
if (btn_other)
|
||||
{
|
||||
btn_other->setEnabled(true);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// static
|
||||
void LLPreviewAnim::auditionAnim( void *userdata )
|
||||
// virtual
|
||||
void LLPreviewAnim::draw()
|
||||
{
|
||||
LLPreviewAnim* self = (LLPreviewAnim*) userdata;
|
||||
const LLInventoryItem *item = self->getItem();
|
||||
|
||||
if(item)
|
||||
LLPreview::draw();
|
||||
if (!this->mItemID.isNull())
|
||||
{
|
||||
LLUUID itemID=item->getAssetUUID();
|
||||
|
||||
LLButton* btn = self->getChild<LLButton>("Anim audition btn");
|
||||
if (btn)
|
||||
LLMotion* motion = gAgentAvatarp->findMotion(this->mItemID);
|
||||
if (motion)
|
||||
{
|
||||
btn->toggleState();
|
||||
}
|
||||
|
||||
if (self->getChild<LLUICtrl>("Anim audition btn")->getValue().asBoolean() )
|
||||
{
|
||||
self->mPauseRequest = NULL;
|
||||
gAgentAvatarp->startMotion(item->getAssetUUID());
|
||||
LLMotion* motion = gAgentAvatarp->findMotion(itemID);
|
||||
|
||||
if (motion)
|
||||
if (motion->isStopped() && this->mDidStart)
|
||||
{
|
||||
motion->setDeactivateCallback(&endAnimCallback, (void *)(new LLHandle<LLFloater>(self->getHandle())));
|
||||
cleanup();
|
||||
}
|
||||
if(gAgentAvatarp->isMotionActive(this->mItemID) && !this->mDidStart)
|
||||
{
|
||||
this->mDidStart = true;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
gAgentAvatarp->stopMotion(itemID);
|
||||
gAgent.sendAnimationRequest(itemID, ANIM_REQUEST_STOP);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// virtual
|
||||
void LLPreviewAnim::cleanup()
|
||||
{
|
||||
this->mItemID = LLUUID::null;
|
||||
this->mDidStart = false;
|
||||
getChild<LLUICtrl>("Inworld")->setValue(FALSE);
|
||||
getChild<LLUICtrl>("Locally")->setValue(FALSE);
|
||||
getChild<LLUICtrl>("Inworld")->setEnabled(true);
|
||||
getChild<LLUICtrl>("Locally")->setEnabled(true);
|
||||
}
|
||||
|
||||
// virtual
|
||||
void LLPreviewAnim::onClose(bool app_quitting)
|
||||
{
|
||||
|
|
@ -176,12 +173,5 @@ void LLPreviewAnim::onClose(bool app_quitting)
|
|||
{
|
||||
gAgentAvatarp->stopMotion(item->getAssetUUID());
|
||||
gAgent.sendAnimationRequest(item->getAssetUUID(), ANIM_REQUEST_STOP);
|
||||
LLMotion* motion = gAgentAvatarp->findMotion(item->getAssetUUID());
|
||||
|
||||
if (motion)
|
||||
{
|
||||
// *TODO: minor memory leak here, user data is never deleted (Use real callbacks)
|
||||
motion->setDeactivateCallback(NULL, (void *)NULL);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -33,24 +33,18 @@
|
|||
class LLPreviewAnim : public LLPreview
|
||||
{
|
||||
public:
|
||||
enum e_activation_type { NONE = 0, PLAY = 1, AUDITION = 2 };
|
||||
LLPreviewAnim(const LLSD& key);
|
||||
|
||||
static void playAnim( void* userdata );
|
||||
static void auditionAnim( void* userdata );
|
||||
static void endAnimCallback( void *userdata );
|
||||
LLPreviewAnim(const LLSD& key);
|
||||
/*virtual*/ BOOL postBuild();
|
||||
/*virtual*/ void onClose(bool app_quitting);
|
||||
void activate(e_activation_type type);
|
||||
void draw();
|
||||
void cleanup();
|
||||
void play(const LLSD& param);
|
||||
|
||||
protected:
|
||||
|
||||
LLAnimPauseRequest mPauseRequest;
|
||||
LLUUID mItemID;
|
||||
std::string mTitle;
|
||||
LLUUID mObjectID;
|
||||
LLButton* mPlayBtn;
|
||||
LLButton* mAuditionBtn;
|
||||
LLUUID mItemID;
|
||||
bool mDidStart;
|
||||
};
|
||||
|
||||
#endif // LL_LLPREVIEWSOUND_H
|
||||
#endif // LL_LLPREVIEWANIM_H
|
||||
|
|
|
|||
|
|
@ -929,6 +929,13 @@ LLTextureCtrl::LLTextureCtrl(const LLTextureCtrl::Params& p)
|
|||
tentative_label_p.rect(LLRect (0, image_middle + line_height / 2, getRect().getWidth(), image_middle - line_height / 2 ));
|
||||
tentative_label_p.follows.flags(FOLLOWS_ALL);
|
||||
mTentativeLabel = LLUICtrlFactory::create<LLTextBox> (tentative_label_p);
|
||||
|
||||
// It is no longer possible to associate a style with a textbox, so it has to be done in this fashion
|
||||
LLStyle::Params style_params;
|
||||
style_params.color = LLColor4::white;
|
||||
|
||||
mTentativeLabel->setText(LLTrans::getString("multiple_textures"), style_params);
|
||||
mTentativeLabel->setHAlign(LLFontGL::HCENTER);
|
||||
addChild( mTentativeLabel );
|
||||
|
||||
LLRect border_rect = getLocalRect();
|
||||
|
|
|
|||
|
|
@ -81,7 +81,7 @@ LLToolMgr::LLToolMgr()
|
|||
// Not a panel, register these callbacks globally.
|
||||
LLUICtrl::EnableCallbackRegistry::currentRegistrar().add("Build.Active", boost::bind(&LLToolMgr::inEdit, this));
|
||||
LLUICtrl::EnableCallbackRegistry::currentRegistrar().add("Build.Enabled", boost::bind(&LLToolMgr::canEdit, this));
|
||||
LLUICtrl::CommitCallbackRegistry::currentRegistrar().add("Build.Toggle", boost::bind(&LLToolMgr::toggleBuildMode, this));
|
||||
LLUICtrl::CommitCallbackRegistry::currentRegistrar().add("Build.Toggle", boost::bind(&LLToolMgr::toggleBuildMode, this, _2));
|
||||
|
||||
gToolNull = new LLTool(LLStringUtil::null); // Does nothing
|
||||
setCurrentTool(gToolNull);
|
||||
|
|
@ -245,8 +245,15 @@ bool LLToolMgr::canEdit()
|
|||
return LLViewerParcelMgr::getInstance()->allowAgentBuild();
|
||||
}
|
||||
|
||||
void LLToolMgr::toggleBuildMode()
|
||||
void LLToolMgr::toggleBuildMode(const LLSD& sdname)
|
||||
{
|
||||
const std::string& param = sdname.asString();
|
||||
|
||||
if (param == "build" && !canEdit())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
LLFloaterReg::toggleInstanceOrBringToFront("build");
|
||||
|
||||
bool build_visible = LLFloaterReg::instanceVisible("build");
|
||||
|
|
|
|||
|
|
@ -54,7 +54,7 @@ public:
|
|||
|
||||
bool inEdit();
|
||||
bool canEdit();
|
||||
void toggleBuildMode();
|
||||
void toggleBuildMode(const LLSD& sdname);
|
||||
|
||||
/* Determines if we are in Build mode or not. */
|
||||
bool inBuildMode();
|
||||
|
|
|
|||
|
|
@ -1161,24 +1161,13 @@ void send_agent_resume()
|
|||
|
||||
static LLVector3d unpackLocalToGlobalPosition(U32 compact_local, const LLVector3d& region_origin)
|
||||
{
|
||||
LLVector3d pos_global;
|
||||
LLVector3 pos_local;
|
||||
U8 bits;
|
||||
LLVector3d pos_local;
|
||||
|
||||
bits = compact_local & 0xFF;
|
||||
pos_local.mV[VZ] = F32(bits) * 4.f;
|
||||
compact_local >>= 8;
|
||||
pos_local.mdV[VZ] = (compact_local & 0xFFU) * 4;
|
||||
pos_local.mdV[VY] = (compact_local >> 8) & 0xFFU;
|
||||
pos_local.mdV[VX] = (compact_local >> 16) & 0xFFU;
|
||||
|
||||
bits = compact_local & 0xFF;
|
||||
pos_local.mV[VY] = (F32)bits;
|
||||
compact_local >>= 8;
|
||||
|
||||
bits = compact_local & 0xFF;
|
||||
pos_local.mV[VX] = (F32)bits;
|
||||
|
||||
pos_global.setVec( pos_local );
|
||||
pos_global += region_origin;
|
||||
return pos_global;
|
||||
return region_origin + pos_local;
|
||||
}
|
||||
|
||||
void LLWorld::getAvatars(uuid_vec_t* avatar_ids, std::vector<LLVector3d>* positions, const LLVector3d& relative_to, F32 radius) const
|
||||
|
|
@ -1199,23 +1188,20 @@ void LLWorld::getAvatars(uuid_vec_t* avatar_ids, std::vector<LLVector3d>* positi
|
|||
iter != LLCharacter::sInstances.end(); ++iter)
|
||||
{
|
||||
LLVOAvatar* pVOAvatar = (LLVOAvatar*) *iter;
|
||||
if(!pVOAvatar->isDead() && !pVOAvatar->isSelf())
|
||||
LLVector3d pos_global = pVOAvatar->getPositionGlobal();
|
||||
LLUUID uuid = pVOAvatar->getID();
|
||||
if( !pVOAvatar->isDead()
|
||||
&& !pVOAvatar->isSelf()
|
||||
&& !uuid.isNull() &&
|
||||
dist_vec_squared(pos_global, relative_to) <= radius_squared)
|
||||
{
|
||||
LLUUID uuid = pVOAvatar->getID();
|
||||
if(!uuid.isNull())
|
||||
if(positions != NULL)
|
||||
{
|
||||
LLVector3d pos_global = pVOAvatar->getPositionGlobal();
|
||||
if(dist_vec_squared(pos_global, relative_to) <= radius_squared)
|
||||
{
|
||||
if(positions != NULL)
|
||||
{
|
||||
positions->push_back(pos_global);
|
||||
}
|
||||
if(avatar_ids !=NULL)
|
||||
{
|
||||
avatar_ids->push_back(uuid);
|
||||
}
|
||||
}
|
||||
positions->push_back(pos_global);
|
||||
}
|
||||
if(avatar_ids !=NULL)
|
||||
{
|
||||
avatar_ids->push_back(uuid);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1233,9 +1219,9 @@ void LLWorld::getAvatars(uuid_vec_t* avatar_ids, std::vector<LLVector3d>* positi
|
|||
{
|
||||
LLUUID uuid = regionp->mMapAvatarIDs.get(i);
|
||||
// if this avatar doesn't already exist in the list, add it
|
||||
if(uuid.notNull() && avatar_ids!=NULL && std::find(avatar_ids->begin(), avatar_ids->end(), uuid) == avatar_ids->end())
|
||||
if(uuid.notNull() && avatar_ids != NULL && std::find(avatar_ids->begin(), avatar_ids->end(), uuid) == avatar_ids->end())
|
||||
{
|
||||
if(positions != NULL)
|
||||
if (positions != NULL)
|
||||
{
|
||||
positions->push_back(pos_global);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -77,6 +77,7 @@ LLUIImagePtr LLWorldMapView::sAvatarYouLargeImage = NULL;
|
|||
LLUIImagePtr LLWorldMapView::sAvatarLevelImage = NULL;
|
||||
LLUIImagePtr LLWorldMapView::sAvatarAboveImage = NULL;
|
||||
LLUIImagePtr LLWorldMapView::sAvatarBelowImage = NULL;
|
||||
LLUIImagePtr LLWorldMapView::sAvatarUnknownImage = NULL;
|
||||
|
||||
LLUIImagePtr LLWorldMapView::sTelehubImage = NULL;
|
||||
LLUIImagePtr LLWorldMapView::sInfohubImage = NULL;
|
||||
|
|
@ -120,6 +121,7 @@ void LLWorldMapView::initClass()
|
|||
sAvatarLevelImage = LLUI::getUIImage("map_avatar_32.tga");
|
||||
sAvatarAboveImage = LLUI::getUIImage("map_avatar_above_32.tga");
|
||||
sAvatarBelowImage = LLUI::getUIImage("map_avatar_below_32.tga");
|
||||
sAvatarUnknownImage = LLUI::getUIImage("map_avatar_unknown_32.tga");
|
||||
|
||||
sHomeImage = LLUI::getUIImage("map_home.tga");
|
||||
sTelehubImage = LLUI::getUIImage("map_telehub.tga");
|
||||
|
|
@ -149,6 +151,7 @@ void LLWorldMapView::cleanupClass()
|
|||
sAvatarLevelImage = NULL;
|
||||
sAvatarAboveImage = NULL;
|
||||
sAvatarBelowImage = NULL;
|
||||
sAvatarUnknownImage = NULL;
|
||||
|
||||
sTelehubImage = NULL;
|
||||
sInfohubImage = NULL;
|
||||
|
|
@ -1147,17 +1150,25 @@ void LLWorldMapView::drawAvatar(F32 x_pixels,
|
|||
F32 y_pixels,
|
||||
const LLColor4& color,
|
||||
F32 relative_z,
|
||||
F32 dot_radius)
|
||||
F32 dot_radius,
|
||||
bool unknown_relative_z)
|
||||
{
|
||||
const F32 HEIGHT_THRESHOLD = 7.f;
|
||||
LLUIImagePtr dot_image = sAvatarLevelImage;
|
||||
if(relative_z < -HEIGHT_THRESHOLD)
|
||||
if (unknown_relative_z)
|
||||
{
|
||||
dot_image = sAvatarBelowImage;
|
||||
dot_image = sAvatarUnknownImage;
|
||||
}
|
||||
else if(relative_z > HEIGHT_THRESHOLD)
|
||||
{
|
||||
dot_image = sAvatarAboveImage;
|
||||
else
|
||||
{
|
||||
if(relative_z < -HEIGHT_THRESHOLD)
|
||||
{
|
||||
dot_image = sAvatarBelowImage;
|
||||
}
|
||||
else if(relative_z > HEIGHT_THRESHOLD)
|
||||
{
|
||||
dot_image = sAvatarAboveImage;
|
||||
}
|
||||
}
|
||||
S32 dot_width = llround(dot_radius * 2.f);
|
||||
dot_image->draw(llround(x_pixels - dot_radius),
|
||||
|
|
|
|||
|
|
@ -112,7 +112,8 @@ public:
|
|||
F32 y_pixels,
|
||||
const LLColor4& color,
|
||||
F32 relative_z = 0.f,
|
||||
F32 dot_radius = 3.f);
|
||||
F32 dot_radius = 3.f,
|
||||
bool reached_max_z = false);
|
||||
static void drawIconName(F32 x_pixels,
|
||||
F32 y_pixels,
|
||||
const LLColor4& color,
|
||||
|
|
@ -138,6 +139,7 @@ public:
|
|||
static LLUIImagePtr sAvatarLevelImage;
|
||||
static LLUIImagePtr sAvatarAboveImage;
|
||||
static LLUIImagePtr sAvatarBelowImage;
|
||||
static LLUIImagePtr sAvatarUnknownImage;
|
||||
|
||||
static LLUIImagePtr sTelehubImage;
|
||||
static LLUIImagePtr sInfohubImage;
|
||||
|
|
|
|||
Binary file not shown.
|
After Width: | Height: | Size: 4.0 KiB |
|
|
@ -41,18 +41,26 @@
|
|||
label_selected="Stop"
|
||||
layout="topleft"
|
||||
left="10"
|
||||
name="Anim play btn"
|
||||
name="Inworld"
|
||||
tool_tip="Play this animation so that others can see it"
|
||||
top="47"
|
||||
width="125" />
|
||||
width="125">
|
||||
<button.commit_callback
|
||||
function="PreviewAnim.Play"
|
||||
parameter="Inworld" />
|
||||
</button>
|
||||
<button
|
||||
height="20"
|
||||
label="Play Locally"
|
||||
label_selected="Stop"
|
||||
layout="topleft"
|
||||
left_pad="5"
|
||||
name="Anim audition btn"
|
||||
name="Locally"
|
||||
tool_tip="Play this animation so that only you can see it"
|
||||
top_delta="0"
|
||||
width="125" />
|
||||
width="125">
|
||||
<button.commit_callback
|
||||
function="PreviewAnim.Play"
|
||||
parameter="Locally" />
|
||||
</button>
|
||||
</floater>
|
||||
|
|
|
|||
|
|
@ -369,6 +369,9 @@ Please try logging in again in a minute.</string>
|
|||
<string name="anim_yes_happy">Yes (Happy)</string>
|
||||
<string name="anim_yes_head">Yes</string>
|
||||
|
||||
<!-- build floater -->
|
||||
<string name="multiple_textures">Multiple</string>
|
||||
|
||||
<!-- world map -->
|
||||
<string name="texture_loading">Loading...</string>
|
||||
<string name="worldmap_offline">Offline</string>
|
||||
|
|
|
|||
Loading…
Reference in New Issue