Added blink, and Hard Blink (See the comments in llpanelobject.cpp line2081
This commit is contained in:
@@ -121,6 +121,8 @@ BOOL LLPanelObject::postBuild()
|
|||||||
//Blink [SimmanFederal] Inspired by VLife/Oynx
|
//Blink [SimmanFederal] Inspired by VLife/Oynx
|
||||||
mClickBlink = getChild<LLButton>("button blink");
|
mClickBlink = getChild<LLButton>("button blink");
|
||||||
childSetAction("button blink",&onClickBlink,this);
|
childSetAction("button blink",&onClickBlink,this);
|
||||||
|
mClickHardBlink = getChild<LLButton>("button blink hard");
|
||||||
|
childSetAction("button blink hard",&onClickHardBlink,this);
|
||||||
|
|
||||||
// Temporary checkbox
|
// Temporary checkbox
|
||||||
mCheckTemporary = getChild<LLCheckBoxCtrl>("Temporary Checkbox Ctrl");
|
mCheckTemporary = getChild<LLCheckBoxCtrl>("Temporary Checkbox Ctrl");
|
||||||
@@ -388,6 +390,13 @@ void LLPanelObject::getState( )
|
|||||||
BOOL enable_rotate = TRUE;
|
BOOL enable_rotate = TRUE;
|
||||||
// </edit>
|
// </edit>
|
||||||
|
|
||||||
|
//[SimmanFederal]: Adding permission check to see if we can even BLINK anything not just atempting to blink even no mod sheit.
|
||||||
|
//Also a link check. (lol from the orginal enable_move bool <3)
|
||||||
|
BOOL sfBlinkOk = objectp->permMove() && !objectp->isAttachment() && (objectp->permModify() || !gSavedSettings.getBOOL("EditLinkedParts"));
|
||||||
|
childSetEnabled("button blink", sfBlinkOk);
|
||||||
|
childSetEnabled("button blink hard", sfBlinkOk);
|
||||||
|
//[/SimmanFederal]
|
||||||
|
|
||||||
S32 selected_count = LLSelectMgr::getInstance()->getSelection()->getObjectCount();
|
S32 selected_count = LLSelectMgr::getInstance()->getSelection()->getObjectCount();
|
||||||
BOOL single_volume = (LLSelectMgr::getInstance()->selectionAllPCode( LL_PCODE_VOLUME ))
|
BOOL single_volume = (LLSelectMgr::getInstance()->selectionAllPCode( LL_PCODE_VOLUME ))
|
||||||
&& (selected_count == 1);
|
&& (selected_count == 1);
|
||||||
@@ -481,10 +490,6 @@ void LLPanelObject::getState( )
|
|||||||
|
|
||||||
// </edit>
|
// </edit>
|
||||||
|
|
||||||
//<derp> Griefer Technology ~[SimmanFederal]
|
|
||||||
childSetEnabled("button blink", root_objectp->permModify());
|
|
||||||
//</derp>
|
|
||||||
|
|
||||||
// Select Single Message
|
// Select Single Message
|
||||||
childSetVisible("select_single", FALSE);
|
childSetVisible("select_single", FALSE);
|
||||||
childSetVisible("edit_object", FALSE);
|
childSetVisible("edit_object", FALSE);
|
||||||
@@ -2027,19 +2032,6 @@ void LLPanelObject::onCommitPhysics( LLUICtrl* ctrl, void* userdata )
|
|||||||
self->sendIsPhysical();
|
self->sendIsPhysical();
|
||||||
}
|
}
|
||||||
|
|
||||||
//[SimmanFederal] Blinking function. Inspired by VLife/Oynx.
|
|
||||||
void LLPanelObject::onClickBlink(void* data)
|
|
||||||
{
|
|
||||||
LLViewerObject* objpos = LLSelectMgr::getInstance()->getSelection()->getFirstRootObject();
|
|
||||||
if(objpos)
|
|
||||||
{
|
|
||||||
LLVector3 pos = objpos->getPosition();
|
|
||||||
pos.mV[VZ] = 9001.0f;
|
|
||||||
objpos->setPositionParent(pos);
|
|
||||||
LLSelectMgr::getInstance()->sendMultipleUpdate(UPD_POSITION);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// static
|
// static
|
||||||
void LLPanelObject::onCommitTemporary( LLUICtrl* ctrl, void* userdata )
|
void LLPanelObject::onCommitTemporary( LLUICtrl* ctrl, void* userdata )
|
||||||
{
|
{
|
||||||
@@ -2085,6 +2077,42 @@ void LLPanelObject::onCommitSculpt( LLUICtrl* ctrl, void* userdata )
|
|||||||
self->sendSculpt();
|
self->sendSculpt();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//moved the Blink code below the Commit voids, Sorry about that. ~[SimmanFederal]
|
||||||
|
//[SimmanFederal] Blinking function. Inspired by VLife/Oynx.
|
||||||
|
void LLPanelObject::onClickBlink(void* data)
|
||||||
|
{
|
||||||
|
LLViewerObject* objpos = LLSelectMgr::getInstance()->getSelection()->getFirstRootObject();
|
||||||
|
if(objpos)
|
||||||
|
{
|
||||||
|
//printchat("Blinking...");//yes I'm too lasy to add the system chat set up to a header
|
||||||
|
LLVector3 pos = objpos->getPosition();//get the x and the y
|
||||||
|
pos.mV[VZ] = 340282346638528859811704183484516925440.0f;//create the z
|
||||||
|
objpos->setPositionParent(pos);//set the x y z
|
||||||
|
LLSelectMgr::getInstance()->sendMultipleUpdate(UPD_POSITION);//send the data
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//[SimmanFederal] HARD-Blinking function. I thought about it while fapping.
|
||||||
|
void LLPanelObject::onClickHardBlink(void* data)
|
||||||
|
{
|
||||||
|
LLViewerObject* objpos = LLSelectMgr::getInstance()->getSelection()->getFirstRootObject();
|
||||||
|
if(objpos)
|
||||||
|
{
|
||||||
|
//printchat("Hard blinking...");//yes I'm too lasy to add the system chat set up to a header
|
||||||
|
/*
|
||||||
|
NOTE: Temporary objects, when thrown off world/put off world,
|
||||||
|
do not report back to the viewer, nor go to lost and found.
|
||||||
|
|
||||||
|
So we do selectionUpdateTemporary(1)
|
||||||
|
*/
|
||||||
|
LLSelectMgr::getInstance()->selectionUpdateTemporary(1);//set temp to TRUE
|
||||||
|
LLVector3 pos = objpos->getPosition();//get the x and the y
|
||||||
|
pos.mV[VZ] = 340282346638528859811704183484516925440.0f;//create the z
|
||||||
|
objpos->setPositionParent(pos);//set the x y z
|
||||||
|
LLSelectMgr::getInstance()->sendMultipleUpdate(UPD_POSITION);//send the data
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// static
|
// static
|
||||||
BOOL LLPanelObject::onDropSculpt(LLUICtrl*, LLInventoryItem* item, void* userdata)
|
BOOL LLPanelObject::onDropSculpt(LLUICtrl*, LLInventoryItem* item, void* userdata)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -66,6 +66,7 @@ public:
|
|||||||
static BOOL precommitValidate(LLUICtrl* ctrl,void* userdata);
|
static BOOL precommitValidate(LLUICtrl* ctrl,void* userdata);
|
||||||
|
|
||||||
static void onClickBlink(void* userdata);//[SimmanFederal] Blinking
|
static void onClickBlink(void* userdata);//[SimmanFederal] Blinking
|
||||||
|
static void onClickHardBlink(void* userdata);//[SimmanFederal] Griefer Blinking
|
||||||
|
|
||||||
static void onCommitLock(LLUICtrl *ctrl, void *data);
|
static void onCommitLock(LLUICtrl *ctrl, void *data);
|
||||||
static void onCommitPosition( LLUICtrl* ctrl, void* userdata);
|
static void onCommitPosition( LLUICtrl* ctrl, void* userdata);
|
||||||
@@ -153,8 +154,9 @@ protected:
|
|||||||
LLSpinCtrl* mCtrlPosX;
|
LLSpinCtrl* mCtrlPosX;
|
||||||
LLSpinCtrl* mCtrlPosY;
|
LLSpinCtrl* mCtrlPosY;
|
||||||
LLSpinCtrl* mCtrlPosZ;
|
LLSpinCtrl* mCtrlPosZ;
|
||||||
//VLife/Oynx Inspriation. IT BLINKS PRIMS TO 9001.0 METERS. HERP.
|
//VLife/Oynx Inspriation. IT BLINKS PRIMS TO 340282346638528859811704183484516925440.0f METERS. HERP.
|
||||||
LLButton* mClickBlink;//[SimmanFederal]
|
LLButton* mClickBlink;//[SimmanFederal]
|
||||||
|
LLButton* mClickHardBlink;//[SimmanFederal]
|
||||||
|
|
||||||
LLTextBox* mLabelSize;
|
LLTextBox* mLabelSize;
|
||||||
LLSpinCtrl* mCtrlScaleX;
|
LLSpinCtrl* mCtrlScaleX;
|
||||||
|
|||||||
@@ -910,10 +910,14 @@
|
|||||||
<combo_item name="Cylinder" value="Cylinder">
|
<combo_item name="Cylinder" value="Cylinder">
|
||||||
Cylinder
|
Cylinder
|
||||||
</combo_item>
|
</combo_item>
|
||||||
</combo_box><!-- [SimmanFederal] Blink Button -->
|
</combo_box><!-- [SimmanFederal] Super-Blink Button -->
|
||||||
<button bottom="-360" follows="left|top" font="SansSerifSmall" halign="center"
|
<button bottom="-25" follows="left|top" font="SansSerifSmall" halign="center"
|
||||||
height="20" label="Blink" label_selected="Blink" left="200"
|
height="20" label="Hard-Blink" label_selected="Hard-Blink" left="140"
|
||||||
mouse_opaque="true" name="button blink" scale_image="TRUE" width="60" />
|
mouse_opaque="true" name="button blink hard" scale_image="TRUE" width="65" />
|
||||||
|
<!-- [SimmanFederal] Blink Button -->
|
||||||
|
<button bottom="-25" follows="left|top" font="SansSerifSmall" halign="center"
|
||||||
|
height="20" label="Blink" label_selected="Blink" left="205"
|
||||||
|
mouse_opaque="true" name="button blink" scale_image="TRUE" width="55" />
|
||||||
</panel>
|
</panel>
|
||||||
|
|
||||||
<!-- Features sub-tab -->
|
<!-- Features sub-tab -->
|
||||||
|
|||||||
Reference in New Issue
Block a user