diff --git a/indra/newview/llpanelobject.cpp b/indra/newview/llpanelobject.cpp index 508417f6d..bbcead9e9 100644 --- a/indra/newview/llpanelobject.cpp +++ b/indra/newview/llpanelobject.cpp @@ -118,6 +118,10 @@ BOOL LLPanelObject::postBuild() mCheckPhysics = getChild("Physical Checkbox Ctrl"); childSetCommitCallback("Physical Checkbox Ctrl",onCommitPhysics,this); + //Blink [SimmanFederal] Inspired by VLife/Oynx + mClickBlink = getChild("button blink"); + childSetAction("button blink",&onClickBlink,this); + // Temporary checkbox mCheckTemporary = getChild("Temporary Checkbox Ctrl"); childSetCommitCallback("Temporary Checkbox Ctrl",onCommitTemporary,this); @@ -164,8 +168,8 @@ BOOL LLPanelObject::postBuild() mComboMaterial = getChild("material"); childSetCommitCallback("material",onCommitMaterial,this); mComboMaterial->removeall(); - // - /* + // + /* // *TODO:translate for (LLMaterialTable::info_list_t::iterator iter = LLMaterialTable::basic.mMaterialInfoList.begin(); iter != LLMaterialTable::basic.mMaterialInfoList.end(); ++iter) @@ -176,12 +180,12 @@ BOOL LLPanelObject::postBuild() mComboMaterial->add(minfop->mName); } } - */ - for(U8 mcode = 0; mcode < 0x10; mcode++) - { - mComboMaterial->add(LLMaterialTable::basic.getName(mcode)); - } - // + */ + for(U8 mcode = 0; mcode < 0x10; mcode++) + { + mComboMaterial->add(LLMaterialTable::basic.getName(mcode)); + } + // mComboMaterialItemCount = mComboMaterial->getItemCount(); // Base Type @@ -370,19 +374,19 @@ void LLPanelObject::getState( ) } // can move or rotate only linked group with move permissions, or sub-object with move and modify perms - // - // Enables position, size, and rotation textboxes - // but they're also editable - // No arrow crap though - /* + // + // Enables position, size, and rotation textboxes + // but they're also editable + // No arrow crap though + /* BOOL enable_move = objectp->permMove() && !objectp->isAttachment() && (objectp->permModify() || !gSavedSettings.getBOOL("EditLinkedParts")); BOOL enable_scale = objectp->permMove() && objectp->permModify(); BOOL enable_rotate = objectp->permMove() && ( (objectp->permModify() && !objectp->isAttachment()) || !gSavedSettings.getBOOL("EditLinkedParts")); - */ - BOOL enable_move = TRUE; - BOOL enable_scale = TRUE; - BOOL enable_rotate = TRUE; - // + */ + BOOL enable_move = TRUE; + BOOL enable_scale = TRUE; + BOOL enable_rotate = TRUE; + // S32 selected_count = LLSelectMgr::getInstance()->getSelection()->getObjectCount(); BOOL single_volume = (LLSelectMgr::getInstance()->selectionAllPCode( LL_PCODE_VOLUME )) @@ -467,15 +471,19 @@ void LLPanelObject::getState( ) // BUG? Check for all objects being editable? S32 roots_selected = LLSelectMgr::getInstance()->getSelection()->getRootObjectCount(); - // - // Makes status and material available - // I would like it if they were semi-gray, you could copy the value, - // but not editable - - //BOOL editable = root_objectp->permModify(); - BOOL editable = TRUE; - - // + // + // Makes status and material available + // I would like it if they were semi-gray, you could copy the value, + // but not editable + + //BOOL editable = root_objectp->permModify(); + BOOL editable = TRUE; + + // + + // Griefer Technology ~[SimmanFederal] + childSetEnabled("button blink", root_objectp->permModify()); + // // Select Single Message childSetVisible("select_single", FALSE); @@ -561,8 +569,8 @@ void LLPanelObject::getState( ) { mComboMaterial->setEnabled( TRUE ); mLabelMaterial->setEnabled( TRUE ); - // - /* + // + /* if (material_code == LL_MCODE_LIGHT) { if (mComboMaterial->getItemCount() == mComboMaterialItemCount) @@ -580,9 +588,9 @@ void LLPanelObject::getState( ) // *TODO:Translate mComboMaterial->setSimple(std::string(LLMaterialTable::basic.getName(material_code))); } - */ - mComboMaterial->setSimple(std::string(LLMaterialTable::basic.getName(material_code))); - // + */ + mComboMaterial->setSimple(std::string(LLMaterialTable::basic.getName(material_code))); + // } else { @@ -752,11 +760,11 @@ void LLPanelObject::getState( ) // Cut interpretation varies based on base object type F32 cut_begin, cut_end, adv_cut_begin, adv_cut_end; - // - //if ( selected_item == MI_SPHERE || selected_item == MI_TORUS || - // selected_item == MI_TUBE || selected_item == MI_RING ) - if(!linear_path) - // + // + //if ( selected_item == MI_SPHERE || selected_item == MI_TORUS || + // selected_item == MI_TUBE || selected_item == MI_RING ) + if(!linear_path) + // { cut_begin = begin_t; cut_end = end_t; @@ -780,10 +788,10 @@ void LLPanelObject::getState( ) F32 twist = volume_params.getTwist(); F32 twist_begin = volume_params.getTwistBegin(); // Check the path type for conversion. - // - //if (path == LL_PCODE_PATH_LINE || path == LL_PCODE_PATH_FLEXIBLE) - if(linear_path) - // + // + //if (path == LL_PCODE_PATH_LINE || path == LL_PCODE_PATH_FLEXIBLE) + if(linear_path) + // { twist *= OBJECT_TWIST_LINEAR_MAX; twist_begin *= OBJECT_TWIST_LINEAR_MAX; @@ -876,11 +884,11 @@ void LLPanelObject::getState( ) BOOL top_shear_x_visible = TRUE; BOOL top_shear_y_visible = TRUE; BOOL twist_visible = TRUE; - // - // Enable advanced cut (aka dimple, aka path, aka profile cut) for everything - //BOOL advanced_cut_visible = FALSE; - BOOL advanced_cut_visible = TRUE; - // + // + // Enable advanced cut (aka dimple, aka path, aka profile cut) for everything + //BOOL advanced_cut_visible = FALSE; + BOOL advanced_cut_visible = TRUE; + // BOOL taper_visible = FALSE; BOOL skew_visible = FALSE; BOOL radius_offset_visible = FALSE; @@ -1464,13 +1472,13 @@ void LLPanelObject::getVolumeParams(LLVolumeParams& volume_params) F32 begin_s, end_s; F32 begin_t, end_t; - // - //if (selected_type == MI_SPHERE || selected_type == MI_TORUS || - // selected_type == MI_TUBE || selected_type == MI_RING) - BOOL linear_path = (path == LL_PCODE_PATH_LINE) || - (path == LL_PCODE_PATH_FLEXIBLE); - if(!linear_path) - // + // + //if (selected_type == MI_SPHERE || selected_type == MI_TORUS || + // selected_type == MI_TUBE || selected_type == MI_RING) + BOOL linear_path = (path == LL_PCODE_PATH_LINE) || + (path == LL_PCODE_PATH_FLEXIBLE); + if(!linear_path) + // { begin_s = adv_cut_begin; end_s = adv_cut_end; @@ -1741,10 +1749,10 @@ void LLPanelObject::sendPosition(BOOL btn_down) // Clamp the Z height const F32 height = newpos.mV[VZ]; const F32 min_height = LLWorld::getInstance()->getMinAllowedZ(mObject); - // - //const F32 max_height = LLWorld::getInstance()->getRegionMaxHeight(); - const F32 max_height = F32(340282346638528859811704183484516925440.0f); - // + // + //const F32 max_height = LLWorld::getInstance()->getRegionMaxHeight(); + const F32 max_height = F32(340282346638528859811704183484516925440.0f); + // if (!mObject->isAttachment()) { @@ -2019,6 +2027,19 @@ void LLPanelObject::onCommitPhysics( LLUICtrl* ctrl, void* userdata ) 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 void LLPanelObject::onCommitTemporary( LLUICtrl* ctrl, void* userdata ) { diff --git a/indra/newview/llpanelobject.h b/indra/newview/llpanelobject.h index 9ed091ed5..6d7d0de9b 100644 --- a/indra/newview/llpanelobject.h +++ b/indra/newview/llpanelobject.h @@ -65,6 +65,8 @@ public: static BOOL precommitValidate(LLUICtrl* ctrl,void* userdata); + static void onClickBlink(void* userdata);//[SimmanFederal] Blinking + static void onCommitLock(LLUICtrl *ctrl, void *data); static void onCommitPosition( LLUICtrl* ctrl, void* userdata); static void onCommitScale( LLUICtrl* ctrl, void* userdata); @@ -151,6 +153,8 @@ protected: LLSpinCtrl* mCtrlPosX; LLSpinCtrl* mCtrlPosY; LLSpinCtrl* mCtrlPosZ; + //VLife/Oynx Inspriation. IT BLINKS PRIMS TO 9001.0 METERS. HERP. + LLButton* mClickBlink;//[SimmanFederal] LLTextBox* mLabelSize; LLSpinCtrl* mCtrlScaleX; diff --git a/indra/newview/skins/default/xui/en-us/floater_tools.xml b/indra/newview/skins/default/xui/en-us/floater_tools.xml index 6865e155d..cd60da0af 100644 --- a/indra/newview/skins/default/xui/en-us/floater_tools.xml +++ b/indra/newview/skins/default/xui/en-us/floater_tools.xml @@ -910,7 +910,10 @@ Cylinder - + +