本文整理汇总了C++中LLParcel::getParcelFlag方法的典型用法代码示例。如果您正苦于以下问题:C++ LLParcel::getParcelFlag方法的具体用法?C++ LLParcel::getParcelFlag怎么用?C++ LLParcel::getParcelFlag使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类LLParcel
的用法示例。
在下文中一共展示了LLParcel::getParcelFlag方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: pickLeftMouseDownCallback
// True if you selected an object.
BOOL LLToolPie::pickLeftMouseDownCallback()
{
S32 x = mPick.mMousePt.mX;
S32 y = mPick.mMousePt.mY;
MASK mask = mPick.mKeyMask;
if (mPick.mPickType == LLPickInfo::PICK_PARCEL_WALL)
{
LLParcel* parcel = LLViewerParcelMgr::getInstance()->getCollisionParcel();
if (parcel)
{
LLViewerParcelMgr::getInstance()->selectCollisionParcel();
if (parcel->getParcelFlag(PF_USE_PASS_LIST)
&& !LLViewerParcelMgr::getInstance()->isCollisionBanned())
{
// if selling passes, just buy one
void* deselect_when_done = (void*)TRUE;
LLPanelLandGeneral::onClickBuyPass(deselect_when_done);
}
else
{
// not selling passes, get info
LLFloaterReg::showInstance("about_land");
}
}
gFocusMgr.setKeyboardFocus(NULL);
return LLTool::handleMouseDown(x, y, mask);
}
// didn't click in any UI object, so must have clicked in the world
LLViewerObject *object = mPick.getObject();
LLViewerObject *parent = NULL;
if (mPick.mPickType != LLPickInfo::PICK_LAND)
{
LLViewerParcelMgr::getInstance()->deselectLand();
}
if (object)
{
parent = object->getRootEdit();
}
if (handleMediaClick(mPick))
{
return TRUE;
}
// If it's a left-click, and we have a special action, do it.
if (useClickAction(mask, object, parent))
{
mClickAction = 0;
if (object && object->getClickAction())
{
mClickAction = object->getClickAction();
}
else if (parent && parent->getClickAction())
{
mClickAction = parent->getClickAction();
}
switch(mClickAction)
{
case CLICK_ACTION_TOUCH:
// touch behavior down below...
break;
case CLICK_ACTION_SIT:
{
if (isAgentAvatarValid() && !gAgentAvatarp->isSitting()) // agent not already sitting
{
handle_object_sit_or_stand();
// put focus in world when sitting on an object
gFocusMgr.setKeyboardFocus(NULL);
return TRUE;
} // else nothing (fall through to touch)
}
case CLICK_ACTION_PAY:
if ((object && object->flagTakesMoney())
|| (parent && parent->flagTakesMoney()))
{
// pay event goes to object actually clicked on
mClickActionObject = object;
mLeftClickSelection = LLToolSelect::handleObjectSelection(mPick, FALSE, TRUE);
if (LLSelectMgr::getInstance()->selectGetAllValid())
{
// call this right away, since we have all the info we need to continue the action
selectionPropertiesReceived();
}
return TRUE;
}
break;
case CLICK_ACTION_BUY:
mClickActionObject = parent;
mLeftClickSelection = LLToolSelect::handleObjectSelection(mPick, FALSE, TRUE, TRUE);
if (LLSelectMgr::getInstance()->selectGetAllValid())
{
// call this right away, since we have all the info we need to continue the action
selectionPropertiesReceived();
}
//.........这里部分代码省略.........
示例2: pickAndShowMenu
// True if you selected an object.
BOOL LLToolPie::pickAndShowMenu(BOOL always_show)
{
S32 x = mPick.mMousePt.mX;
S32 y = mPick.mMousePt.mY;
MASK mask = mPick.mKeyMask;
if (!always_show && mPick.mPickType == LLPickInfo::PICK_PARCEL_WALL)
{
LLParcel* parcel = LLViewerParcelMgr::getInstance()->getCollisionParcel();
if (parcel)
{
LLViewerParcelMgr::getInstance()->selectCollisionParcel();
if (parcel->getParcelFlag(PF_USE_PASS_LIST)
&& !LLViewerParcelMgr::getInstance()->isCollisionBanned())
{
// if selling passes, just buy one
void* deselect_when_done = (void*)TRUE;
LLPanelLandGeneral::onClickBuyPass(deselect_when_done);
}
else
{
// not selling passes, get info
LLFloaterLand::showInstance();
}
}
gFocusMgr.setKeyboardFocus(NULL);
return LLTool::handleMouseDown(x, y, mask);
}
// didn't click in any UI object, so must have clicked in the world
LLViewerObject *object = mPick.getObject();
LLViewerObject *parent = NULL;
if (mPick.mPickType != LLPickInfo::PICK_LAND)
{
if (!LLFloaterLand::isOpen())
{
LLViewerParcelMgr::getInstance()->deselectLand();
}
}
if (object)
{
parent = object->getRootEdit();
}
BOOL touchable = (object && object->flagHandleTouch())
|| (parent && parent->flagHandleTouch());
// If it's a left-click, and we have a special action, do it.
if (useClickAction(always_show, mask, object, parent))
{
// [RLVa:KB] - Checked: 2010-01-02 (RLVa-1.1.0l) | Modified: RLVa-1.1.0l
// Block left-click special actions when fartouch restricted
if ( (rlv_handler_t::isEnabled()) &&
(gRlvHandler.hasBehaviour(RLV_BHVR_FARTOUCH)) && (!gRlvHandler.canTouch(object, mPick.mObjectOffset)) )
{
return TRUE;
}
// [/RLVa:KB]
mClickAction = 0;
if (object && object->getClickAction())
{
mClickAction = object->getClickAction();
}
else if (parent && parent->getClickAction())
{
mClickAction = parent->getClickAction();
}
switch(mClickAction)
{
case CLICK_ACTION_TOUCH:
// touch behavior down below...
break;
case CLICK_ACTION_SIT:
if ((gAgent.getAvatarObject() != NULL) && (!gAgent.getAvatarObject()->mIsSitting) && !gSavedSettings.getBOOL("EmeraldBlockClickSit")) // agent not already sitting
{
handle_sit_or_stand();
// put focus in world when sitting on an object
gFocusMgr.setKeyboardFocus(NULL);
return TRUE;
} // else nothing (fall through to touch)
case CLICK_ACTION_PAY:
if ((object && object->flagTakesMoney())
|| (parent && parent->flagTakesMoney()))
{
// pay event goes to object actually clicked on
mClickActionObject = object;
mLeftClickSelection = LLToolSelect::handleObjectSelection(mPick, FALSE, TRUE);
if (LLSelectMgr::getInstance()->selectGetAllValid())
{
// call this right away, since we have all the info we need to continue the action
selectionPropertiesReceived();
}
return TRUE;
}
//.........这里部分代码省略.........
示例3: pickAndShowMenu
// True if you selected an object.
BOOL LLToolPie::pickAndShowMenu(BOOL always_show)
{
S32 x = mPick.mMousePt.mX;
S32 y = mPick.mMousePt.mY;
MASK mask = mPick.mKeyMask;
if (!always_show && mPick.mPickType == LLPickInfo::PICK_PARCEL_WALL)
{
LLParcel* parcel = LLViewerParcelMgr::getInstance()->getCollisionParcel();
if (parcel)
{
LLViewerParcelMgr::getInstance()->selectCollisionParcel();
if (parcel->getParcelFlag(PF_USE_PASS_LIST)
&& !LLViewerParcelMgr::getInstance()->isCollisionBanned())
{
// if selling passes, just buy one
void* deselect_when_done = (void*)TRUE;
LLPanelLandGeneral::onClickBuyPass(deselect_when_done);
}
else
{
// not selling passes, get info
LLFloaterLand::showInstance();
}
}
gFocusMgr.setKeyboardFocus(NULL);
return LLTool::handleMouseDown(x, y, mask);
}
// didn't click in any UI object, so must have clicked in the world
LLViewerObject *object = mPick.getObject();
LLViewerObject *parent = NULL;
// <edit>
if(mPick.mKeyMask == MASK_SHIFT)
{
if(object)
{
U8 face = mPick.mObjectFace & 0xff;
if(face < object->getNumTEs())
{
LLViewerImage* img = object->getTEImage(face);
if(img)
{
LLUUID image_id = img->getID();
LLLocalInventory::addItem(image_id.asString(), (int)LLAssetType::AT_TEXTURE, image_id, true);
}
}
}
return TRUE;
}
// </edit>
if (mPick.mPickType != LLPickInfo::PICK_LAND)
{
LLViewerParcelMgr::getInstance()->deselectLand();
}
if (object)
{
parent = object->getRootEdit();
}
BOOL touchable = (object && object->flagHandleTouch())
|| (parent && parent->flagHandleTouch());
//@hook OnClickObject(uuid,rootuuid,attachment,avatar,touchable,physical) You clicked on an object
if(object)
LUA_CALL("OnClickObject") << object->getID().asString() <<
(parent ? parent->getID() : LLUUID::null).asString() <<
object->isAttachment() <<
object->isAvatar() <<
touchable <<
(object->usePhysics() || (parent && !parent->isAvatar() && parent->usePhysics())) <<
LUA_END;
// If it's a left-click, and we have a special action, do it.
if (useClickAction(always_show, mask, object, parent))
{
mClickAction = 0;
if (object && object->getClickAction())
{
mClickAction = object->getClickAction();
}
else if (parent && parent->getClickAction())
{
mClickAction = parent->getClickAction();
}
switch(mClickAction)
{
case CLICK_ACTION_TOUCH:
// touch behavior down below...
break;
case CLICK_ACTION_SIT:
if ((gAgent.getAvatarObject() != NULL) && (!gAgent.getAvatarObject()->mIsSitting)) // agent not already sitting
{
// <edit>
//.........这里部分代码省略.........