Added blink to the build floater (god damnit mikey)
This commit is contained in:
@@ -118,6 +118,10 @@ BOOL LLPanelObject::postBuild()
|
||||
mCheckPhysics = getChild<LLCheckBoxCtrl>("Physical Checkbox Ctrl");
|
||||
childSetCommitCallback("Physical Checkbox Ctrl",onCommitPhysics,this);
|
||||
|
||||
//Blink [SimmanFederal] Inspired by VLife/Oynx
|
||||
mClickBlink = getChild<LLButton>("button blink");
|
||||
childSetAction("button blink",&onClickBlink,this);
|
||||
|
||||
// Temporary checkbox
|
||||
mCheckTemporary = getChild<LLCheckBoxCtrl>("Temporary Checkbox Ctrl");
|
||||
childSetCommitCallback("Temporary Checkbox Ctrl",onCommitTemporary,this);
|
||||
@@ -164,8 +168,8 @@ BOOL LLPanelObject::postBuild()
|
||||
mComboMaterial = getChild<LLComboBox>("material");
|
||||
childSetCommitCallback("material",onCommitMaterial,this);
|
||||
mComboMaterial->removeall();
|
||||
// <edit>
|
||||
/*
|
||||
// <edit>
|
||||
/*
|
||||
// *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));
|
||||
}
|
||||
// </edit>
|
||||
*/
|
||||
for(U8 mcode = 0; mcode < 0x10; mcode++)
|
||||
{
|
||||
mComboMaterial->add(LLMaterialTable::basic.getName(mcode));
|
||||
}
|
||||
// </edit>
|
||||
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
|
||||
// <edit>
|
||||
// Enables position, size, and rotation textboxes
|
||||
// but they're also editable
|
||||
// No arrow crap though
|
||||
/*
|
||||
// <edit>
|
||||
// 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;
|
||||
// </edit>
|
||||
*/
|
||||
BOOL enable_move = TRUE;
|
||||
BOOL enable_scale = TRUE;
|
||||
BOOL enable_rotate = TRUE;
|
||||
// </edit>
|
||||
|
||||
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();
|
||||
// <edit>
|
||||
// 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;
|
||||
|
||||
// </edit>
|
||||
// <edit>
|
||||
// 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;
|
||||
|
||||
// </edit>
|
||||
|
||||
//<derp> Griefer Technology ~[SimmanFederal]
|
||||
childSetEnabled("button blink", root_objectp->permModify());
|
||||
//</derp>
|
||||
|
||||
// Select Single Message
|
||||
childSetVisible("select_single", FALSE);
|
||||
@@ -561,8 +569,8 @@ void LLPanelObject::getState( )
|
||||
{
|
||||
mComboMaterial->setEnabled( TRUE );
|
||||
mLabelMaterial->setEnabled( TRUE );
|
||||
// <edit>
|
||||
/*
|
||||
// <edit>
|
||||
/*
|
||||
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)));
|
||||
// </edit>
|
||||
*/
|
||||
mComboMaterial->setSimple(std::string(LLMaterialTable::basic.getName(material_code)));
|
||||
// </edit>
|
||||
}
|
||||
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;
|
||||
|
||||
// <edit>
|
||||
//if ( selected_item == MI_SPHERE || selected_item == MI_TORUS ||
|
||||
// selected_item == MI_TUBE || selected_item == MI_RING )
|
||||
if(!linear_path)
|
||||
// </edit>
|
||||
// <edit>
|
||||
//if ( selected_item == MI_SPHERE || selected_item == MI_TORUS ||
|
||||
// selected_item == MI_TUBE || selected_item == MI_RING )
|
||||
if(!linear_path)
|
||||
// </edit>
|
||||
{
|
||||
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.
|
||||
// <edit>
|
||||
//if (path == LL_PCODE_PATH_LINE || path == LL_PCODE_PATH_FLEXIBLE)
|
||||
if(linear_path)
|
||||
// </edit>
|
||||
// <edit>
|
||||
//if (path == LL_PCODE_PATH_LINE || path == LL_PCODE_PATH_FLEXIBLE)
|
||||
if(linear_path)
|
||||
// </edit>
|
||||
{
|
||||
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;
|
||||
// <edit>
|
||||
// Enable advanced cut (aka dimple, aka path, aka profile cut) for everything
|
||||
//BOOL advanced_cut_visible = FALSE;
|
||||
BOOL advanced_cut_visible = TRUE;
|
||||
// </edit>
|
||||
// <edit>
|
||||
// Enable advanced cut (aka dimple, aka path, aka profile cut) for everything
|
||||
//BOOL advanced_cut_visible = FALSE;
|
||||
BOOL advanced_cut_visible = TRUE;
|
||||
// </edit>
|
||||
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;
|
||||
|
||||
// <edit>
|
||||
//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)
|
||||
// </edit>
|
||||
// <edit>
|
||||
//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)
|
||||
// </edit>
|
||||
{
|
||||
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);
|
||||
// <edit>
|
||||
//const F32 max_height = LLWorld::getInstance()->getRegionMaxHeight();
|
||||
const F32 max_height = F32(340282346638528859811704183484516925440.0f);
|
||||
// </edit>
|
||||
// <edit>
|
||||
//const F32 max_height = LLWorld::getInstance()->getRegionMaxHeight();
|
||||
const F32 max_height = F32(340282346638528859811704183484516925440.0f);
|
||||
// </edit>
|
||||
|
||||
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 )
|
||||
{
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -910,7 +910,10 @@
|
||||
<combo_item name="Cylinder" value="Cylinder">
|
||||
Cylinder
|
||||
</combo_item>
|
||||
</combo_box>
|
||||
</combo_box><!-- [SimmanFederal] Blink Button -->
|
||||
<button bottom="-360" follows="left|top" font="SansSerifSmall" halign="center"
|
||||
height="20" label="Blink" label_selected="Blink" left="200"
|
||||
mouse_opaque="true" name="button blink" scale_image="TRUE" width="60" />
|
||||
</panel>
|
||||
|
||||
<!-- Features sub-tab -->
|
||||
|
||||
Reference in New Issue
Block a user