LLAgentCamera update. Culled a bunch of dead code from llappviewer. Moved build-mode toggle off into lltoolmgr.
This commit is contained in:
@@ -2920,10 +2920,10 @@
|
|||||||
<real>6.0</real>
|
<real>6.0</real>
|
||||||
</array>
|
</array>
|
||||||
</map>
|
</map>
|
||||||
<key>CameraOffsetDefault</key>
|
<key>CameraOffsetRearView</key>
|
||||||
<map>
|
<map>
|
||||||
<key>Comment</key>
|
<key>Comment</key>
|
||||||
<string>Default camera offset from avatar</string>
|
<string>Initial camera offset from avatar in Rear View</string>
|
||||||
<key>Persist</key>
|
<key>Persist</key>
|
||||||
<integer>1</integer>
|
<integer>1</integer>
|
||||||
<key>Type</key>
|
<key>Type</key>
|
||||||
@@ -2935,6 +2935,36 @@
|
|||||||
<real>0.75</real>
|
<real>0.75</real>
|
||||||
</array>
|
</array>
|
||||||
</map>
|
</map>
|
||||||
|
<key>CameraOffsetFrontView</key>
|
||||||
|
<map>
|
||||||
|
<key>Comment</key>
|
||||||
|
<string>Initial camera offset from avatar in Front View</string>
|
||||||
|
<key>Persist</key>
|
||||||
|
<integer>1</integer>
|
||||||
|
<key>Type</key>
|
||||||
|
<string>Vector3</string>
|
||||||
|
<key>Value</key>
|
||||||
|
<array>
|
||||||
|
<real>2.2</real>
|
||||||
|
<real>0.0</real>
|
||||||
|
<real>0.0</real>
|
||||||
|
</array>
|
||||||
|
</map>
|
||||||
|
<key>CameraOffsetGroupView</key>
|
||||||
|
<map>
|
||||||
|
<key>Comment</key>
|
||||||
|
<string>Initial camera offset from avatar in Group View</string>
|
||||||
|
<key>Persist</key>
|
||||||
|
<integer>1</integer>
|
||||||
|
<key>Type</key>
|
||||||
|
<string>Vector3</string>
|
||||||
|
<key>Value</key>
|
||||||
|
<array>
|
||||||
|
<real>-1.0</real>
|
||||||
|
<real>0.7</real>
|
||||||
|
<real>0.5</real>
|
||||||
|
</array>
|
||||||
|
</map>
|
||||||
<key>CameraOffsetScale</key>
|
<key>CameraOffsetScale</key>
|
||||||
<map>
|
<map>
|
||||||
<key>Comment</key>
|
<key>Comment</key>
|
||||||
@@ -2972,6 +3002,18 @@
|
|||||||
<key>Value</key>
|
<key>Value</key>
|
||||||
<real>1.0</real>
|
<real>1.0</real>
|
||||||
</map>
|
</map>
|
||||||
|
<key>CameraPreset</key>
|
||||||
|
<map>
|
||||||
|
<key>Comment</key>
|
||||||
|
<string>Preset camera position - view (0 - rear, 1 - front, 2 - group)</string>
|
||||||
|
<key>Persist</key>
|
||||||
|
<integer>1</integer>
|
||||||
|
<key>Type</key>
|
||||||
|
<string>U32</string>
|
||||||
|
<key>Value</key>
|
||||||
|
<integer>0</integer>
|
||||||
|
</map>
|
||||||
|
|
||||||
<key>CameraFocusTransitionTime</key>
|
<key>CameraFocusTransitionTime</key>
|
||||||
<map>
|
<map>
|
||||||
<key>Comment</key>
|
<key>Comment</key>
|
||||||
@@ -6679,14 +6721,14 @@
|
|||||||
<key>Value</key>
|
<key>Value</key>
|
||||||
<integer>0</integer>
|
<integer>0</integer>
|
||||||
</map>
|
</map>
|
||||||
<key>FocusOffsetDefault</key>
|
<key>FocusOffsetRearView</key>
|
||||||
<map>
|
<map>
|
||||||
<key>Comment</key>
|
<key>Comment</key>
|
||||||
<string>Default focus point offset relative to avatar (x-axis is forward)</string>
|
<string>Initial focus point offset relative to avatar for the camera preset Rear View (x-axis is forward)</string>
|
||||||
<key>Persist</key>
|
<key>Persist</key>
|
||||||
<integer>1</integer>
|
<integer>1</integer>
|
||||||
<key>Type</key>
|
<key>Type</key>
|
||||||
<string>Vector3</string>
|
<string>Vector3D</string>
|
||||||
<key>Value</key>
|
<key>Value</key>
|
||||||
<array>
|
<array>
|
||||||
<real>1.0</real>
|
<real>1.0</real>
|
||||||
@@ -6694,6 +6736,36 @@
|
|||||||
<real>1.0</real>
|
<real>1.0</real>
|
||||||
</array>
|
</array>
|
||||||
</map>
|
</map>
|
||||||
|
<key>FocusOffsetFrontView</key>
|
||||||
|
<map>
|
||||||
|
<key>Comment</key>
|
||||||
|
<string>Initial focus point offset relative to avatar for the camera preset Front View</string>
|
||||||
|
<key>Persist</key>
|
||||||
|
<integer>1</integer>
|
||||||
|
<key>Type</key>
|
||||||
|
<string>Vector3D</string>
|
||||||
|
<key>Value</key>
|
||||||
|
<array>
|
||||||
|
<real>0.0</real>
|
||||||
|
<real>0.0</real>
|
||||||
|
<real>0.0</real>
|
||||||
|
</array>
|
||||||
|
</map>
|
||||||
|
<key>FocusOffsetGroupView</key>
|
||||||
|
<map>
|
||||||
|
<key>Comment</key>
|
||||||
|
<string>Initial focus point offset relative to avatar for the camera preset Group View</string>
|
||||||
|
<key>Persist</key>
|
||||||
|
<integer>1</integer>
|
||||||
|
<key>Type</key>
|
||||||
|
<string>Vector3D</string>
|
||||||
|
<key>Value</key>
|
||||||
|
<array>
|
||||||
|
<real>1.5</real>
|
||||||
|
<real>0.7</real>
|
||||||
|
<real>1.0</real>
|
||||||
|
</array>
|
||||||
|
</map>
|
||||||
<key>FocusPosOnLogout</key>
|
<key>FocusPosOnLogout</key>
|
||||||
<map>
|
<map>
|
||||||
<key>Comment</key>
|
<key>Comment</key>
|
||||||
|
|||||||
@@ -128,7 +128,7 @@ LLAgentCamera::LLAgentCamera() :
|
|||||||
mCameraMode( CAMERA_MODE_THIRD_PERSON ),
|
mCameraMode( CAMERA_MODE_THIRD_PERSON ),
|
||||||
mLastCameraMode( CAMERA_MODE_THIRD_PERSON ),
|
mLastCameraMode( CAMERA_MODE_THIRD_PERSON ),
|
||||||
|
|
||||||
//mCameraPreset(CAMERA_PRESET_REAR_VIEW),
|
mCameraPreset(CAMERA_PRESET_REAR_VIEW),
|
||||||
|
|
||||||
mCameraAnimating( FALSE ),
|
mCameraAnimating( FALSE ),
|
||||||
mAnimationCameraStartGlobal(),
|
mAnimationCameraStartGlobal(),
|
||||||
@@ -141,7 +141,6 @@ LLAgentCamera::LLAgentCamera() :
|
|||||||
mCameraFocusOffset(),
|
mCameraFocusOffset(),
|
||||||
mCameraFOVDefault(DEFAULT_FIELD_OF_VIEW),
|
mCameraFOVDefault(DEFAULT_FIELD_OF_VIEW),
|
||||||
|
|
||||||
mCameraOffsetDefault(),
|
|
||||||
mCameraCollidePlane(),
|
mCameraCollidePlane(),
|
||||||
|
|
||||||
mCurrentCameraDistance(2.f), // meters, set in init()
|
mCurrentCameraDistance(2.f), // meters, set in init()
|
||||||
@@ -212,8 +211,7 @@ void LLAgentCamera::init()
|
|||||||
|
|
||||||
mCameraFocusOffsetTarget = LLVector4(gSavedSettings.getVector3("CameraOffsetBuild"));
|
mCameraFocusOffsetTarget = LLVector4(gSavedSettings.getVector3("CameraOffsetBuild"));
|
||||||
|
|
||||||
mCameraOffsetDefault = gSavedSettings.getVector3("CameraOffsetDefault");//Legacy
|
mCameraPreset = (ECameraPreset) gSavedSettings.getU32("CameraPreset");
|
||||||
/*mCameraPreset = (ECameraPreset) gSavedSettings.getU32("CameraPreset");
|
|
||||||
|
|
||||||
mCameraOffsetInitial[CAMERA_PRESET_REAR_VIEW] = gSavedSettings.getControl("CameraOffsetRearView");
|
mCameraOffsetInitial[CAMERA_PRESET_REAR_VIEW] = gSavedSettings.getControl("CameraOffsetRearView");
|
||||||
mCameraOffsetInitial[CAMERA_PRESET_FRONT_VIEW] = gSavedSettings.getControl("CameraOffsetFrontView");
|
mCameraOffsetInitial[CAMERA_PRESET_FRONT_VIEW] = gSavedSettings.getControl("CameraOffsetFrontView");
|
||||||
@@ -221,7 +219,7 @@ void LLAgentCamera::init()
|
|||||||
|
|
||||||
mFocusOffsetInitial[CAMERA_PRESET_REAR_VIEW] = gSavedSettings.getControl("FocusOffsetRearView");
|
mFocusOffsetInitial[CAMERA_PRESET_REAR_VIEW] = gSavedSettings.getControl("FocusOffsetRearView");
|
||||||
mFocusOffsetInitial[CAMERA_PRESET_FRONT_VIEW] = gSavedSettings.getControl("FocusOffsetFrontView");
|
mFocusOffsetInitial[CAMERA_PRESET_FRONT_VIEW] = gSavedSettings.getControl("FocusOffsetFrontView");
|
||||||
mFocusOffsetInitial[CAMERA_PRESET_GROUP_VIEW] = gSavedSettings.getControl("FocusOffsetGroupView");*/
|
mFocusOffsetInitial[CAMERA_PRESET_GROUP_VIEW] = gSavedSettings.getControl("FocusOffsetGroupView");
|
||||||
|
|
||||||
mCameraCollidePlane.clearVec();
|
mCameraCollidePlane.clearVec();
|
||||||
mCurrentCameraDistance = getCameraOffsetInitial().magVec() * gSavedSettings.getF32("CameraOffsetScale");
|
mCurrentCameraDistance = getCameraOffsetInitial().magVec() * gSavedSettings.getF32("CameraOffsetScale");
|
||||||
@@ -1681,14 +1679,13 @@ LLVector3d LLAgentCamera::calcThirdPersonFocusOffset()
|
|||||||
{
|
{
|
||||||
// ...offset from avatar
|
// ...offset from avatar
|
||||||
LLVector3d focus_offset;
|
LLVector3d focus_offset;
|
||||||
focus_offset.setVec(gSavedSettings.getVector3("FocusOffsetDefault"));
|
|
||||||
LLQuaternion agent_rot = gAgent.getFrameAgent().getQuaternion();
|
LLQuaternion agent_rot = gAgent.getFrameAgent().getQuaternion();
|
||||||
if (isAgentAvatarValid() && gAgentAvatarp->getParent())
|
if (isAgentAvatarValid() && gAgentAvatarp->getParent())
|
||||||
{
|
{
|
||||||
agent_rot *= ((LLViewerObject*)(gAgentAvatarp->getParent()))->getRenderRotation();
|
agent_rot *= ((LLViewerObject*)(gAgentAvatarp->getParent()))->getRenderRotation();
|
||||||
}
|
}
|
||||||
|
|
||||||
//focus_offset = convert_from_llsd<LLVector3d>(mFocusOffsetInitial[mCameraPreset]->get(), TYPE_VEC3D, "");
|
focus_offset = convert_from_llsd<LLVector3d>(mFocusOffsetInitial[mCameraPreset]->get(), TYPE_VEC3D, "");
|
||||||
return focus_offset * agent_rot;
|
return focus_offset * agent_rot;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2023,8 +2020,7 @@ LLVector3d LLAgentCamera::calcCameraPositionTargetGlobal(BOOL *hit_limit)
|
|||||||
|
|
||||||
LLVector3 LLAgentCamera::getCameraOffsetInitial()
|
LLVector3 LLAgentCamera::getCameraOffsetInitial()
|
||||||
{
|
{
|
||||||
//return convert_from_llsd<LLVector3>(mCameraOffsetInitial[mCameraPreset]->get(), TYPE_VEC3, "");
|
return convert_from_llsd<LLVector3>(mCameraOffsetInitial[mCameraPreset]->get(), TYPE_VEC3, "");
|
||||||
return mCameraOffsetDefault;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -2449,7 +2445,7 @@ void LLAgentCamera::changeCameraToCustomizeAvatar()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/*void LLAgentCamera::switchCameraPreset(ECameraPreset preset)
|
void LLAgentCamera::switchCameraPreset(ECameraPreset preset)
|
||||||
{
|
{
|
||||||
//zoom is supposed to be reset for the front and group views
|
//zoom is supposed to be reset for the front and group views
|
||||||
mCameraZoomFraction = 1.f;
|
mCameraZoomFraction = 1.f;
|
||||||
@@ -2460,7 +2456,7 @@ void LLAgentCamera::changeCameraToCustomizeAvatar()
|
|||||||
mCameraPreset = preset;
|
mCameraPreset = preset;
|
||||||
|
|
||||||
gSavedSettings.setU32("CameraPreset", mCameraPreset);
|
gSavedSettings.setU32("CameraPreset", mCameraPreset);
|
||||||
}*/
|
}
|
||||||
|
|
||||||
|
|
||||||
//
|
//
|
||||||
|
|||||||
@@ -46,6 +46,19 @@ enum ECameraMode
|
|||||||
CAMERA_MODE_FOLLOW
|
CAMERA_MODE_FOLLOW
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/** Camera Presets for CAMERA_MODE_THIRD_PERSON */
|
||||||
|
enum ECameraPreset
|
||||||
|
{
|
||||||
|
/** Default preset, what the Third Person Mode actually was */
|
||||||
|
CAMERA_PRESET_REAR_VIEW,
|
||||||
|
|
||||||
|
/** "Looking at the Avatar from the front" */
|
||||||
|
CAMERA_PRESET_FRONT_VIEW,
|
||||||
|
|
||||||
|
/** "Above and to the left, over the shoulder, pulled back a little on the zoom" */
|
||||||
|
CAMERA_PRESET_GROUP_VIEW
|
||||||
|
};
|
||||||
|
|
||||||
//------------------------------------------------------------------------
|
//------------------------------------------------------------------------
|
||||||
// LLAgentCamera
|
// LLAgentCamera
|
||||||
//------------------------------------------------------------------------
|
//------------------------------------------------------------------------
|
||||||
@@ -94,9 +107,28 @@ private:
|
|||||||
ECameraMode mCameraMode; // Target mode after transition animation is done
|
ECameraMode mCameraMode; // Target mode after transition animation is done
|
||||||
ECameraMode mLastCameraMode;
|
ECameraMode mLastCameraMode;
|
||||||
F32 mUIOffset;
|
F32 mUIOffset;
|
||||||
|
|
||||||
|
//--------------------------------------------------------------------
|
||||||
|
// Preset
|
||||||
|
//--------------------------------------------------------------------
|
||||||
|
public:
|
||||||
|
void switchCameraPreset(ECameraPreset preset);
|
||||||
|
private:
|
||||||
/** Determines default camera offset depending on the current camera preset */
|
/** Determines default camera offset depending on the current camera preset */
|
||||||
LLVector3 getCameraOffsetInitial();
|
LLVector3 getCameraOffsetInitial();
|
||||||
|
|
||||||
|
/** Camera preset in Third Person Mode */
|
||||||
|
ECameraPreset mCameraPreset;
|
||||||
|
|
||||||
|
/** Initial camera offsets */
|
||||||
|
std::map<ECameraPreset, LLPointer<LLControlVariable> > mCameraOffsetInitial;
|
||||||
|
|
||||||
|
/** Initial focus offsets */
|
||||||
|
std::map<ECameraPreset, LLPointer<LLControlVariable> > mFocusOffsetInitial;
|
||||||
|
|
||||||
|
//--------------------------------------------------------------------
|
||||||
|
// Position
|
||||||
|
//--------------------------------------------------------------------
|
||||||
public:
|
public:
|
||||||
LLVector3d getCameraPositionGlobal() const;
|
LLVector3d getCameraPositionGlobal() const;
|
||||||
const LLVector3 &getCameraPositionAgent() const;
|
const LLVector3 &getCameraPositionAgent() const;
|
||||||
@@ -185,7 +217,6 @@ public:
|
|||||||
private:
|
private:
|
||||||
LLVector3d mCameraFocusOffset; // Offset from focus point in build mode
|
LLVector3d mCameraFocusOffset; // Offset from focus point in build mode
|
||||||
LLVector3d mCameraFocusOffsetTarget; // Target towards which we are lerping the camera's focus offset
|
LLVector3d mCameraFocusOffsetTarget; // Target towards which we are lerping the camera's focus offset
|
||||||
LLVector3 mCameraOffsetDefault;
|
|
||||||
BOOL mFocusOnAvatar;
|
BOOL mFocusOnAvatar;
|
||||||
LLVector3d mFocusGlobal;
|
LLVector3d mFocusGlobal;
|
||||||
LLVector3d mFocusTargetGlobal;
|
LLVector3d mFocusTargetGlobal;
|
||||||
|
|||||||
@@ -724,6 +724,8 @@ bool LLAppViewer::init()
|
|||||||
&LLURLDispatcher::dispatchFromTextEditor,
|
&LLURLDispatcher::dispatchFromTextEditor,
|
||||||
&LLURLDispatcher::dispatchFromTextEditor);
|
&LLURLDispatcher::dispatchFromTextEditor);
|
||||||
|
|
||||||
|
LLToolMgr::getInstance(); // Initialize tool manager if not already instantiated
|
||||||
|
|
||||||
/////////////////////////////////////////////////
|
/////////////////////////////////////////////////
|
||||||
//
|
//
|
||||||
// Load settings files
|
// Load settings files
|
||||||
|
|||||||
@@ -102,7 +102,6 @@ const std::string PANEL_NAMES[LLFloaterTools::PANEL_COUNT] =
|
|||||||
};
|
};
|
||||||
|
|
||||||
// Local prototypes
|
// Local prototypes
|
||||||
void commit_select_tool(LLUICtrl *ctrl, void *data);
|
|
||||||
void commit_select_component(LLUICtrl *ctrl, void *data);
|
void commit_select_component(LLUICtrl *ctrl, void *data);
|
||||||
void click_show_more(void*);
|
void click_show_more(void*);
|
||||||
void click_popup_info(void*);
|
void click_popup_info(void*);
|
||||||
@@ -123,6 +122,7 @@ void commit_radio_orbit(LLUICtrl *, void*);
|
|||||||
void commit_radio_pan(LLUICtrl *, void*);
|
void commit_radio_pan(LLUICtrl *, void*);
|
||||||
void commit_grid_mode(LLUICtrl *, void*);
|
void commit_grid_mode(LLUICtrl *, void*);
|
||||||
void commit_slider_zoom(LLUICtrl *, void*);
|
void commit_slider_zoom(LLUICtrl *, void*);
|
||||||
|
void commit_select_tool(LLUICtrl *ctrl, void *data);
|
||||||
|
|
||||||
|
|
||||||
//static
|
//static
|
||||||
@@ -254,15 +254,15 @@ BOOL LLFloaterTools::postBuild()
|
|||||||
mRadioSpin = getChild<LLCheckBoxCtrl>("radio spin");
|
mRadioSpin = getChild<LLCheckBoxCtrl>("radio spin");
|
||||||
childSetCommitCallback("radio spin",click_popup_grab_spin,NULL);
|
childSetCommitCallback("radio spin",click_popup_grab_spin,NULL);
|
||||||
mRadioPosition = getChild<LLCheckBoxCtrl>("radio position");
|
mRadioPosition = getChild<LLCheckBoxCtrl>("radio position");
|
||||||
childSetCommitCallback("radio position",commit_select_tool,LLToolCompTranslate::getInstance());
|
childSetCommitCallback("radio position",commit_select_tool,NULL);
|
||||||
mRadioRotate = getChild<LLCheckBoxCtrl>("radio rotate");
|
mRadioRotate = getChild<LLCheckBoxCtrl>("radio rotate");
|
||||||
childSetCommitCallback("radio rotate",commit_select_tool,LLToolCompRotate::getInstance());
|
childSetCommitCallback("radio rotate",commit_select_tool,NULL);
|
||||||
mRadioStretch = getChild<LLCheckBoxCtrl>("radio stretch");
|
mRadioStretch = getChild<LLCheckBoxCtrl>("radio stretch");
|
||||||
childSetCommitCallback("radio stretch",commit_select_tool,LLToolCompScale::getInstance());
|
childSetCommitCallback("radio stretch",commit_select_tool,NULL);
|
||||||
mRadioSelectFace = getChild<LLCheckBoxCtrl>("radio select face");
|
mRadioSelectFace = getChild<LLCheckBoxCtrl>("radio select face");
|
||||||
childSetCommitCallback("radio select face",commit_select_tool,LLToolFace::getInstance());
|
childSetCommitCallback("radio select face",commit_select_tool,NULL);
|
||||||
mRadioAlign = getChild<LLCheckBoxCtrl>("radio align");
|
mRadioAlign = getChild<LLCheckBoxCtrl>("radio align");
|
||||||
childSetCommitCallback("radio align",commit_select_tool,QToolAlign::getInstance());
|
childSetCommitCallback("radio align",commit_select_tool,NULL);
|
||||||
mCheckSelectIndividual = getChild<LLCheckBoxCtrl>("checkbox edit linked parts");
|
mCheckSelectIndividual = getChild<LLCheckBoxCtrl>("checkbox edit linked parts");
|
||||||
childSetValue("checkbox edit linked parts",(BOOL)gSavedSettings.getBOOL("EditLinkedParts"));
|
childSetValue("checkbox edit linked parts",(BOOL)gSavedSettings.getBOOL("EditLinkedParts"));
|
||||||
childSetCommitCallback("checkbox edit linked parts",commit_select_component,this);
|
childSetCommitCallback("checkbox edit linked parts",commit_select_component,this);
|
||||||
@@ -307,7 +307,7 @@ BOOL LLFloaterTools::postBuild()
|
|||||||
mCheckCopyRotates = getChild<LLCheckBoxCtrl>("checkbox copy rotates");
|
mCheckCopyRotates = getChild<LLCheckBoxCtrl>("checkbox copy rotates");
|
||||||
childSetValue("checkbox copy rotates",(BOOL)gSavedSettings.getBOOL("CreateToolCopyRotates"));
|
childSetValue("checkbox copy rotates",(BOOL)gSavedSettings.getBOOL("CreateToolCopyRotates"));
|
||||||
mRadioSelectLand = getChild<LLCheckBoxCtrl>("radio select land");
|
mRadioSelectLand = getChild<LLCheckBoxCtrl>("radio select land");
|
||||||
childSetCommitCallback("radio select land",commit_select_tool, LLToolSelectLand::getInstance());
|
childSetCommitCallback("radio select land",commit_select_tool, NULL);
|
||||||
mRadioDozerFlatten = getChild<LLCheckBoxCtrl>("radio flatten");
|
mRadioDozerFlatten = getChild<LLCheckBoxCtrl>("radio flatten");
|
||||||
childSetCommitCallback("radio flatten",click_popup_dozer_mode, (void*)0);
|
childSetCommitCallback("radio flatten",click_popup_dozer_mode, (void*)0);
|
||||||
mRadioDozerRaise = getChild<LLCheckBoxCtrl>("radio raise");
|
mRadioDozerRaise = getChild<LLCheckBoxCtrl>("radio raise");
|
||||||
@@ -997,7 +997,33 @@ void click_apply_to_selection(void* user)
|
|||||||
void commit_select_tool(LLUICtrl *ctrl, void *data)
|
void commit_select_tool(LLUICtrl *ctrl, void *data)
|
||||||
{
|
{
|
||||||
S32 show_owners = gSavedSettings.getBOOL("ShowParcelOwners");
|
S32 show_owners = gSavedSettings.getBOOL("ShowParcelOwners");
|
||||||
gFloaterTools->setEditTool(data);
|
|
||||||
|
LLCheckBoxCtrl* group = (LLCheckBoxCtrl*)ctrl;
|
||||||
|
std::string selected = group->getValue().asString();
|
||||||
|
if (selected == "radio position")
|
||||||
|
{
|
||||||
|
LLFloaterTools::setEditTool( LLToolCompTranslate::getInstance() );
|
||||||
|
}
|
||||||
|
else if (selected == "radio rotate")
|
||||||
|
{
|
||||||
|
LLFloaterTools::setEditTool( LLToolCompRotate::getInstance() );
|
||||||
|
}
|
||||||
|
else if (selected == "radio stretch")
|
||||||
|
{
|
||||||
|
LLFloaterTools::setEditTool( LLToolCompScale::getInstance() );
|
||||||
|
}
|
||||||
|
else if (selected == "radio select face")
|
||||||
|
{
|
||||||
|
LLFloaterTools::setEditTool( LLToolFace::getInstance() );
|
||||||
|
}
|
||||||
|
else if (selected == "radio align")
|
||||||
|
{
|
||||||
|
LLFloaterTools::setEditTool( QToolAlign::getInstance() );
|
||||||
|
}
|
||||||
|
else if (selected == "radio select land")
|
||||||
|
{
|
||||||
|
LLFloaterTools::setEditTool( LLToolSelectLand::getInstance());
|
||||||
|
}
|
||||||
gSavedSettings.setBOOL("ShowParcelOwners", show_owners);
|
gSavedSettings.setBOOL("ShowParcelOwners", show_owners);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1051,7 +1077,8 @@ void LLFloaterTools::onClickGridOptions(void* data)
|
|||||||
|
|
||||||
void LLFloaterTools::setEditTool(void* tool_pointer)
|
void LLFloaterTools::setEditTool(void* tool_pointer)
|
||||||
{
|
{
|
||||||
select_tool(tool_pointer);
|
LLTool *tool = (LLTool *)tool_pointer;
|
||||||
|
LLToolMgr::getInstance()->getCurrentToolset()->selectTool( tool );
|
||||||
}
|
}
|
||||||
|
|
||||||
void LLFloaterTools::onFocusReceived()
|
void LLFloaterTools::onFocusReceived()
|
||||||
|
|||||||
@@ -537,7 +537,7 @@ void LLToolBar::onClickDirectory(void*)
|
|||||||
// static
|
// static
|
||||||
void LLToolBar::onClickBuild(void*)
|
void LLToolBar::onClickBuild(void*)
|
||||||
{
|
{
|
||||||
toggle_build_mode();
|
LLToolMgr::getInstance()->toggleBuildMode();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -51,10 +51,18 @@
|
|||||||
#include "lltoolselectland.h"
|
#include "lltoolselectland.h"
|
||||||
#include "lltoolobjpicker.h"
|
#include "lltoolobjpicker.h"
|
||||||
#include "lltoolpipette.h"
|
#include "lltoolpipette.h"
|
||||||
#include "llviewerparcelmgr.h"
|
|
||||||
#include "llagent.h"
|
#include "llagent.h"
|
||||||
#include "llagentcamera.h"
|
#include "llagentcamera.h"
|
||||||
#include "llviewercontrol.h"
|
#include "llviewercontrol.h"
|
||||||
|
#include "llmemberlistener.h"
|
||||||
|
#include "llevent.h"
|
||||||
|
#include "llviewerjoystick.h"
|
||||||
|
#include "llviewermenu.h"
|
||||||
|
#include "llviewerparcelmgr.h"
|
||||||
|
#include "llfirstuse.h"
|
||||||
|
#include "llfloatertools.h"
|
||||||
|
|
||||||
|
#include "rlvhandler.h"
|
||||||
|
|
||||||
|
|
||||||
// Used when app not active to avoid processing hover.
|
// Used when app not active to avoid processing hover.
|
||||||
@@ -69,6 +77,24 @@ LLToolset* gFaceEditToolset = NULL;
|
|||||||
/////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////
|
||||||
// LLToolMgr
|
// LLToolMgr
|
||||||
|
|
||||||
|
class LLViewBuildMode : public LLMemberListener<LLView>
|
||||||
|
{
|
||||||
|
bool handleEvent(LLPointer<LLOldEvents::LLEvent> event, const LLSD& userdata)
|
||||||
|
{
|
||||||
|
LLToolMgr::getInstance()->toggleBuildMode();
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
class LLViewCheckBuildMode : public LLMemberListener<LLView>
|
||||||
|
{
|
||||||
|
bool handleEvent(LLPointer<LLOldEvents::LLEvent> event, const LLSD& userdata)
|
||||||
|
{
|
||||||
|
bool new_value = LLToolMgr::getInstance()->inEdit();
|
||||||
|
gMenuHolder->findControl(userdata["control"].asString())->setValue(new_value);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
LLToolMgr::LLToolMgr()
|
LLToolMgr::LLToolMgr()
|
||||||
:
|
:
|
||||||
mBaseTool(NULL),
|
mBaseTool(NULL),
|
||||||
@@ -88,6 +114,14 @@ LLToolMgr::LLToolMgr()
|
|||||||
gFaceEditToolset = new LLToolset("FaceEdit");
|
gFaceEditToolset = new LLToolset("FaceEdit");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void LLToolMgr::initMenu(std::vector<LLPointer<LLMemberListener<LLView> > >& menu_list)
|
||||||
|
{
|
||||||
|
menu_list.push_back(new LLViewBuildMode());
|
||||||
|
menu_list.back()->registerListener(gMenuHolder, "View.BuildMode");
|
||||||
|
menu_list.push_back(new LLViewCheckBuildMode());
|
||||||
|
menu_list.back()->registerListener(gMenuHolder, "View.CheckBuildMode");
|
||||||
|
}
|
||||||
|
|
||||||
void LLToolMgr::initTools()
|
void LLToolMgr::initTools()
|
||||||
{
|
{
|
||||||
static BOOL initialized = FALSE;
|
static BOOL initialized = FALSE;
|
||||||
@@ -236,7 +270,7 @@ void LLToolMgr::updateToolStatus()
|
|||||||
getCurrentTool();
|
getCurrentTool();
|
||||||
}
|
}
|
||||||
|
|
||||||
BOOL LLToolMgr::inEdit()
|
bool LLToolMgr::inEdit()
|
||||||
{
|
{
|
||||||
return mBaseTool != LLToolPie::getInstance() && mBaseTool != gToolNull;
|
return mBaseTool != LLToolPie::getInstance() && mBaseTool != gToolNull;
|
||||||
}
|
}
|
||||||
@@ -245,6 +279,77 @@ bool LLToolMgr::canEdit()
|
|||||||
{
|
{
|
||||||
return LLViewerParcelMgr::getInstance()->allowAgentBuild();
|
return LLViewerParcelMgr::getInstance()->allowAgentBuild();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void LLToolMgr::toggleBuildMode()
|
||||||
|
{
|
||||||
|
if (!inBuildMode())
|
||||||
|
{
|
||||||
|
ECameraMode camMode = gAgentCamera.getCameraMode();
|
||||||
|
if (CAMERA_MODE_MOUSELOOK == camMode || CAMERA_MODE_CUSTOMIZE_AVATAR == camMode)
|
||||||
|
{
|
||||||
|
// pull the user out of mouselook or appearance mode when entering build mode
|
||||||
|
handle_reset_view();
|
||||||
|
}
|
||||||
|
|
||||||
|
if (gSavedSettings.getBOOL("EditCameraMovement"))
|
||||||
|
{
|
||||||
|
// camera should be set
|
||||||
|
if (LLViewerJoystick::getInstance()->getOverrideCamera())
|
||||||
|
{
|
||||||
|
handle_toggle_flycam();
|
||||||
|
}
|
||||||
|
|
||||||
|
if (gAgentCamera.getFocusOnAvatar())
|
||||||
|
{
|
||||||
|
// zoom in if we're looking at the avatar
|
||||||
|
gAgentCamera.setFocusOnAvatar(FALSE, ANIMATE);
|
||||||
|
gAgentCamera.setFocusGlobal(gAgent.getPositionGlobal() + 2.0 * LLVector3d(gAgent.getAtAxis()));
|
||||||
|
gAgentCamera.cameraZoomIn(0.666f);
|
||||||
|
gAgentCamera.cameraOrbitOver( 30.f * DEG_TO_RAD );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// [RLVa:KB] - Checked: 2009-07-05 (RLVa-1.0.0b)
|
||||||
|
bool fRlvCanEdit = (!gRlvHandler.hasBehaviour(RLV_BHVR_EDIT)) && (!gRlvHandler.hasBehaviour(RLV_BHVR_EDITOBJ));
|
||||||
|
if (!fRlvCanEdit)
|
||||||
|
{
|
||||||
|
LLObjectSelectionHandle hSel = LLSelectMgr::getInstance()->getSelection();
|
||||||
|
RlvSelectIsEditable f;
|
||||||
|
if ((hSel.notNull()) && ((hSel->getFirstRootNode(&f, TRUE)) != NULL))
|
||||||
|
LLSelectMgr::getInstance()->deselectAll();
|
||||||
|
}
|
||||||
|
// [/RLVa:KB]
|
||||||
|
|
||||||
|
setCurrentToolset(gBasicToolset);
|
||||||
|
getCurrentToolset()->selectTool( LLToolCompCreate::getInstance() );
|
||||||
|
|
||||||
|
// Could be first use
|
||||||
|
LLFirstUse::useBuild();
|
||||||
|
|
||||||
|
gAgentCamera.resetView(false);
|
||||||
|
|
||||||
|
// avoid spurious avatar movements
|
||||||
|
LLViewerJoystick::getInstance()->setNeedsReset();
|
||||||
|
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (gSavedSettings.getBOOL("EditCameraMovement"))
|
||||||
|
{
|
||||||
|
// just reset the view, will pull us out of edit mode
|
||||||
|
handle_reset_view();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// manually disable edit mode, but do not affect the camera
|
||||||
|
gAgentCamera.resetView(false);
|
||||||
|
gFloaterTools->close();
|
||||||
|
gViewerWindow->showCursor();
|
||||||
|
}
|
||||||
|
// avoid spurious avatar movements pulling out of edit mode
|
||||||
|
LLViewerJoystick::getInstance()->setNeedsReset();
|
||||||
|
}
|
||||||
|
}
|
||||||
bool LLToolMgr::inBuildMode()
|
bool LLToolMgr::inBuildMode()
|
||||||
{
|
{
|
||||||
// when entering mouselook inEdit() immediately returns true before
|
// when entering mouselook inEdit() immediately returns true before
|
||||||
@@ -408,9 +513,3 @@ void LLToolset::selectPrevTool()
|
|||||||
selectToolByIndex((S32)mToolList.size()-1);
|
selectToolByIndex((S32)mToolList.size()-1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void select_tool( void *tool_pointer )
|
|
||||||
{
|
|
||||||
LLTool *tool = (LLTool *)tool_pointer;
|
|
||||||
LLToolMgr::getInstance()->getCurrentToolset()->selectTool( tool );
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -35,8 +35,11 @@
|
|||||||
|
|
||||||
#include "llkeyboard.h"
|
#include "llkeyboard.h"
|
||||||
|
|
||||||
|
#include "llmemberlistener.h"
|
||||||
|
|
||||||
class LLTool;
|
class LLTool;
|
||||||
class LLToolset;
|
class LLToolset;
|
||||||
|
class LLView;
|
||||||
|
|
||||||
// Key bindings for common operations
|
// Key bindings for common operations
|
||||||
const MASK MASK_VERTICAL = MASK_CONTROL;
|
const MASK MASK_VERTICAL = MASK_CONTROL;
|
||||||
@@ -52,14 +55,17 @@ public:
|
|||||||
LLToolMgr();
|
LLToolMgr();
|
||||||
~LLToolMgr();
|
~LLToolMgr();
|
||||||
|
|
||||||
|
void initMenu(std::vector<LLPointer<LLMemberListener<LLView> > >& menu_list);
|
||||||
|
|
||||||
// Must be called after gSavedSettings set up.
|
// Must be called after gSavedSettings set up.
|
||||||
void initTools();
|
void initTools();
|
||||||
|
|
||||||
LLTool* getCurrentTool(); // returns active tool, taking into account keyboard state
|
LLTool* getCurrentTool(); // returns active tool, taking into account keyboard state
|
||||||
LLTool* getBaseTool(); // returns active tool when overrides are deactivated
|
LLTool* getBaseTool(); // returns active tool when overrides are deactivated
|
||||||
|
|
||||||
BOOL inEdit();
|
bool inEdit();
|
||||||
bool canEdit();
|
bool canEdit();
|
||||||
|
void toggleBuildMode();
|
||||||
|
|
||||||
/* Determines if we are in Build mode or not. */
|
/* Determines if we are in Build mode or not. */
|
||||||
bool inBuildMode();
|
bool inBuildMode();
|
||||||
@@ -118,10 +124,6 @@ protected:
|
|||||||
tool_list_t mToolList;
|
tool_list_t mToolList;
|
||||||
};
|
};
|
||||||
|
|
||||||
// Handy callbacks for switching tools
|
|
||||||
void select_tool(void *tool);
|
|
||||||
|
|
||||||
|
|
||||||
// Globals
|
// Globals
|
||||||
|
|
||||||
extern LLToolset* gBasicToolset;
|
extern LLToolset* gBasicToolset;
|
||||||
|
|||||||
@@ -75,7 +75,7 @@
|
|||||||
#include "rlvhandler.h"
|
#include "rlvhandler.h"
|
||||||
// [/RLVa:KB]
|
// [/RLVa:KB]
|
||||||
|
|
||||||
extern void handle_buy(void*);
|
extern void handle_buy();
|
||||||
|
|
||||||
extern BOOL gDebugClicks;
|
extern BOOL gDebugClicks;
|
||||||
|
|
||||||
@@ -627,7 +627,7 @@ void LLToolPie::selectionPropertiesReceived()
|
|||||||
switch (click_action)
|
switch (click_action)
|
||||||
{
|
{
|
||||||
case CLICK_ACTION_BUY:
|
case CLICK_ACTION_BUY:
|
||||||
handle_buy(NULL);
|
handle_buy();
|
||||||
break;
|
break;
|
||||||
case CLICK_ACTION_PAY:
|
case CLICK_ACTION_PAY:
|
||||||
handle_give_money_dialog();
|
handle_give_money_dialog();
|
||||||
|
|||||||
@@ -344,7 +344,6 @@ typedef LLMemberListener<LLView> view_listener_t;
|
|||||||
//
|
//
|
||||||
// Local prototypes
|
// Local prototypes
|
||||||
//
|
//
|
||||||
void handle_leave_group(void *);
|
|
||||||
|
|
||||||
// File Menu
|
// File Menu
|
||||||
void handle_compress_image(void*);
|
void handle_compress_image(void*);
|
||||||
@@ -368,37 +367,34 @@ void handle_region_clear_temp_asset_data(void*);
|
|||||||
BOOL sitting_on_selection();
|
BOOL sitting_on_selection();
|
||||||
|
|
||||||
void near_sit_object();
|
void near_sit_object();
|
||||||
void label_sit_or_stand(std::string& label, void*);
|
//void label_sit_or_stand(std::string& label, void*);
|
||||||
// buy and take alias into the same UI positions, so these
|
// buy and take alias into the same UI positions, so these
|
||||||
// declarations handle this mess.
|
// declarations handle this mess.
|
||||||
BOOL is_selection_buy_not_take();
|
BOOL is_selection_buy_not_take();
|
||||||
S32 selection_price();
|
S32 selection_price();
|
||||||
BOOL enable_take();
|
BOOL enable_take();
|
||||||
void handle_take();
|
void handle_take();
|
||||||
bool confirm_take(const LLSD& notification, const LLSD& response);
|
bool confirm_take(const LLSD& notification, const LLSD& response, LLObjectSelectionHandle selection_handle);
|
||||||
BOOL enable_buy(void*);
|
|
||||||
void handle_buy(void *);
|
|
||||||
void handle_buy_object(LLSaleInfo sale_info);
|
void handle_buy_object(LLSaleInfo sale_info);
|
||||||
void handle_buy_contents(LLSaleInfo sale_info);
|
void handle_buy_contents(LLSaleInfo sale_info);
|
||||||
void label_touch(std::string& label, void*);
|
|
||||||
|
bool for_sale_selection(LLSelectNode* nodep);
|
||||||
|
|
||||||
// Land pie menu
|
// Land pie menu
|
||||||
void near_sit_down_point(BOOL success, void *);
|
void near_sit_down_point(BOOL success, void *);
|
||||||
|
|
||||||
// Avatar pie menu
|
// Avatar pie menu
|
||||||
void handle_follow(void *userdata);
|
|
||||||
void handle_talk_to(void *userdata);
|
void handle_talk_to(void *userdata);
|
||||||
|
|
||||||
// Debug menu
|
// Debug menu
|
||||||
void show_permissions_control(void*);
|
|
||||||
void toggle_build_options(void* user_data);
|
|
||||||
void reload_ui(void*);
|
|
||||||
void handle_agent_stop_moving(void*);
|
void handle_agent_stop_moving(void*);
|
||||||
void print_packets_lost(void*);
|
void print_packets_lost(void*);
|
||||||
void drop_packet(void*);
|
void drop_packet(void*);
|
||||||
void velocity_interpolate( void* data );
|
void velocity_interpolate( void* data );
|
||||||
void toggle_wind_audio(void);
|
void toggle_wind_audio(void);
|
||||||
void toggle_water_audio(void);
|
|
||||||
void handle_rebake_textures(void*);
|
void handle_rebake_textures(void*);
|
||||||
BOOL check_admin_override(void*);
|
BOOL check_admin_override(void*);
|
||||||
void handle_admin_override_toggle(void*);
|
void handle_admin_override_toggle(void*);
|
||||||
@@ -407,14 +403,6 @@ void handle_toggle_hacked_godmode(void*);
|
|||||||
BOOL check_toggle_hacked_godmode(void*);
|
BOOL check_toggle_hacked_godmode(void*);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
void toggle_glow(void *);
|
|
||||||
BOOL check_glow(void *);
|
|
||||||
|
|
||||||
void toggle_vertex_shaders(void *);
|
|
||||||
BOOL check_vertex_shaders(void *);
|
|
||||||
|
|
||||||
void toggle_cull_small(void *);
|
|
||||||
|
|
||||||
void toggle_show_xui_names(void *);
|
void toggle_show_xui_names(void *);
|
||||||
BOOL check_show_xui_names(void *);
|
BOOL check_show_xui_names(void *);
|
||||||
|
|
||||||
@@ -568,14 +556,8 @@ void handle_crash(void*);
|
|||||||
void handle_dump_followcam(void*);
|
void handle_dump_followcam(void*);
|
||||||
void handle_viewer_enable_message_log(void*);
|
void handle_viewer_enable_message_log(void*);
|
||||||
void handle_viewer_disable_message_log(void*);
|
void handle_viewer_disable_message_log(void*);
|
||||||
void handle_send_postcard(void*);
|
|
||||||
void handle_gestures_old(void*);
|
|
||||||
void handle_focus(void *);
|
|
||||||
BOOL enable_buy_land(void*);
|
BOOL enable_buy_land(void*);
|
||||||
void handle_move(void*);
|
|
||||||
void handle_show_inventory(void*);
|
|
||||||
void handle_activate(void*);
|
|
||||||
BOOL enable_activate(void*);
|
|
||||||
|
|
||||||
// Help menu
|
// Help menu
|
||||||
void handle_buy_currency(void*);
|
void handle_buy_currency(void*);
|
||||||
@@ -687,6 +669,8 @@ void set_underclothes_menu_options()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static std::vector<LLPointer<view_listener_t> > sMenus;
|
||||||
|
|
||||||
void init_menus()
|
void init_menus()
|
||||||
{
|
{
|
||||||
S32 top = gViewerWindow->getRootView()->getRect().getHeight();
|
S32 top = gViewerWindow->getRootView()->getRect().getHeight();
|
||||||
@@ -892,6 +876,7 @@ void init_menus()
|
|||||||
|
|
||||||
gMenuHolder->addChild(gLoginMenuBarView);
|
gMenuHolder->addChild(gLoginMenuBarView);
|
||||||
|
|
||||||
|
LLToolMgr::getInstance()->initMenu(sMenus);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -900,8 +885,6 @@ void init_client_menu(LLMenuGL* menu)
|
|||||||
{
|
{
|
||||||
LLMenuGL* sub_menu = NULL;
|
LLMenuGL* sub_menu = NULL;
|
||||||
|
|
||||||
//menu->addChild(new LLMenuItemCallGL("Permissions Control", &show_permissions_control));
|
|
||||||
// this is now in the view menu so we don't need it here!
|
|
||||||
|
|
||||||
{
|
{
|
||||||
// *TODO: Translate
|
// *TODO: Translate
|
||||||
@@ -1544,7 +1527,6 @@ void init_debug_rendering_menu(LLMenuGL* menu)
|
|||||||
|
|
||||||
menu->addSeparator();
|
menu->addSeparator();
|
||||||
menu->addChild(new LLMenuItemCheckGL("Axes", menu_toggle_control, NULL, menu_check_control, (void*)"ShowAxes"));
|
menu->addChild(new LLMenuItemCheckGL("Axes", menu_toggle_control, NULL, menu_check_control, (void*)"ShowAxes"));
|
||||||
//menu->addChild(new LLMenuItemCheckGL("Cull Small Objects", toggle_cull_small, NULL, menu_check_control, (void*)"RenderCullBySize"));
|
|
||||||
|
|
||||||
menu->addSeparator();
|
menu->addSeparator();
|
||||||
menu->addChild(new LLMenuItemCheckGL("Hide Selected", menu_toggle_control, NULL, menu_check_control, (void*)"HideSelectedObjects"));
|
menu->addChild(new LLMenuItemCheckGL("Hide Selected", menu_toggle_control, NULL, menu_check_control, (void*)"HideSelectedObjects"));
|
||||||
@@ -1809,8 +1791,6 @@ void init_server_menu(LLMenuGL* menu)
|
|||||||
menu->createJumpKeys();
|
menu->createJumpKeys();
|
||||||
}
|
}
|
||||||
|
|
||||||
static std::vector<LLPointer<view_listener_t> > sMenus;
|
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
// cleanup_menus()
|
// cleanup_menus()
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
@@ -1968,18 +1948,19 @@ class LLObjectEnableTouch : public view_listener_t
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
void label_touch(std::string& label, void*)
|
|
||||||
{
|
//void label_touch(std::string& label, void*)
|
||||||
LLSelectNode* node = LLSelectMgr::getInstance()->getSelection()->getFirstRootNode();
|
//{
|
||||||
if (node && node->mValid && !node->mTouchName.empty())
|
// LLSelectNode* node = LLSelectMgr::getInstance()->getSelection()->getFirstRootNode();
|
||||||
{
|
// if (node && node->mValid && !node->mTouchName.empty())
|
||||||
label.assign(node->mTouchName);
|
// {
|
||||||
}
|
// label.assign(node->mTouchName);
|
||||||
else
|
// }
|
||||||
{
|
// else
|
||||||
label.assign("Touch");
|
// {
|
||||||
}
|
// label.assign("Touch");
|
||||||
}
|
// }
|
||||||
|
//}
|
||||||
|
|
||||||
bool handle_object_open()
|
bool handle_object_open()
|
||||||
{
|
{
|
||||||
@@ -2028,95 +2009,7 @@ class LLObjectEnableOpen : public view_listener_t
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
class LLViewCheckBuildMode : public view_listener_t
|
|
||||||
{
|
|
||||||
bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
|
|
||||||
{
|
|
||||||
bool new_value = LLToolMgr::getInstance()->inEdit();
|
|
||||||
gMenuHolder->findControl(userdata["control"].asString())->setValue(new_value);
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
bool toggle_build_mode()
|
|
||||||
{
|
|
||||||
if (LLToolMgr::getInstance()->inBuildMode())
|
|
||||||
{
|
|
||||||
if (gSavedSettings.getBOOL("EditCameraMovement"))
|
|
||||||
{
|
|
||||||
// just reset the view, will pull us out of edit mode
|
|
||||||
handle_reset_view();
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
// manually disable edit mode, but do not affect the camera
|
|
||||||
gAgentCamera.resetView(false);
|
|
||||||
gFloaterTools->close();
|
|
||||||
gViewerWindow->showCursor();
|
|
||||||
}
|
|
||||||
// avoid spurious avatar movements pulling out of edit mode
|
|
||||||
LLViewerJoystick::getInstance()->setNeedsReset();
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
ECameraMode camMode = gAgentCamera.getCameraMode();
|
|
||||||
if (CAMERA_MODE_MOUSELOOK == camMode || CAMERA_MODE_CUSTOMIZE_AVATAR == camMode)
|
|
||||||
{
|
|
||||||
// pull the user out of mouselook or appearance mode when entering build mode
|
|
||||||
handle_reset_view();
|
|
||||||
}
|
|
||||||
|
|
||||||
if (gSavedSettings.getBOOL("EditCameraMovement"))
|
|
||||||
{
|
|
||||||
// camera should be set
|
|
||||||
if (LLViewerJoystick::getInstance()->getOverrideCamera())
|
|
||||||
{
|
|
||||||
handle_toggle_flycam();
|
|
||||||
}
|
|
||||||
|
|
||||||
if (gAgentCamera.getFocusOnAvatar())
|
|
||||||
{
|
|
||||||
// zoom in if we're looking at the avatar
|
|
||||||
gAgentCamera.setFocusOnAvatar(FALSE, ANIMATE);
|
|
||||||
gAgentCamera.setFocusGlobal(gAgent.getPositionGlobal() + 2.0 * LLVector3d(gAgent.getAtAxis()));
|
|
||||||
gAgentCamera.cameraZoomIn(0.666f);
|
|
||||||
gAgentCamera.cameraOrbitOver( 30.f * DEG_TO_RAD );
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// [RLVa:KB] - Checked: 2009-07-05 (RLVa-1.0.0b)
|
|
||||||
bool fRlvCanEdit = (!gRlvHandler.hasBehaviour(RLV_BHVR_EDIT)) && (!gRlvHandler.hasBehaviour(RLV_BHVR_EDITOBJ));
|
|
||||||
if (!fRlvCanEdit)
|
|
||||||
{
|
|
||||||
LLObjectSelectionHandle hSel = LLSelectMgr::getInstance()->getSelection();
|
|
||||||
RlvSelectIsEditable f;
|
|
||||||
if ((hSel.notNull()) && ((hSel->getFirstRootNode(&f, TRUE)) != NULL))
|
|
||||||
LLSelectMgr::getInstance()->deselectAll();
|
|
||||||
}
|
|
||||||
// [/RLVa:KB]
|
|
||||||
|
|
||||||
LLToolMgr::getInstance()->setCurrentToolset(gBasicToolset);
|
|
||||||
LLToolMgr::getInstance()->getCurrentToolset()->selectTool( LLToolCompCreate::getInstance() );
|
|
||||||
|
|
||||||
// Could be first use
|
|
||||||
LLFirstUse::useBuild();
|
|
||||||
|
|
||||||
gAgentCamera.resetView(false);
|
|
||||||
|
|
||||||
// avoid spurious avatar movements
|
|
||||||
LLViewerJoystick::getInstance()->setNeedsReset();
|
|
||||||
|
|
||||||
}
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
class LLViewBuildMode : public view_listener_t
|
|
||||||
{
|
|
||||||
bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
|
|
||||||
{
|
|
||||||
return toggle_build_mode();
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
class LLViewJoystickFlycam : public view_listener_t
|
class LLViewJoystickFlycam : public view_listener_t
|
||||||
@@ -2517,15 +2410,18 @@ BOOL enable_has_attachments(void*)
|
|||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
// Avatar pie menu
|
// Avatar pie menu
|
||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
void handle_follow(void *userdata)
|
//---------------------------------------------------------------------------
|
||||||
{
|
// Avatar pie menu
|
||||||
// follow a given avatar by ID
|
//---------------------------------------------------------------------------
|
||||||
LLViewerObject* objectp = LLSelectMgr::getInstance()->getSelection()->getPrimaryObject();
|
//void handle_follow(void *userdata)
|
||||||
if (objectp)
|
//{
|
||||||
{
|
// // follow a given avatar by ID
|
||||||
gAgent.startFollowPilot(objectp->getID());
|
// LLViewerObject* objectp = LLSelectMgr::getInstance()->getSelection()->getPrimaryObject();
|
||||||
}
|
// if (objectp)
|
||||||
}
|
// {
|
||||||
|
// gAgent.startFollowPilot(objectp->getID());
|
||||||
|
// }
|
||||||
|
//}
|
||||||
|
|
||||||
class LLObjectEnableMute : public view_listener_t
|
class LLObjectEnableMute : public view_listener_t
|
||||||
{
|
{
|
||||||
@@ -3415,16 +3311,6 @@ bool callback_leave_group(const LLSD& notification, const LLSD& response)
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
void handle_leave_group(void *)
|
|
||||||
{
|
|
||||||
if (gAgent.getGroupID() != LLUUID::null)
|
|
||||||
{
|
|
||||||
LLSD args;
|
|
||||||
args["GROUP"] = gAgent.getGroupName();
|
|
||||||
LLNotificationsUtil::add("GroupLeaveConfirmMember", args, LLSD(), callback_leave_group);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void append_aggregate(std::string& string, const LLAggregatePermissions& ag_perm, PermissionBit bit, const char* txt)
|
void append_aggregate(std::string& string, const LLAggregatePermissions& ag_perm, PermissionBit bit, const char* txt)
|
||||||
{
|
{
|
||||||
LLAggregatePermissions::EValue val = ag_perm.getValue(bit);
|
LLAggregatePermissions::EValue val = ag_perm.getValue(bit);
|
||||||
@@ -3447,32 +3333,35 @@ void append_aggregate(std::string& string, const LLAggregatePermissions& ag_perm
|
|||||||
string.append(buffer);
|
string.append(buffer);
|
||||||
}
|
}
|
||||||
|
|
||||||
BOOL enable_buy(void*)
|
bool enable_buy_object()
|
||||||
{
|
{
|
||||||
// In order to buy, there must only be 1 purchaseable object in
|
// In order to buy, there must only be 1 purchaseable object in
|
||||||
// the selection manger.
|
// the selection manger.
|
||||||
if(LLSelectMgr::getInstance()->getSelection()->getRootObjectCount() != 1) return FALSE;
|
if(LLSelectMgr::getInstance()->getSelection()->getRootObjectCount() != 1) return false;
|
||||||
LLViewerObject* obj = NULL;
|
LLViewerObject* obj = NULL;
|
||||||
LLSelectNode* node = LLSelectMgr::getInstance()->getSelection()->getFirstRootNode();
|
LLSelectNode* node = LLSelectMgr::getInstance()->getSelection()->getFirstRootNode();
|
||||||
if(node)
|
if(node)
|
||||||
{
|
{
|
||||||
obj = node->getObject();
|
obj = node->getObject();
|
||||||
if(!obj) return FALSE;
|
if(!obj) return false;
|
||||||
|
|
||||||
if(node->mSaleInfo.isForSale() && node->mPermissions->getMaskOwner() & PERM_TRANSFER &&
|
if( for_sale_selection(node) )
|
||||||
(node->mPermissions->getMaskOwner() & PERM_COPY || node->mSaleInfo.getSaleType() != LLSaleInfo::FS_COPY))
|
|
||||||
{
|
{
|
||||||
if(obj->permAnyOwner()) return TRUE;
|
// *NOTE: Is this needed? This checks to see if anyone owns the
|
||||||
|
// object, dating back to when we had "public" objects owned by
|
||||||
|
// no one. JC
|
||||||
|
if(obj->permAnyOwner()) return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return FALSE;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
class LLObjectEnableBuy : public view_listener_t
|
class LLObjectEnableBuy : public view_listener_t
|
||||||
{
|
{
|
||||||
bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
|
bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
|
||||||
{
|
{
|
||||||
bool new_value = enable_buy(NULL);
|
bool new_value = enable_buy_object();
|
||||||
gMenuHolder->findControl(userdata["control"].asString())->setValue(new_value);
|
gMenuHolder->findControl(userdata["control"].asString())->setValue(new_value);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@@ -4108,15 +3997,6 @@ class LLLandSit : public view_listener_t
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
void show_permissions_control(void*)
|
|
||||||
{
|
|
||||||
LLFloaterPermissionsMgr* floaterp = LLFloaterPermissionsMgr::show();
|
|
||||||
floaterp->mPermissions->addPermissionsData("foo1", LLUUID::null, 0);
|
|
||||||
floaterp->mPermissions->addPermissionsData("foo2", LLUUID::null, 0);
|
|
||||||
floaterp->mPermissions->addPermissionsData("foo3", LLUUID::null, 0);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
class LLCreateLandmarkCallback : public LLInventoryCallback
|
class LLCreateLandmarkCallback : public LLInventoryCallback
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
@@ -4127,11 +4007,6 @@ public:
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
void reload_ui(void *)
|
|
||||||
{
|
|
||||||
LLUICtrlFactory::getInstance()->rebuild();
|
|
||||||
}
|
|
||||||
|
|
||||||
class LLWorldFly : public view_listener_t
|
class LLWorldFly : public view_listener_t
|
||||||
{
|
{
|
||||||
bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
|
bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
|
||||||
@@ -4278,7 +4153,9 @@ void reset_view_final( BOOL proceed )
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
gAgentCamera.switchCameraPreset(CAMERA_PRESET_REAR_VIEW);
|
||||||
gAgentCamera.resetView(TRUE, TRUE);
|
gAgentCamera.resetView(TRUE, TRUE);
|
||||||
|
gAgentCamera.setLookAt(LOOKAT_TARGET_CLEAR);
|
||||||
}
|
}
|
||||||
|
|
||||||
class LLViewLookAtLastChatter : public view_listener_t
|
class LLViewLookAtLastChatter : public view_listener_t
|
||||||
@@ -4994,7 +4871,7 @@ void handle_take()
|
|||||||
|
|
||||||
LLNotification::Params params("ConfirmObjectTakeLock");
|
LLNotification::Params params("ConfirmObjectTakeLock");
|
||||||
params.payload(payload)
|
params.payload(payload)
|
||||||
.functor(confirm_take);
|
.functor(boost::bind(&confirm_take, _1, _2, LLSelectMgr::instance().getSelection()));
|
||||||
|
|
||||||
if(locked_but_takeable_object ||
|
if(locked_but_takeable_object ||
|
||||||
!you_own_everything)
|
!you_own_everything)
|
||||||
@@ -5021,7 +4898,7 @@ void handle_take()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
bool confirm_take(const LLSD& notification, const LLSD& response)
|
bool confirm_take(const LLSD& notification, const LLSD& response, LLObjectSelectionHandle selection_handle)
|
||||||
{
|
{
|
||||||
S32 option = LLNotificationsUtil::getSelectedOption(notification, response);
|
S32 option = LLNotificationsUtil::getSelectedOption(notification, response);
|
||||||
if(enable_take() && (option == 0))
|
if(enable_take() && (option == 0))
|
||||||
@@ -5091,7 +4968,7 @@ class LLToolsBuyOrTake : public view_listener_t
|
|||||||
|
|
||||||
if (total_price <= gStatusBar->getBalance() || total_price == 0)
|
if (total_price <= gStatusBar->getBalance() || total_price == 0)
|
||||||
{
|
{
|
||||||
handle_buy(NULL);
|
handle_buy();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -5112,7 +4989,7 @@ class LLToolsEnableBuyOrTake : public view_listener_t
|
|||||||
bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
|
bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
|
||||||
{
|
{
|
||||||
bool is_buy = is_selection_buy_not_take();
|
bool is_buy = is_selection_buy_not_take();
|
||||||
bool new_value = is_buy ? enable_buy(NULL) : enable_take();
|
bool new_value = is_buy ? enable_buy_object() : enable_take();
|
||||||
gMenuHolder->findControl(userdata["control"].asString())->setValue(new_value);
|
gMenuHolder->findControl(userdata["control"].asString())->setValue(new_value);
|
||||||
|
|
||||||
// Update label
|
// Update label
|
||||||
@@ -5230,7 +5107,7 @@ void handle_buy_currency(void*)
|
|||||||
// LLFloaterBuyCurrency::buyCurrency();
|
// LLFloaterBuyCurrency::buyCurrency();
|
||||||
}
|
}
|
||||||
|
|
||||||
void handle_buy(void*)
|
void handle_buy()
|
||||||
{
|
{
|
||||||
if (LLSelectMgr::getInstance()->getSelection()->isEmpty()) return;
|
if (LLSelectMgr::getInstance()->getSelection()->isEmpty()) return;
|
||||||
|
|
||||||
@@ -5252,11 +5129,26 @@ class LLObjectBuy : public view_listener_t
|
|||||||
{
|
{
|
||||||
bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
|
bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
|
||||||
{
|
{
|
||||||
handle_buy(NULL);
|
handle_buy();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
bool anyone_copy_selection(LLSelectNode* nodep)
|
||||||
|
{
|
||||||
|
bool perm_copy = (bool)(nodep->getObject()->permCopy());
|
||||||
|
bool all_copy = (bool)(nodep->mPermissions->getMaskEveryone() & PERM_COPY);
|
||||||
|
return perm_copy && all_copy;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool for_sale_selection(LLSelectNode* nodep)
|
||||||
|
{
|
||||||
|
return nodep->mSaleInfo.isForSale()
|
||||||
|
&& nodep->mPermissions->getMaskOwner() & PERM_TRANSFER
|
||||||
|
&& (nodep->mPermissions->getMaskOwner() & PERM_COPY
|
||||||
|
|| nodep->mSaleInfo.getSaleType() != LLSaleInfo::FS_COPY);
|
||||||
|
}
|
||||||
|
|
||||||
BOOL sitting_on_selection()
|
BOOL sitting_on_selection()
|
||||||
{
|
{
|
||||||
LLSelectNode* node = LLSelectMgr::getInstance()->getSelection()->getFirstRootNode();
|
LLSelectNode* node = LLSelectMgr::getInstance()->getSelection()->getFirstRootNode();
|
||||||
@@ -6843,33 +6735,6 @@ class LLShowAgentGroups : public view_listener_t
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
void handle_focus(void *)
|
|
||||||
{
|
|
||||||
if (gDisconnected)
|
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (gAgentCamera.getFocusOnAvatar())
|
|
||||||
{
|
|
||||||
// zoom in if we're looking at the avatar
|
|
||||||
gAgentCamera.setFocusOnAvatar(FALSE, ANIMATE);
|
|
||||||
gAgentCamera.setFocusGlobal(LLToolPie::getInstance()->getPick());
|
|
||||||
gAgentCamera.cameraZoomIn(0.666f);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
gAgentCamera.setFocusGlobal(LLToolPie::getInstance()->getPick());
|
|
||||||
}
|
|
||||||
|
|
||||||
gViewerWindow->moveCursorToCenter();
|
|
||||||
|
|
||||||
// Switch to camera toolset
|
|
||||||
// LLToolMgr::getInstance()->setCurrentToolset(gCameraToolset);
|
|
||||||
LLToolMgr::getInstance()->getCurrentToolset()->selectTool( LLToolCamera::getInstance() );
|
|
||||||
}
|
|
||||||
|
|
||||||
class LLLandEdit : public view_listener_t
|
class LLLandEdit : public view_listener_t
|
||||||
{
|
{
|
||||||
bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
|
bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
|
||||||
@@ -6928,26 +6793,6 @@ BOOL enable_buy_land(void*)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void handle_move(void*)
|
|
||||||
{
|
|
||||||
if (gAgentCamera.getFocusOnAvatar())
|
|
||||||
{
|
|
||||||
// zoom in if we're looking at the avatar
|
|
||||||
gAgentCamera.setFocusOnAvatar(FALSE, ANIMATE);
|
|
||||||
gAgentCamera.setFocusGlobal(LLToolPie::getInstance()->getPick());
|
|
||||||
|
|
||||||
gAgentCamera.cameraZoomIn(0.666f);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
gAgentCamera.setFocusGlobal(LLToolPie::getInstance()->getPick());
|
|
||||||
}
|
|
||||||
|
|
||||||
gViewerWindow->moveCursorToCenter();
|
|
||||||
|
|
||||||
LLToolMgr::getInstance()->setCurrentToolset(gBasicToolset);
|
|
||||||
LLToolMgr::getInstance()->getCurrentToolset()->selectTool( LLToolGrab::getInstance() );
|
|
||||||
}
|
|
||||||
|
|
||||||
class LLObjectAttachToAvatar : public view_listener_t
|
class LLObjectAttachToAvatar : public view_listener_t
|
||||||
{
|
{
|
||||||
@@ -7558,16 +7403,6 @@ class LLAvatarSendIM : public view_listener_t
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
void handle_activate(void*)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
BOOL enable_activate(void*)
|
|
||||||
{
|
|
||||||
return FALSE;
|
|
||||||
}
|
|
||||||
|
|
||||||
namespace
|
namespace
|
||||||
{
|
{
|
||||||
struct QueueObjects : public LLSelectedObjectFunctor
|
struct QueueObjects : public LLSelectedObjectFunctor
|
||||||
@@ -8302,19 +8137,6 @@ BOOL enable_god_basic(void*)
|
|||||||
//return gAgent.getGodLevel() > GOD_NOT;
|
//return gAgent.getGodLevel() > GOD_NOT;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if 0 // 1.9.2
|
|
||||||
void toggle_vertex_shaders(void *)
|
|
||||||
{
|
|
||||||
BOOL use_shaders = gPipeline.getUseVertexShaders();
|
|
||||||
gPipeline.setUseVertexShaders(use_shaders);
|
|
||||||
}
|
|
||||||
|
|
||||||
BOOL check_vertex_shaders(void *)
|
|
||||||
{
|
|
||||||
return gPipeline.getUseVertexShaders();
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
void toggle_show_xui_names(void *)
|
void toggle_show_xui_names(void *)
|
||||||
{
|
{
|
||||||
BOOL showXUINames = gSavedSettings.getBOOL("ShowXUINames");
|
BOOL showXUINames = gSavedSettings.getBOOL("ShowXUINames");
|
||||||
@@ -8328,15 +8150,6 @@ BOOL check_show_xui_names(void *)
|
|||||||
return gSavedSettings.getBOOL("ShowXUINames");
|
return gSavedSettings.getBOOL("ShowXUINames");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
void toggle_cull_small(void *)
|
|
||||||
{
|
|
||||||
// gPipeline.mCullBySize = !gPipeline.mCullBySize;
|
|
||||||
//
|
|
||||||
// gSavedSettings.setBOOL("RenderCullBySize", gPipeline.mCullBySize);
|
|
||||||
}
|
|
||||||
|
|
||||||
class LLToolsSelectOnlyMyObjects : public view_listener_t
|
class LLToolsSelectOnlyMyObjects : public view_listener_t
|
||||||
{
|
{
|
||||||
bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
|
bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
|
||||||
@@ -9424,7 +9237,7 @@ class LLWorldDayCycle : public view_listener_t
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
static void addMenu(view_listener_t *menu, const std::string& name)
|
void addMenu(view_listener_t *menu, const std::string& name)
|
||||||
{
|
{
|
||||||
sMenus.push_back(menu);
|
sMenus.push_back(menu);
|
||||||
menu->registerListener(gMenuHolder, name);
|
menu->registerListener(gMenuHolder, name);
|
||||||
@@ -9494,7 +9307,6 @@ void initialize_menus()
|
|||||||
|
|
||||||
// View menu
|
// View menu
|
||||||
addMenu(new LLViewMouselook(), "View.Mouselook");
|
addMenu(new LLViewMouselook(), "View.Mouselook");
|
||||||
addMenu(new LLViewBuildMode(), "View.BuildMode");
|
|
||||||
addMenu(new LLViewJoystickFlycam(), "View.JoystickFlycam");
|
addMenu(new LLViewJoystickFlycam(), "View.JoystickFlycam");
|
||||||
addMenu(new LLViewCommunicate(), "View.Communicate");
|
addMenu(new LLViewCommunicate(), "View.Communicate");
|
||||||
addMenu(new LLViewResetView(), "View.ResetView");
|
addMenu(new LLViewResetView(), "View.ResetView");
|
||||||
@@ -9514,7 +9326,6 @@ void initialize_menus()
|
|||||||
addMenu(new LLViewEnableLastChatter(), "View.EnableLastChatter");
|
addMenu(new LLViewEnableLastChatter(), "View.EnableLastChatter");
|
||||||
addMenu(new LLViewToggleRadar(), "View.ToggleAvatarList");
|
addMenu(new LLViewToggleRadar(), "View.ToggleAvatarList");
|
||||||
|
|
||||||
addMenu(new LLViewCheckBuildMode(), "View.CheckBuildMode");
|
|
||||||
addMenu(new LLViewCheckJoystickFlycam(), "View.CheckJoystickFlycam");
|
addMenu(new LLViewCheckJoystickFlycam(), "View.CheckJoystickFlycam");
|
||||||
addMenu(new LLViewCheckShowHoverTips(), "View.CheckShowHoverTips");
|
addMenu(new LLViewCheckShowHoverTips(), "View.CheckShowHoverTips");
|
||||||
addMenu(new LLViewCheckHighlightTransparent(), "View.CheckHighlightTransparent");
|
addMenu(new LLViewCheckHighlightTransparent(), "View.CheckHighlightTransparent");
|
||||||
|
|||||||
@@ -39,7 +39,7 @@ class LLUICtrl;
|
|||||||
class LLView;
|
class LLView;
|
||||||
class LLParcelSelection;
|
class LLParcelSelection;
|
||||||
class LLObjectSelection;
|
class LLObjectSelection;
|
||||||
|
class LLSelectNode;
|
||||||
|
|
||||||
void pre_init_menus();
|
void pre_init_menus();
|
||||||
void init_menus();
|
void init_menus();
|
||||||
@@ -97,8 +97,17 @@ void exchange_callingcard(const LLUUID& dest_id);
|
|||||||
|
|
||||||
void handle_gestures(void*);
|
void handle_gestures(void*);
|
||||||
void handle_sit_down(void*);
|
void handle_sit_down(void*);
|
||||||
bool toggle_build_mode();
|
|
||||||
void handle_object_build(void*);
|
void handle_object_build(void*);
|
||||||
|
|
||||||
|
void handle_buy();
|
||||||
|
// Can anyone take a free copy of the object?
|
||||||
|
// *TODO: Move to separate file
|
||||||
|
bool anyone_copy_selection(LLSelectNode* nodep);
|
||||||
|
|
||||||
|
// Is this selected object for sale?
|
||||||
|
// *TODO: Move to separate file
|
||||||
|
bool for_sale_selection(LLSelectNode* nodep);
|
||||||
|
|
||||||
void handle_save_snapshot(void *);
|
void handle_save_snapshot(void *);
|
||||||
void handle_toggle_flycam();
|
void handle_toggle_flycam();
|
||||||
void handle_fake_away_status(void*);
|
void handle_fake_away_status(void*);
|
||||||
@@ -106,6 +115,7 @@ void handle_fake_away_status(void*);
|
|||||||
bool handle_sit_or_stand();
|
bool handle_sit_or_stand();
|
||||||
bool handle_give_money_dialog();
|
bool handle_give_money_dialog();
|
||||||
bool handle_object_open();
|
bool handle_object_open();
|
||||||
|
bool enable_buy_object();
|
||||||
bool handle_go_to();
|
bool handle_go_to();
|
||||||
|
|
||||||
// Export to XML or Collada
|
// Export to XML or Collada
|
||||||
|
|||||||
Reference in New Issue
Block a user