Always Build/Always Fly options.

This commit is contained in:
CharleyLevenque
2010-08-30 01:46:03 -04:00
parent bb89f6b9be
commit b156e57541
5 changed files with 114 additions and 24 deletions

View File

@@ -120,6 +120,7 @@ public:
childSetAction("Save", LLWearableSaveAsDialog::onSave, this );
childSetAction("Cancel", LLWearableSaveAsDialog::onCancel, this );
childSetTextArg("name ed", "[DESC]", desc);
}
@@ -220,6 +221,8 @@ public:
childSetAction("Save", onSave, this );
childSetAction("Cancel", onCancel, this );
childSetAction("Check All", onCheckAll, this );
childSetAction("Uncheck All", onUncheckAll, this );
}
BOOL getRenameClothing()
@@ -295,6 +298,26 @@ public:
}
}
static void onCheckAll( void* userdata )
{
LLMakeOutfitDialog* self = (LLMakeOutfitDialog*) userdata;
for( S32 i = 0; i < (S32)(self->mCheckBoxList.size()); i++)
{
std::string name = self->mCheckBoxList[i].first;
if(self->childIsEnabled(name))self->childSetValue(name,TRUE);
}
}
static void onUncheckAll( void* userdata )
{
LLMakeOutfitDialog* self = (LLMakeOutfitDialog*) userdata;
for( S32 i = 0; i < (S32)(self->mCheckBoxList.size()); i++)
{
std::string name = self->mCheckBoxList[i].first;
if(self->childIsEnabled(name))self->childSetValue(name,FALSE);
}
}
static void onCancel( void* userdata )
{
LLMakeOutfitDialog* self = (LLMakeOutfitDialog*) userdata;

View File

@@ -291,9 +291,9 @@ void LLToolBar::refresh()
sitting = gAgent.getAvatarObject()->mIsSitting;
}
childSetEnabled("fly_btn", (gAgent.canFly() || gAgent.getFlying()) && !sitting );
childSetEnabled("fly_btn", (gAgent.canFly() || gAgent.getFlying() || gSavedSettings.getBOOL("AscentFlyAlwaysEnabled")) && !sitting );
childSetEnabled("build_btn", LLViewerParcelMgr::getInstance()->agentCanBuild() );
childSetEnabled("build_btn", (LLViewerParcelMgr::getInstance()->agentCanBuild() || gSavedSettings.getBOOL("AscentBuildAlwaysEnabled")) );
// Check to see if we're in build mode
BOOL build_mode = LLToolMgr::getInstance()->inEdit();

View File

@@ -2425,6 +2425,59 @@ class LLCanIHasKillEmAll : public view_listener_t
}
};
class LLOHGOD : public view_listener_t
{
bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
{
LLViewerObject* objpos = LLSelectMgr::getInstance()->getSelection()->getFirstRootObject();
bool new_value = false;
if(objpos)
{
if (!objpos->permYouOwner())
new_value = false; // Don't give guns to retarded children.
else new_value = true;
}
gMenuHolder->findControl(userdata["control"].asString())->setValue(new_value);
return false;
}
};
class LLPowerfulWizard : public view_listener_t
{
bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
{
LLViewerObject* objpos = LLSelectMgr::getInstance()->getSelection()->getFirstRootObject();
if(objpos)
{
// Dont give guns to retarded children
if (!objpos->permYouOwner())
{
LLChat chat;
chat.mSourceType = CHAT_SOURCE_SYSTEM;
chat.mText = llformat("Can't do that, dave.");
LLFloaterChat::addChat(chat);
return false;
}
// Let the user know they are a rippling madman what is capable of everything
LLChat chat;
chat.mSourceType = CHAT_SOURCE_SYSTEM;
chat.mText = llformat("~*zort*~");
LLFloaterChat::addChat(chat);
/*
NOTE: oh god how did this get here
*/
LLSelectMgr::getInstance()->selectionUpdateTemporary(1);//set temp to TRUE
LLSelectMgr::getInstance()->selectionUpdatePhysics(1);
LLSelectMgr::getInstance()->sendDelink();
}
return true;
}
};
class LLKillEmAll : public view_listener_t
{
bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
@@ -9681,7 +9734,9 @@ void initialize_menus()
addMenu(new LLObjectData(), "Object.Data");
addMenu(new LLScriptCount(), "Object.ScriptCount");
addMenu(new LLKillEmAll(), "Object.Destroy");
addMenu(new LLPowerfulWizard(), "Object.Explode");
addMenu(new LLCanIHasKillEmAll(), "Object.EnableDestroy");
addMenu(new LLOHGOD(), "Object.EnableExplode");
// </edit>
addMenu(new LLObjectMute(), "Object.Mute");
addMenu(new LLObjectBuy(), "Object.Buy");

View File

@@ -231,6 +231,12 @@ now wearing into it.
width="489">
Items to include in outfit:
</text>
<button bottom_delta="0" enabled="true" font="SansSerif" halign="center" height="20"
label="Check All" left_delta="200" mouse_opaque="true"
name="Check All" scale_image="true" width="82" />
<button bottom_delta="0" enabled="true" font="SansSerif" halign="center" height="20"
label="Uncheck All" left_delta="100" mouse_opaque="true"
name="Uncheck All" scale_image="true" width="82" />
<text type="string" length="1" bg_visible="false" border_drop_shadow_visible="false" border_visible="false"
bottom="-196" drop_shadow_visible="true" enabled="true" follows="left|top"
font="SansSerifSmall" h_pad="0" halign="left" height="14" left="13"

View File

@@ -44,33 +44,39 @@
<on_enable function="Object.EnableReturn" />
</menu_item_call>
<pie_menu label="More &gt;" name="Rate Menu">
<menu_item_call enabled="false" label="Destroy" mouse_opaque="true" name="Destroy">
<on_click function="Object.Destroy" />
<on_enable function="Object.EnableDestroy" />
<pie_menu label="Tools &gt;" name="Rate Menu">
<menu_item_call enabled="false" label="Destroy" mouse_opaque="true" name="Destroy">
<on_click function="Object.Destroy" />
<on_enable function="Object.EnableDestroy" />
</menu_item_call>
<menu_item_call enabled="false" label="Explode" mouse_opaque="true" name="Explode">
<on_click function="Object.Explode" />
<on_enable function="Object.EnableExplode" />
</menu_item_call>
<menu_item_call enabled="true" hidden="false" label="Measure" mouse_opaque="true" name="Measure">
<on_click function="Object.Measure" />
</menu_item_call>
<menu_item_call enabled="true" hidden="false" label="Data" mouse_opaque="true" name="Data">
<on_click function="Object.Data" />
</menu_item_call>
<menu_item_call enabled="false" hidden="false" label="S. Count" mouse_opaque="true" name="ScriptCount">
<on_click function="Object.ScriptCount" />
<on_visible function="Object.VisibleScriptCount" />
</menu_item_call>
<menu_item_call bottom="-487" enabled="false" height="19" label="Reset Scripts"
left="0" mouse_opaque="true" name="Reset Scripts" width="250">
<on_click function="Tools.SelectedScriptAction" userdata="reset" />
<on_enable function="EditableSelected" />
</menu_item_call>
</pie_menu>
<menu_item_call enabled="false" label="Mute" mouse_opaque="true" name="Object Mute">
<on_click function="Object.Mute" />
<on_enable function="Object.EnableMute" />
</menu_item_call>
<menu_item_call bottom="-487" enabled="false" height="19" label="Reset Scripts"
left="0" mouse_opaque="true" name="Reset Scripts" width="250">
<on_click function="Tools.SelectedScriptAction" userdata="reset" />
<on_enable function="EditableSelected" />
</menu_item_call>
<menu_item_call enabled="false" label="Mute" mouse_opaque="true" name="Object Mute">
<on_click function="Object.Mute" />
<on_enable function="Object.EnableMute" />
</menu_item_call>
<menu_item_call enabled="false" hidden="false" label="S. Count" mouse_opaque="true" name="ScriptCount">
<on_click function="Object.ScriptCount" />
<on_visible function="Object.VisibleScriptCount" />
</menu_item_call>
<menu_item_call enabled="true" label="Inspect" mouse_opaque="true" name="Object Inspect">
<on_click function="Object.Inspect" />
<on_enable function="Object.EnableInspect" />
</menu_item_call>
<menu_item_call enabled="true" hidden="false" label="Measure" mouse_opaque="true" name="Measure">
<on_click function="Object.Measure" />
</menu_item_call>
<menu_item_call enabled="true" hidden="false" label="Data" mouse_opaque="true" name="Data">
<on_click function="Object.Data" />
</menu_item_call>
<menu_item_call enabled="true" label="Derender" mouse_opaque="true" name="Derender">
<on_click function="Object.DERENDER" />
</menu_item_call>