added toolbar button for radar, made option to disable lookat completely, changed groundsit hotkey and made it allow standing as well
This commit is contained in:
@@ -12681,5 +12681,16 @@
|
||||
<integer>473</integer>
|
||||
</array>
|
||||
</map>
|
||||
<key>RadarListBtnState</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string />
|
||||
<key>Persist</key>
|
||||
<integer>0</integer>
|
||||
<key>Type</key>
|
||||
<string>Boolean</string>
|
||||
<key>Value</key>
|
||||
<integer>0</integer>
|
||||
</map>
|
||||
</map>
|
||||
</llsd>
|
||||
|
||||
@@ -73,12 +73,9 @@ BOOL LLAgent::setLookAt(ELookAtType target_type, LLViewerObject *object, LLVecto
|
||||
{
|
||||
if (object && target_type != LOOKAT_TARGET_NONE && gSavedSettings.getBOOL("PrivateLookAt"))
|
||||
{
|
||||
if ((object->getPositionGlobal() - gAgent.getPositionGlobal()).magVec() > 20.0)
|
||||
{
|
||||
target_type = LOOKAT_TARGET_NONE;
|
||||
object = mAvatarObject;
|
||||
position.clearVec();
|
||||
}
|
||||
target_type = LOOKAT_TARGET_NONE;
|
||||
object = mAvatarObject;
|
||||
position.clearVec();
|
||||
}
|
||||
|
||||
if(object && object->isAttachment())
|
||||
@@ -114,12 +111,9 @@ BOOL LLAgent::setPointAt(EPointAtType target_type, LLViewerObject *object, LLVec
|
||||
|
||||
if (object && target_type != POINTAT_TARGET_NONE && gSavedSettings.getBOOL("PrivateLookAt"))
|
||||
{
|
||||
if ((object->getPositionGlobal() - gAgent.getPositionGlobal()).magVec() > 20.0)
|
||||
{
|
||||
target_type = POINTAT_TARGET_NONE;
|
||||
object = NULL;
|
||||
position.clearVec();
|
||||
}
|
||||
target_type = POINTAT_TARGET_NONE;
|
||||
object = NULL;
|
||||
position.clearVec();
|
||||
}
|
||||
|
||||
if(!mPointAt || mPointAt->isDead())
|
||||
|
||||
@@ -53,6 +53,7 @@
|
||||
#include "llfloaterchatterbox.h"
|
||||
#include "llfloaterfriends.h"
|
||||
#include "llfloatersnapshot.h"
|
||||
#include "llfloateravatarlist.h"
|
||||
#include "lltoolmgr.h"
|
||||
#include "llui.h"
|
||||
#include "llviewermenu.h"
|
||||
@@ -128,8 +129,8 @@ BOOL LLToolBar::postBuild()
|
||||
childSetAction("appearance_btn", onClickAppearance, this);
|
||||
childSetControlName("appearance_btn", "");
|
||||
|
||||
childSetAction("fly_btn", onClickFly, this);
|
||||
childSetControlName("fly_btn", "FlyBtnState");
|
||||
childSetAction("radar_list_btn", onClickRadarList, this);
|
||||
childSetControlName("radar_list_btn", "RadarListBtnState");
|
||||
|
||||
childSetAction("sit_btn", onClickSit, this);
|
||||
childSetControlName("sit_btn", "SitBtnState");
|
||||
@@ -449,6 +450,17 @@ void LLToolBar::onClickAppearance(void*)
|
||||
}
|
||||
}
|
||||
|
||||
// static
|
||||
void LLToolBar::onClickRadarList(void*)
|
||||
{
|
||||
LLFloaterAvatarList::toggle(0);
|
||||
bool vis = false;
|
||||
if(LLFloaterAvatarList::getInstance())
|
||||
{
|
||||
vis = (bool)LLFloaterAvatarList::getInstance()->getVisible();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// static
|
||||
void LLToolBar::onClickFly(void*)
|
||||
|
||||
@@ -82,6 +82,7 @@ public:
|
||||
static void onClickRadar(void* data);
|
||||
static void onClickMap(void* data);
|
||||
static void onClickInventory(void* data);
|
||||
static void onClickRadarList(void* data);
|
||||
|
||||
static F32 sInventoryAutoOpenTime;
|
||||
|
||||
|
||||
@@ -4906,9 +4906,16 @@ class LLWorldSitOnGround : public view_listener_t
|
||||
{
|
||||
bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
|
||||
{
|
||||
if (gAgent.getAvatarObject() && !gAgent.getAvatarObject()->mIsSitting)
|
||||
if (gAgent.getAvatarObject())
|
||||
{
|
||||
gAgent.setControlFlags(AGENT_CONTROL_SIT_ON_GROUND);
|
||||
if(!gAgent.getAvatarObject()->mIsSitting)
|
||||
{
|
||||
gAgent.setControlFlags(AGENT_CONTROL_SIT_ON_GROUND);
|
||||
}
|
||||
else
|
||||
{
|
||||
gAgent.setControlFlags(AGENT_CONTROL_STAND_UP);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
@@ -4918,7 +4925,7 @@ class LLWorldEnableSitOnGround : public view_listener_t
|
||||
{
|
||||
bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
|
||||
{
|
||||
bool new_value = (gAgent.getAvatarObject() && !gAgent.getAvatarObject()->mIsSitting);
|
||||
bool new_value = (gAgent.getAvatarObject());
|
||||
gMenuHolder->findControl(userdata["control"].asString())->setValue(new_value);
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -449,7 +449,7 @@
|
||||
<on_check function="World.CheckAlwaysRun" userdata="" />
|
||||
</menu_item_check>
|
||||
<menu_item_call bottom="-67" enabled="true" height="19" label="Sit on Ground" left="0"
|
||||
mouse_opaque="true" name="Sit on Ground" shortcut="control|alt|shift|S" width="185">
|
||||
mouse_opaque="true" name="Sit on Ground" shortcut="control|alt|S" width="185">
|
||||
<on_click function="World.SitOnGround" userdata="" />
|
||||
<on_enable function="World.EnableSitOnGround" userdata="" />
|
||||
</menu_item_call>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
|
||||
<panel top="20" left="10" height="400" width="517" follows="left|top|right|bottom"
|
||||
border="true" label="The Features Are Inert" name="inert" enabled="true" mouse_opaque="true">
|
||||
border="true" label="Inert Prefs" name="inert" enabled="true" mouse_opaque="true">
|
||||
<tab_container label="Inertia" bottom="0" height="408" width="500" left="0"
|
||||
name="Inert Prefs" tab_min_width="90" tab_position="top">
|
||||
<panel border="true" left="1" bottom="-408" height="408" width="500" mouse_opaque="true"
|
||||
@@ -114,7 +114,7 @@
|
||||
width="400" />
|
||||
<check_box bottom_delta="-20" control_name="PrivateLookAt" enabled="true"
|
||||
follows="left|top" font="SansSerifSmall" height="16" initial_value="false"
|
||||
label="Do not look at or point to objects beyond 20m (defeats ShowLookAt)" left="10"
|
||||
label="Do not look at or point to objects (defeats ShowLookAt)" left="10"
|
||||
mouse_opaque="true" name="private_look_at_check" radio_style="false"
|
||||
width="400" />
|
||||
<check_box bottom_delta="-20" control_name="RevokePermsOnStandUp" enabled="true"
|
||||
|
||||
@@ -18,13 +18,13 @@
|
||||
list_position="above"
|
||||
width="50" follows="left|right" user_resize="false"/>
|
||||
<icon image_name="spacer24.tga" width="2" height="2" follows="left|right" auto_resize="false" color="0,0,0,0"/>
|
||||
<button bottom="0" font="SansSerif" height="24" label="Fly"
|
||||
image_overlay="icn_toolbar_fly.tga" image_overlay_alignment="left"
|
||||
<button bottom="0" font="SansSerif" height="24" label="Radar"
|
||||
image_overlay="icn_toolbar_radar.tga" image_overlay_alignment="left"
|
||||
image_selected="toolbar_btn_selected.tga"
|
||||
image_unselected="toolbar_btn_enabled.tga"
|
||||
image_disabled="toolbar_btn_disabled.tga" scale_image="true"
|
||||
label_selected="Stop Flying" left="0" name="fly_btn"
|
||||
tool_tip="Start flying. Use E/C or PgUp/PgDn to fly up and down."
|
||||
label_selected="Radar" left="0" name="radar_list_btn"
|
||||
tool_tip="View a list of nearby avatars."
|
||||
width="50" follows="left|right" user_resize="false"/>
|
||||
<button bottom="0" font="SansSerif" height="24" label="Snapshot" left="0"
|
||||
image_overlay="icn_toolbar_snapshot.tga" image_overlay_alignment="left"
|
||||
|
||||
Reference in New Issue
Block a user