Made radar open invisible on startup, added number of agents above sim's
name in the world map and put maturity by the sim name, added more region flags and reformated the region flags output when it makes them into a string.
This commit is contained in:
@@ -6140,6 +6140,17 @@
|
||||
<key>Value</key>
|
||||
<real>128.0</real>
|
||||
</map>
|
||||
<key>MapShowAgentCount</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>Show number of agents next to region names on world map</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>Boolean</string>
|
||||
<key>Value</key>
|
||||
<integer>1</integer>
|
||||
</map>
|
||||
<key>MapShowEvents</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
|
||||
@@ -231,7 +231,14 @@ LLFloaterAvatarList::~LLFloaterAvatarList()
|
||||
gIdleCallbacks.deleteFunction(LLFloaterAvatarList::callbackIdle);
|
||||
sInstance = NULL;
|
||||
}
|
||||
|
||||
//static
|
||||
void LLFloaterAvatarList::createInstance(bool visible)
|
||||
{
|
||||
sInstance = new LLFloaterAvatarList();
|
||||
LLUICtrlFactory::getInstance()->buildFloater(sInstance, "floater_radar.xml");
|
||||
if(!visible)
|
||||
sInstance->setVisible(FALSE);
|
||||
}
|
||||
//static
|
||||
void LLFloaterAvatarList::toggle(void*)
|
||||
{
|
||||
@@ -279,8 +286,7 @@ void LLFloaterAvatarList::showInstance()
|
||||
}
|
||||
else
|
||||
{
|
||||
sInstance = new LLFloaterAvatarList();
|
||||
LLUICtrlFactory::getInstance()->buildFloater(sInstance, "floater_radar.xml");
|
||||
createInstance(true);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -149,7 +149,7 @@ public:
|
||||
/*virtual*/ void onOpen();
|
||||
/*virtual*/ BOOL postBuild();
|
||||
/*virtual*/ void draw();
|
||||
|
||||
static void createInstance(bool visible);
|
||||
/**
|
||||
* @brief Toggles interface visibility
|
||||
* There is only one instance of the avatar scanner at any time.
|
||||
|
||||
@@ -2598,7 +2598,7 @@ bool idle_startup()
|
||||
LLRect window(0, gViewerWindow->getWindowHeight(), gViewerWindow->getWindowWidth(), 0);
|
||||
gViewerWindow->adjustControlRectanglesForFirstUse(window);
|
||||
|
||||
if(gSavedSettings.getBOOL("ShowMiniMap"))
|
||||
if (gSavedSettings.getBOOL("ShowMiniMap"))
|
||||
{
|
||||
LLFloaterMap::showInstance();
|
||||
}
|
||||
@@ -2606,6 +2606,12 @@ bool idle_startup()
|
||||
{
|
||||
LLFloaterAvatarList::showInstance();
|
||||
}
|
||||
// <edit>
|
||||
else if (gSavedSettings.getBOOL("RadarKeepOpen"))
|
||||
{
|
||||
LLFloaterAvatarList::createInstance(false);
|
||||
}
|
||||
// </edit>
|
||||
if (gSavedSettings.getBOOL("ShowCameraControls"))
|
||||
{
|
||||
LLFloaterCamera::showInstance();
|
||||
|
||||
@@ -532,16 +532,61 @@ const std::string LLViewerRegion::getSimAccessString() const
|
||||
std::string LLViewerRegion::regionFlagsToString(U32 flags)
|
||||
{
|
||||
std::string result;
|
||||
|
||||
if (flags & REGION_FLAGS_SANDBOX)
|
||||
{
|
||||
if(!result.empty()) result += ", ";
|
||||
result += "Sandbox";
|
||||
}
|
||||
|
||||
if (flags & REGION_FLAGS_ALLOW_DAMAGE)
|
||||
{
|
||||
result += " Not Safe";
|
||||
if(!result.empty()) result += ", ";
|
||||
result += "Not Safe";
|
||||
}
|
||||
// <edit>
|
||||
//These dont seem to have value anymore.
|
||||
/*if (!(flags & REGION_FLAGS_PUBLIC_ALLOWED))
|
||||
{
|
||||
if(!result.empty()) result += ", ";
|
||||
result += "Private";
|
||||
}
|
||||
|
||||
if (!(flags & REGION_FLAGS_ALLOW_VOICE))
|
||||
{
|
||||
if(!result.empty()) result += ", ";
|
||||
result += "Voice Disabled";
|
||||
}*/
|
||||
if (flags & REGION_FLAGS_ALLOW_LANDMARK)
|
||||
{
|
||||
if(!result.empty()) result += ", ";
|
||||
result += "Create Landmarks";
|
||||
}
|
||||
|
||||
if (flags & REGION_FLAGS_ALLOW_DIRECT_TELEPORT)
|
||||
{
|
||||
if(!result.empty()) result += ", ";
|
||||
result += "Direct Teleport";
|
||||
}
|
||||
|
||||
if (flags & REGION_FLAGS_DENY_ANONYMOUS)
|
||||
{
|
||||
if(!result.empty()) result += ", ";
|
||||
result += "Payment Info needed";
|
||||
}
|
||||
|
||||
if (flags & REGION_FLAGS_DENY_AGEUNVERIFIED)
|
||||
{
|
||||
if(!result.empty()) result += ", ";
|
||||
result += "Age Verified";
|
||||
}
|
||||
|
||||
if (flags & REGION_FLAGS_BLOCK_FLY)
|
||||
{
|
||||
if(!result.empty()) result += ", ";
|
||||
result += "No Fly";
|
||||
}
|
||||
|
||||
// </edit>
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -113,6 +113,7 @@ public:
|
||||
const std::string getName() const { return mName; }
|
||||
const std::string getFlagsString() const { return LLViewerRegion::regionFlagsToString(mRegionFlags); }
|
||||
const std::string getAccessString() const { return LLViewerRegion::accessToString((U8)mAccess); }
|
||||
const std::string getShortAccessString() const { return LLViewerRegion::accessToShortString((U8)mAccess); }
|
||||
|
||||
const S32 getAgentCount() const; // Compute the total agents count
|
||||
LLPointer<LLViewerImage> getLandForSaleImage(); // Get the overlay image, fetch it if necessary
|
||||
|
||||
@@ -460,9 +460,38 @@ void LLWorldMapView::draw()
|
||||
{
|
||||
mesg = llformat( "%s (%s)", info->getName().c_str(), sStringsMap["offline"].c_str());
|
||||
}
|
||||
// <edit>
|
||||
else if (gSavedSettings.getBOOL("MapShowAgentCount") && gSavedSettings.getBOOL("MapShowPeople"))
|
||||
{
|
||||
// Display the agent count after the region name
|
||||
S32 agent_count = info->getAgentCount();
|
||||
LLViewerRegion *region = gAgent.getRegion();
|
||||
|
||||
if (region && region->getHandle() == handle)
|
||||
{
|
||||
++agent_count; // Bump by 1 if we're in this region
|
||||
}
|
||||
|
||||
if (agent_count > 0)
|
||||
{
|
||||
std::string count = llformat("%d %s", agent_count, agent_count > 1 ? "avatars" : "avatar");
|
||||
font->renderUTF8(
|
||||
count, 0,
|
||||
llfloor(left + 3),
|
||||
llfloor(bottom + 20),
|
||||
LLColor4::white,
|
||||
LLFontGL::LEFT,
|
||||
LLFontGL::BASELINE,
|
||||
LLFontGL::DROP_SHADOW);
|
||||
|
||||
}
|
||||
mesg = info->getName() + " (" + info->getShortAccessString() +")";
|
||||
}
|
||||
// </edit>
|
||||
else
|
||||
{
|
||||
mesg = info->getName();
|
||||
// <edit>
|
||||
mesg = info->getName() + " (" + info->getShortAccessString() +")";
|
||||
}
|
||||
if (!mesg.empty())
|
||||
{
|
||||
@@ -1053,11 +1082,13 @@ BOOL LLWorldMapView::handleToolTip( S32 x, S32 y, std::string& msg, LLRect* stic
|
||||
|
||||
if (agent_count == 1)
|
||||
{
|
||||
message += "person";
|
||||
// <edit>
|
||||
message += "agents";
|
||||
}
|
||||
else
|
||||
{
|
||||
message += "people";
|
||||
// <edit>
|
||||
message += "agents";
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1066,11 +1097,14 @@ BOOL LLWorldMapView::handleToolTip( S32 x, S32 y, std::string& msg, LLRect* stic
|
||||
// Optionally show region flags
|
||||
std::string region_flags = info->getFlagsString();
|
||||
|
||||
// <edit>
|
||||
// always seems to be zero anyways...
|
||||
if (!region_flags.empty())
|
||||
{
|
||||
msg += '\n';
|
||||
msg += region_flags;
|
||||
msg += "Region Flags: " + region_flags;
|
||||
}
|
||||
// </edit>
|
||||
|
||||
S32 SLOP = 4;
|
||||
localPointToScreen(
|
||||
|
||||
Reference in New Issue
Block a user