Satisfy radar issues: 51(Avatar Age), 382(Time duration), 245(Hide columns on command)
Overall: Extras tab added to radar. Activities given tool_tip strings, TODO: Get icon entries to have tool_tips. Added tab_min_width="0" to tab container so tabs take up only as much space as necessary. Issue 51: RadarAlertAge, AvatarAgeAlertDays debugs added. RadarTextYoung color added to colors_base and gemini. UI bits added to radar. ALERT_TYPE_AGE, LIST_AGE, and boost::lexical_cast added. LLAvatarListEntry is now derived from LLAvatarPropertiesObserver for processProperties and all that fun stuff. Also has mAgeAlert and mAge. processProperties is basically copied directly from LLAvatarPanel, it can probably be bettered. Issue 382: mTime, getTime(), LIST_TIME Time column. Issue 245: Hide columns text and checkboxes added to UI. assessColumns() now used to determine which columns to show. Also once used during postBuild() col_helper() function added to help decide to hide or resize a column based on given params. checkboxes all use assessColumns as callback. RadarColumn* debug settings added. If you read this all, that's a sign the 'pocalypse is coming.
This commit is contained in:
@@ -6307,6 +6307,149 @@ This should be as low as possible, but too low may break functionality</string>
|
||||
<integer>0</integer>
|
||||
</array>
|
||||
</map>
|
||||
<key>RadarColumnMarkWidth</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>Width for radar's mark column</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>S32</string>
|
||||
<key>Value</key>
|
||||
<integer>12</integer>
|
||||
</map>
|
||||
<key>RadarColumnPositionWidth</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>Width for radar's position column</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>S32</string>
|
||||
<key>Value</key>
|
||||
<integer>60</integer>
|
||||
</map>
|
||||
<key>RadarColumnAltitudeWidth</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>Width for radar's altitude column</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>S32</string>
|
||||
<key>Value</key>
|
||||
<integer>48</integer>
|
||||
</map>
|
||||
<key>RadarColumnActivityWidth</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>Width for radar's activity column</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>S32</string>
|
||||
<key>Value</key>
|
||||
<integer>24</integer>
|
||||
</map>
|
||||
<key>RadarColumnAgeWidth</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>Width for radar's age column</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>S32</string>
|
||||
<key>Value</key>
|
||||
<integer>45</integer>
|
||||
</map>
|
||||
<key>RadarColumnTimeWidth</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>Width for radar's time column</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>S32</string>
|
||||
<key>Value</key>
|
||||
<integer>52</integer>
|
||||
</map>
|
||||
<key>RadarColumnMarkHidden</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>Hide radar's mark column</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>Boolean</string>
|
||||
<key>Value</key>
|
||||
<integer>0</integer>
|
||||
</map>
|
||||
<key>RadarColumnPositionHidden</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>Hide radar's position column</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>Boolean</string>
|
||||
<key>Value</key>
|
||||
<integer>0</integer>
|
||||
</map>
|
||||
<key>RadarColumnAltitudeHidden</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>Hide radar's altitude column</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>Boolean</string>
|
||||
<key>Value</key>
|
||||
<integer>0</integer>
|
||||
</map>
|
||||
<key>RadarColumnActivityHidden</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>Hide radar's activity column</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>Boolean</string>
|
||||
<key>Value</key>
|
||||
<integer>0</integer>
|
||||
</map>
|
||||
<key>RadarColumnAgeHidden</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>Hide radar's age column</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>Boolean</string>
|
||||
<key>Value</key>
|
||||
<integer>0</integer>
|
||||
</map>
|
||||
<key>RadarColumnTimeHidden</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>Hide radar's time column</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>Boolean</string>
|
||||
<key>Value</key>
|
||||
<integer>1</integer>
|
||||
</map>
|
||||
<key>RadarColumnClientHidden</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>Hide radar's client column</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>Boolean</string>
|
||||
<key>Value</key>
|
||||
<integer>0</integer>
|
||||
</map>
|
||||
<key>RadarKeepOpen</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
@@ -6373,6 +6516,28 @@ This should be as low as possible, but too low may break functionality</string>
|
||||
<key>Value</key>
|
||||
<integer>1</integer>
|
||||
</map>
|
||||
<key>RadarAlertAge</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>Whether the radar emits chat alerts for avatars younger than AvatarAgeAlertDays appearing.</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>Boolean</string>
|
||||
<key>Value</key>
|
||||
<integer>0</integer>
|
||||
</map>
|
||||
<key>AvatarAgeAlertDays</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>Age below which avatars will be made known to you</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>U32</string>
|
||||
<key>Value</key>
|
||||
<integer>3</integer>
|
||||
</map>
|
||||
<key>RadarChatAlerts</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
|
||||
@@ -53,6 +53,7 @@
|
||||
|
||||
#include <map>
|
||||
#include <boost/foreach.hpp>
|
||||
#include <boost/lexical_cast.hpp>
|
||||
|
||||
#include "llworld.h"
|
||||
#include "llsdutil.h"
|
||||
@@ -79,6 +80,7 @@ typedef enum e_radar_alert_type
|
||||
ALERT_TYPE_DRAW = 2,
|
||||
ALERT_TYPE_SHOUTRANGE = 4,
|
||||
ALERT_TYPE_CHATRANGE = 8,
|
||||
ALERT_TYPE_AGE = 16,
|
||||
} ERadarAlertType;
|
||||
|
||||
void chat_avatar_status(std::string name, LLUUID key, ERadarAlertType type, bool entering)
|
||||
@@ -90,10 +92,12 @@ void chat_avatar_status(std::string name, LLUUID key, ERadarAlertType type, bool
|
||||
static LLCachedControl<bool> radar_alert_draw(gSavedSettings, "RadarAlertDraw");
|
||||
static LLCachedControl<bool> radar_alert_shout_range(gSavedSettings, "RadarAlertShoutRange");
|
||||
static LLCachedControl<bool> radar_alert_chat_range(gSavedSettings, "RadarAlertChatRange");
|
||||
static LLCachedControl<bool> radar_alert_age(gSavedSettings, "RadarAlertAge");
|
||||
static LLCachedControl<bool> radar_chat_keys(gSavedSettings, "RadarChatKeys");
|
||||
|
||||
LLFloaterAvatarList* self = LLFloaterAvatarList::getInstance();
|
||||
LLStringUtil::format_map_t args;
|
||||
args["[NAME]"] = name;
|
||||
switch(type)
|
||||
{
|
||||
case ALERT_TYPE_SIM:
|
||||
@@ -123,10 +127,21 @@ void chat_avatar_status(std::string name, LLUUID key, ERadarAlertType type, bool
|
||||
args["[RANGE]"] = self->getString("chat_range");
|
||||
}
|
||||
break;
|
||||
|
||||
case ALERT_TYPE_AGE:
|
||||
if (radar_alert_age)
|
||||
{
|
||||
LLChat chat;
|
||||
chat.mFromName = name;
|
||||
chat.mText = name + " " + self->getString("has_triggered_your_avatar_age_alert") + ".";
|
||||
chat.mURL = llformat("secondlife:///app/agent/%s/about",key.asString().c_str());
|
||||
chat.mSourceType = CHAT_SOURCE_SYSTEM;
|
||||
LLFloaterChat::addChat(chat);
|
||||
}
|
||||
break;
|
||||
}
|
||||
if (args.find("[RANGE]") != args.end())
|
||||
{
|
||||
args["[NAME]"] = name;
|
||||
args["[ACTION]"] = self->getString(entering ? "has_entered" : "has_left");
|
||||
LLChat chat;
|
||||
chat.mText = self->getString("template", args);
|
||||
@@ -142,8 +157,40 @@ LLAvatarListEntry::LLAvatarListEntry(const LLUUID& id, const std::string &name,
|
||||
mUpdateTimer(), mFrame(gFrameCount), mInSimFrame(U32_MAX), mInDrawFrame(U32_MAX),
|
||||
mInChatFrame(U32_MAX), mInShoutFrame(U32_MAX),
|
||||
mActivityType(ACTIVITY_NEW), mActivityTimer(),
|
||||
mIsInList(false)
|
||||
mIsInList(false), mAge(-1), mAgeAlert(false), mTime(time(NULL))
|
||||
{
|
||||
if (mID.notNull())
|
||||
LLAvatarPropertiesProcessor::getInstance()->addObserver(mID, this);
|
||||
}
|
||||
|
||||
LLAvatarListEntry::~LLAvatarListEntry()
|
||||
{
|
||||
if (mID.notNull())
|
||||
LLAvatarPropertiesProcessor::getInstance()->removeObserver(mID, this);
|
||||
}
|
||||
|
||||
// virtual
|
||||
void LLAvatarListEntry::processProperties(void* data, EAvatarProcessorType type)
|
||||
{
|
||||
if(type == APT_PROPERTIES)
|
||||
{
|
||||
const LLAvatarData* pAvatarData = static_cast<const LLAvatarData*>(data);
|
||||
if (pAvatarData && (pAvatarData->avatar_id != LLUUID::null))
|
||||
{
|
||||
//Chalice - Show avatar age in days.
|
||||
int year, month, day;
|
||||
sscanf(pAvatarData->born_on.c_str(),"%d/%d/%d",&month,&day,&year);
|
||||
time_t now = time(NULL);
|
||||
struct tm * timeinfo;
|
||||
timeinfo=localtime(&now);
|
||||
timeinfo->tm_mon = --month;
|
||||
timeinfo->tm_year = year - 1900;
|
||||
timeinfo->tm_mday = day;
|
||||
time_t birth = mktime(timeinfo);
|
||||
mAge = difftime(now,birth) / (60*60*24);
|
||||
// If one wanted more information that gets displayed on profiles to be displayed, here would be the place to do it.
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void LLAvatarListEntry::setPosition(LLVector3d position, bool this_sim, bool drawn, bool chatrange, bool shoutrange)
|
||||
@@ -354,6 +401,13 @@ BOOL LLFloaterAvatarList::postBuild()
|
||||
getChild<LLRadioGroup>("update_rate")->setSelectedIndex(gSavedSettings.getU32("RadarUpdateRate"));
|
||||
getChild<LLRadioGroup>("update_rate")->setCommitCallback(boost::bind(&LLFloaterAvatarList::onCommitUpdateRate, this));
|
||||
|
||||
getChild<LLCheckboxCtrl>("hide_mark")->setCommitCallback(boost::bind(&LLFloaterAvatarList::assessColumns, this));
|
||||
getChild<LLCheckboxCtrl>("hide_pos")->setCommitCallback(boost::bind(&LLFloaterAvatarList::assessColumns, this));
|
||||
getChild<LLCheckboxCtrl>("hide_alt")->setCommitCallback(boost::bind(&LLFloaterAvatarList::assessColumns, this));
|
||||
getChild<LLCheckboxCtrl>("hide_act")->setCommitCallback(boost::bind(&LLFloaterAvatarList::assessColumns, this));
|
||||
getChild<LLCheckboxCtrl>("hide_age")->setCommitCallback(boost::bind(&LLFloaterAvatarList::assessColumns, this));
|
||||
getChild<LLCheckboxCtrl>("hide_time")->setCommitCallback(boost::bind(&LLFloaterAvatarList::assessColumns, this));
|
||||
|
||||
// Get a pointer to the scroll list from the interface
|
||||
mAvatarList = getChild<LLScrollListCtrl>("avatar_list");
|
||||
mAvatarList->sortByColumn("distance", TRUE);
|
||||
@@ -365,20 +419,69 @@ BOOL LLFloaterAvatarList::postBuild()
|
||||
|
||||
gIdleCallbacks.addFunction(LLFloaterAvatarList::callbackIdle);
|
||||
|
||||
if(gHippoGridManager->getConnectedGrid()->isSecondLife()){
|
||||
LLScrollListCtrl* list = getChild<LLScrollListCtrl>("avatar_list");
|
||||
list->getColumn(LIST_AVATAR_NAME)->setWidth(0);
|
||||
list->getColumn(LIST_CLIENT)->setWidth(0);
|
||||
list->getColumn(LIST_CLIENT)->mDynamicWidth = FALSE;
|
||||
list->getColumn(LIST_CLIENT)->mRelWidth = 0;
|
||||
list->getColumn(LIST_AVATAR_NAME)->mDynamicWidth = TRUE;
|
||||
list->getColumn(LIST_AVATAR_NAME)->mRelWidth = -1;
|
||||
list->updateLayout();
|
||||
}
|
||||
assessColumns();
|
||||
|
||||
if(gHippoGridManager->getConnectedGrid()->isSecondLife())
|
||||
childSetVisible("hide_client", false);
|
||||
else
|
||||
getChild<LLCheckboxCtrl>("hide_client")->setCommitCallback(boost::bind(&LLFloaterAvatarList::assessColumns, this));
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
void col_helper(const bool hide, const std::string width_ctrl_name, LLScrollListColumn* col)
|
||||
{
|
||||
// Brief Explanation:
|
||||
// Check if we want the column hidden, and if it's still showing. If so, hide it, but save its width.
|
||||
// Otherwise, if we don't want it hidden, but it is, unhide it to the saved width.
|
||||
// We only store width of columns when hiding here for the purpose of hiding and unhiding.
|
||||
const int width = col->getWidth();
|
||||
|
||||
if (hide && width)
|
||||
{
|
||||
gSavedSettings.setS32(width_ctrl_name, width);
|
||||
col->setWidth(0);
|
||||
}
|
||||
else if(!hide && !width)
|
||||
{
|
||||
llinfos << "We got into the setter!!" << llendl;
|
||||
col->setWidth(gSavedSettings.getS32(width_ctrl_name));
|
||||
}
|
||||
}
|
||||
|
||||
void LLFloaterAvatarList::assessColumns()
|
||||
{
|
||||
static LLCachedControl<bool> hide_mark(gSavedSettings, "RadarColumnMarkHidden");
|
||||
col_helper(hide_mark, "RadarColumnMarkWidth", mAvatarList->getColumn(LIST_MARK));
|
||||
|
||||
static LLCachedControl<bool> hide_pos(gSavedSettings, "RadarColumnPositionHidden");
|
||||
col_helper(hide_pos, "RadarColumnPositionWidth", mAvatarList->getColumn(LIST_POSITION));
|
||||
|
||||
static LLCachedControl<bool> hide_alt(gSavedSettings, "RadarColumnAltitudeHidden");
|
||||
col_helper(hide_alt, "RadarColumnAltitudeWidth", mAvatarList->getColumn(LIST_ALTITUDE));
|
||||
|
||||
static LLCachedControl<bool> hide_act(gSavedSettings, "RadarColumnActivityHidden");
|
||||
col_helper(hide_act, "RadarColumnActivityWidth", mAvatarList->getColumn(LIST_ACTIVITY));
|
||||
|
||||
static LLCachedControl<bool> hide_age(gSavedSettings, "RadarColumnAgeHidden");
|
||||
col_helper(hide_age, "RadarColumnAgeWidth", mAvatarList->getColumn(LIST_AGE));
|
||||
|
||||
static LLCachedControl<bool> hide_time(gSavedSettings, "RadarColumnTimeHidden");
|
||||
col_helper(hide_time, "RadarColumnTimeWidth", mAvatarList->getColumn(LIST_TIME));
|
||||
|
||||
static LLCachedControl<bool> hide_client(gSavedSettings, "RadarColumnClientHidden");
|
||||
if (gHippoGridManager->getConnectedGrid()->isSecondLife() || hide_client){
|
||||
mAvatarList->getColumn(LIST_AVATAR_NAME)->setWidth(0);
|
||||
mAvatarList->getColumn(LIST_CLIENT)->setWidth(0);
|
||||
mAvatarList->getColumn(LIST_CLIENT)->mDynamicWidth = FALSE;
|
||||
mAvatarList->getColumn(LIST_CLIENT)->mRelWidth = 0;
|
||||
mAvatarList->getColumn(LIST_AVATAR_NAME)->mDynamicWidth = TRUE;
|
||||
mAvatarList->getColumn(LIST_AVATAR_NAME)->mRelWidth = -1;
|
||||
}
|
||||
|
||||
mAvatarList->updateLayout();
|
||||
}
|
||||
|
||||
void updateParticleActivity(LLDrawable *drawablep)
|
||||
{
|
||||
if (LLFloaterAvatarList::instanceExists())
|
||||
@@ -716,6 +819,10 @@ void LLFloaterAvatarList::refreshAvatarList()
|
||||
continue;
|
||||
}
|
||||
|
||||
//Request properties here, so we'll have them later on when we need them
|
||||
LLAvatarPropertiesProcessor::getInstance()->addObserver(entry.mID, &entry);
|
||||
LLAvatarPropertiesProcessor::getInstance()->sendAvatarPropertiesRequest(entry.mID);
|
||||
|
||||
element["id"] = av_id;
|
||||
|
||||
element["columns"][LIST_MARK]["column"] = "marked";
|
||||
@@ -755,6 +862,7 @@ void LLFloaterAvatarList::refreshAvatarList()
|
||||
static LLCachedControl<LLColor4> sRadarTextChatRange(gColors, "RadarTextChatRange");
|
||||
static LLCachedControl<LLColor4> sRadarTextShoutRange(gColors, "RadarTextShoutRange");
|
||||
static LLCachedControl<LLColor4> sRadarTextDrawDist(gColors, "RadarTextDrawDist");
|
||||
static LLCachedControl<LLColor4> sRadarTextYoung(gColors, "RadarTextYoung");
|
||||
LLColor4 name_color = sDefaultListText;
|
||||
|
||||
//Lindens are always more Linden than your friend, make that take precedence
|
||||
@@ -872,28 +980,50 @@ void LLFloaterAvatarList::refreshAvatarList()
|
||||
element["columns"][LIST_ACTIVITY]["type"] = "icon";
|
||||
|
||||
std::string activity_icon = "";
|
||||
std::string activity_tip = "";
|
||||
switch(entry.getActivity())
|
||||
{
|
||||
case LLAvatarListEntry::ACTIVITY_MOVING:
|
||||
activity_icon = "inv_item_animation.tga";
|
||||
{
|
||||
activity_icon = "inv_item_animation.tga";
|
||||
activity_tip = getString("Moving");
|
||||
}
|
||||
break;
|
||||
case LLAvatarListEntry::ACTIVITY_GESTURING:
|
||||
activity_icon = "inv_item_gesture.tga";
|
||||
{
|
||||
activity_icon = "inv_item_gesture.tga";
|
||||
activity_tip = getString("Playing a gesture");
|
||||
}
|
||||
break;
|
||||
case LLAvatarListEntry::ACTIVITY_SOUND:
|
||||
activity_icon = "inv_item_sound.tga";
|
||||
{
|
||||
activity_icon = "inv_item_sound.tga";
|
||||
activity_tip = getString("Playing a sound");
|
||||
}
|
||||
break;
|
||||
case LLAvatarListEntry::ACTIVITY_REZZING:
|
||||
activity_icon = "ff_edit_theirs.tga";
|
||||
{
|
||||
activity_icon = "ff_edit_theirs.tga";
|
||||
activity_tip = getString("Rezzing objects");
|
||||
}
|
||||
break;
|
||||
case LLAvatarListEntry::ACTIVITY_PARTICLES:
|
||||
activity_icon = "particles_scan.tga";
|
||||
{
|
||||
activity_icon = "particles_scan.tga";
|
||||
activity_tip = getString("Creating particles");
|
||||
}
|
||||
break;
|
||||
case LLAvatarListEntry::ACTIVITY_NEW:
|
||||
activity_icon = "avatar_new.tga";
|
||||
{
|
||||
activity_icon = "avatar_new.tga";
|
||||
activity_tip = getString("Just arrived");
|
||||
}
|
||||
break;
|
||||
case LLAvatarListEntry::ACTIVITY_TYPING:
|
||||
activity_icon = "avatar_typing.tga";
|
||||
{
|
||||
activity_icon = "avatar_typing.tga";
|
||||
activity_tip = getString("Typing");
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
@@ -901,6 +1031,40 @@ void LLFloaterAvatarList::refreshAvatarList()
|
||||
|
||||
element["columns"][LIST_ACTIVITY]["value"] = activity_icon;//icon_image_id; //"icn_active-speakers-dot-lvl0.tga";
|
||||
//element["columns"][LIST_AVATAR_ACTIVITY]["color"] = icon_color.getValue();
|
||||
element["columns"][LIST_ACTIVITY]["tool_tip"] = activity_tip;
|
||||
|
||||
element["columns"][LIST_AGE]["column"] = "age";
|
||||
element["columns"][LIST_AGE]["type"] = "text";
|
||||
color = sDefaultListText;
|
||||
std::string age = boost::lexical_cast<std::string>(entry.mAge);
|
||||
if (entry.mAge > -1)
|
||||
{
|
||||
static LLCachedControl<U32> sAvatarAgeAlertDays(gSavedSettings, "AvatarAgeAlertDays");
|
||||
if (entry.mAge < sAvatarAgeAlertDays)
|
||||
{
|
||||
color = sRadarTextYoung;
|
||||
if (!entry.mAgeAlert) //Only announce age once per entry.
|
||||
{
|
||||
entry.mAgeAlert = true;
|
||||
chat_avatar_status(entry.getName().c_str(), av_id, ALERT_TYPE_AGE, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
age = "?";
|
||||
}
|
||||
element["columns"][LIST_AGE]["value"] = age;
|
||||
element["columns"][LIST_AGE]["color"] = color.getValue();
|
||||
|
||||
int dur = difftime(time(NULL), entry.getTime());
|
||||
int hours = dur / 360;
|
||||
int mins = (dur % 360) / 60;
|
||||
int secs = (dur % 360) % 60;
|
||||
|
||||
element["columns"][LIST_TIME]["column"] = "time";
|
||||
element["columns"][LIST_TIME]["type"] = "text";
|
||||
element["columns"][LIST_TIME]["value"] = llformat("%d:%02d:%02d", hours, mins, secs);
|
||||
|
||||
element["columns"][LIST_CLIENT]["column"] = "client";
|
||||
element["columns"][LIST_CLIENT]["type"] = "text";
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
//
|
||||
//
|
||||
#include "llavatarname.h"
|
||||
#include "llavatarpropertiesprocessor.h"
|
||||
#include "llfloater.h"
|
||||
#include "llfloaterreporter.h"
|
||||
#include "lluuid.h"
|
||||
@@ -29,7 +30,8 @@ class LLFloaterAvatarList;
|
||||
* Instances are kept in a map<LLAvatarListEntry>. We keep track of the
|
||||
* frame where the avatar was last seen.
|
||||
*/
|
||||
class LLAvatarListEntry {
|
||||
class LLAvatarListEntry : public LLAvatarPropertiesObserver
|
||||
{
|
||||
|
||||
public:
|
||||
|
||||
@@ -52,6 +54,10 @@ enum ACTIVITY_TYPE
|
||||
* @param position Avatar's current position
|
||||
*/
|
||||
LLAvatarListEntry(const LLUUID& id = LLUUID::null, const std::string &name = "", const LLVector3d &position = LLVector3d::zero);
|
||||
~LLAvatarListEntry();
|
||||
|
||||
// Get properties, such as age and other niceties displayed on profiles.
|
||||
/*virtual*/ void processProperties(void* data, EAvatarProcessorType type);
|
||||
|
||||
/**
|
||||
* Update world position.
|
||||
@@ -78,6 +84,7 @@ enum ACTIVITY_TYPE
|
||||
* @brief Returns the name of the avatar
|
||||
*/
|
||||
const std::string& getName() const { return mName; }
|
||||
const time_t& getTime() const { return mTime; }
|
||||
|
||||
/**
|
||||
* @brief Returns the ID of the avatar
|
||||
@@ -132,11 +139,14 @@ private:
|
||||
|
||||
LLUUID mID;
|
||||
std::string mName;
|
||||
time_t mTime;
|
||||
LLVector3d mPosition;
|
||||
LLVector3d mDrawPosition;
|
||||
bool mMarked;
|
||||
bool mFocused;
|
||||
bool mIsInList;
|
||||
bool mAgeAlert;
|
||||
int mAge;
|
||||
|
||||
/**
|
||||
* @brief Timer to keep track of whether avatars are still there
|
||||
@@ -202,6 +212,9 @@ public:
|
||||
|
||||
static void showInstance();
|
||||
|
||||
// Decides which user-chosen columns to show and hide.
|
||||
void assessColumns();
|
||||
|
||||
/**
|
||||
* @brief Updates the internal avatar list with the currently present avatars.
|
||||
*/
|
||||
@@ -245,6 +258,8 @@ private:
|
||||
LIST_POSITION,
|
||||
LIST_ALTITUDE,
|
||||
LIST_ACTIVITY,
|
||||
LIST_AGE,
|
||||
LIST_TIME,
|
||||
LIST_CLIENT,
|
||||
};
|
||||
|
||||
|
||||
@@ -153,6 +153,7 @@
|
||||
<RadarTextChatRange value="255, 0, 0, 255"/>
|
||||
<RadarTextShoutRange value="255, 255, 0, 128"/>
|
||||
<RadarTextDrawDist value="0, 153, 0, 255"/>
|
||||
<RadarTextYoung value="255, 0, 0, 255"/>
|
||||
|
||||
<!-- SPEAKERS -->
|
||||
<SpeakersInactive value="76, 76, 76, 255"/>
|
||||
|
||||
@@ -14,11 +14,13 @@
|
||||
<column name="position" label="Pos." width="60" tool_tip="Position (X, Y) within this sim, or general direction (cardinal point) for outside sims"/>
|
||||
<column name="altitude" label="Alt." width="48" tool_tip="Altitude"/>
|
||||
<column name="activity" label="Act." width="24" tool_tip="Activity"/>
|
||||
<column name="age" label="Age" width="45" tool_tip="Age"/>
|
||||
<column name="time" label="Time" width="52" tool_tip="Time since arrival in the sim."/>
|
||||
<column name="client" label="Client" width="80" dynamicwidth="true" tool_tip="Client the avatar is possibly using"/>
|
||||
</scroll_list>
|
||||
|
||||
<tab_container border="false" bottom_delta="-130" height="120" left="6" mouse_opaque="false"
|
||||
name="actions_tab_container" tab_position="top" follows="left|right|bottom">
|
||||
name="actions_tab_container" tab_position="top" tab_min_width="0" follows="left|right|bottom">
|
||||
<panel border="true" bottom_delta="-130" follows="left|top|right|bottom" height="255"
|
||||
label="Avatar" left="1" mouse_opaque="true"
|
||||
name="actions_tab" width="398">
|
||||
@@ -337,7 +339,33 @@
|
||||
follows="bottom|left"
|
||||
/>
|
||||
</panel>
|
||||
|
||||
<panel border="true" bottom_delta="-150" follows="left|top|right|bottom" height="255"
|
||||
label="Extras" left="1" mouse_opaque="true" name="extras_tab" width="398">
|
||||
<check_box label="Avatar Age Alert" left_delta="5" bottom="80" name="agealert"
|
||||
width="200" follows="bottom|left" control_name="RadarAlertAge" tool_tip="Enable Avatar Age Alert" />
|
||||
<spinner bottom_delta="-1" decimal_digits="0" follows="bottom|left" height="16"
|
||||
left_delta="120" increment="1" initial_val="3" min_val="0" max_val="9999"
|
||||
name="AgeAlertDays" label="Age Threshold" label_width="80"
|
||||
tool_tip="The minimum amount of days an avatar can have spent on the grid without triggering an alert" width="130" control_name="AvatarAgeAlertDays" />
|
||||
<text follows="bottom|left" left="2" name="hide_columns">Hide columns:</text>
|
||||
<check_box follows="bottom|left" bottom_delta="-25" left="5" control_name="RadarColumnMarkHidden" name="hide_mark" label="Mark"/>
|
||||
<check_box follows="bottom|left" bottom_delta="0" left_delta="70" control_name="RadarColumnPositionHidden" name="hide_pos" label="Pos." tool_tip="Position"/>
|
||||
<check_box follows="bottom|left" bottom_delta="0" left_delta="70" control_name="RadarColumnAltitudeHidden" name="hide_alt" label="Alt." tool_tip="Altitude"/>
|
||||
<check_box follows="bottom|left" bottom_delta="-20" left="5" control_name="RadarColumnActivityHidden" name="hide_act" label="Act." tool_tip="Activity"/>
|
||||
<check_box follows="bottom|left" bottom_delta="0" left_delta="70" control_name="RadarColumnAgeHidden" name="hide_age" label="Age"/>
|
||||
<check_box follows="bottom|left" bottom_delta="0" left_delta="70" control_name="RadarColumnTimeHidden" name="hide_time" label="Time"/>
|
||||
<check_box follows="bottom|left" bottom_delta="0" left_delta="70" control_name="RadarColumnClientHidden" name="hide_client" label="Client"/>
|
||||
</panel>
|
||||
</tab_container>
|
||||
<string name="Moving">Moving</string>
|
||||
<string name="Playing a gesture">Playing a gesture</string>
|
||||
<string name="Playing a sound">Playing a sound</string>
|
||||
<string name="Rezzing objects">Rezzing objects</string>
|
||||
<string name="Creating particles">Creating particles</string>
|
||||
<string name="Just arrived">Just arrived</string>
|
||||
<string name="Typing">Typing</string>
|
||||
<string name="has_triggered_your_avatar_age_alert">has triggered your avatar age alert</string>
|
||||
<string name="template">[NAME] [ACTION] [RANGE].</string>
|
||||
<!-- [ACTION] -->
|
||||
<string name="has_entered">has entered</string>
|
||||
|
||||
@@ -151,6 +151,7 @@
|
||||
<RadarTextChatRange value="255, 66, 66, 128"/>
|
||||
<RadarTextShoutRange value="255, 255, 66, 128"/>
|
||||
<RadarTextDrawDist value="66, 153, 66, 128"/>
|
||||
<RadarTextYoung value="255, 0, 0, 255"/>
|
||||
|
||||
<!-- SPEAKERS -->
|
||||
<SpeakersInactive value="76, 76, 76, 255"/>
|
||||
|
||||
Reference in New Issue
Block a user