[Radar] Code overhaul
Brings a new "voice status" column, showing voice use as active speakers floater does. - Shown by default, look in Extras tab to hide it Attempt to blend and fix the visibility of the yellow for shout range. - Requires user feedback, looks good on default and gemini to me Refactors pretty much all of the code in the avatar list -Less duplicate vars, less wasted space, more consistent spacing conventions, eradication of BOOL use. We no longer add (or even evaluate what should be in) icon columns that are hidden - This prevents icons from showing up even when their columns are hidden. Minor work on focusing out of draw avatars, though that still won't work, sadly.
This commit is contained in:
@@ -7299,6 +7299,17 @@ This should be as low as possible, but too low may break functionality</string>
|
||||
<key>Value</key>
|
||||
<integer>24</integer>
|
||||
</map>
|
||||
<key>RadarColumnVoiceWidth</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>Width for radar's voice status 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>
|
||||
@@ -7376,6 +7387,17 @@ This should be as low as possible, but too low may break functionality</string>
|
||||
<key>Value</key>
|
||||
<integer>0</integer>
|
||||
</map>
|
||||
<key>RadarColumnVoiceHidden</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>Hide radar's voice status column</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>Boolean</string>
|
||||
<key>Value</key>
|
||||
<boolean>0</boolean>
|
||||
</map>
|
||||
<key>RadarColumnAgeHidden</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -80,7 +80,7 @@ enum ACTIVITY_TYPE
|
||||
* Update world position.
|
||||
* Affects age.
|
||||
*/
|
||||
void setPosition(LLVector3d position, bool this_sim, bool drawn, bool chatrange, bool shoutrange);
|
||||
void setPosition(const LLVector3d& position, bool this_sim, bool drawn, bool chatrange, bool shoutrange);
|
||||
|
||||
const LLVector3d& getPosition() const { return mPosition; }
|
||||
|
||||
@@ -90,7 +90,7 @@ enum ACTIVITY_TYPE
|
||||
* This is only used for determining whether the avatar is still around.
|
||||
* @see getEntryAgeSeconds
|
||||
*/
|
||||
bool getAlive();
|
||||
bool getAlive() const;
|
||||
|
||||
/**
|
||||
* @brief Returns the age of this entry in seconds
|
||||
@@ -111,14 +111,14 @@ enum ACTIVITY_TYPE
|
||||
void setActivity(ACTIVITY_TYPE activity);
|
||||
|
||||
/**
|
||||
* @brief Returns the activity type
|
||||
* @brief Returns the activity type, updates mActivityType if necessary
|
||||
*/
|
||||
const ACTIVITY_TYPE getActivity();
|
||||
|
||||
/**
|
||||
* @brief Sets the 'focus' status on this entry (camera focused on this avatar)
|
||||
*/
|
||||
void setFocus(BOOL value) { mFocused = value; }
|
||||
void setFocus(bool value) { mFocused = value; }
|
||||
|
||||
bool isFocused() const { return mFocused; }
|
||||
|
||||
@@ -134,7 +134,7 @@ enum ACTIVITY_TYPE
|
||||
bool isInList() const { return mIsInList; }
|
||||
/**
|
||||
* @brief Returns whether the item is dead and shouldn't appear in the list
|
||||
* @returns TRUE if dead
|
||||
* @returns true if dead
|
||||
*/
|
||||
bool isDead() const;
|
||||
|
||||
@@ -211,7 +211,6 @@ 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.
|
||||
@@ -238,20 +237,20 @@ public:
|
||||
* @brief Returns the entry for an avatar, if preset
|
||||
* @returns Pointer to avatar entry, NULL if not found.
|
||||
*/
|
||||
LLAvatarListEntry* getAvatarEntry(LLUUID avatar);
|
||||
LLAvatarListEntry* getAvatarEntry(const LLUUID& avatar) const;
|
||||
|
||||
/**
|
||||
* @brief Returns a string with the selected names in the list
|
||||
*/
|
||||
std::string getSelectedNames(const std::string& separator = ", ");
|
||||
std::string getSelectedName();
|
||||
LLUUID getSelectedID();
|
||||
uuid_vec_t getSelectedIDs();
|
||||
std::string getSelectedNames(const std::string& separator = ", ") const;
|
||||
std::string getSelectedName() const;
|
||||
LLUUID getSelectedID() const;
|
||||
uuid_vec_t getSelectedIDs() const;
|
||||
|
||||
static void lookAtAvatar(LLUUID &uuid);
|
||||
static bool lookAtAvatar(const LLUUID& uuid);
|
||||
|
||||
static void sound_trigger_hook(LLMessageSystem* msg,void **);
|
||||
void sendKeys();
|
||||
void sendKeys() const;
|
||||
|
||||
typedef boost::shared_ptr<LLAvatarListEntry> LLAvatarListEntryPtr;
|
||||
typedef std::vector< LLAvatarListEntryPtr > av_list_t;
|
||||
@@ -268,6 +267,7 @@ public:
|
||||
LIST_POSITION,
|
||||
LIST_ALTITUDE,
|
||||
LIST_ACTIVITY,
|
||||
LIST_VOICE,
|
||||
LIST_AGE,
|
||||
LIST_TIME,
|
||||
LIST_CLIENT,
|
||||
@@ -289,16 +289,16 @@ public:
|
||||
* @brief Focus camera on previous avatar
|
||||
* @param marked_only Whether to choose only marked avatars
|
||||
*/
|
||||
void focusOnPrev(BOOL marked_only);
|
||||
void focusOnPrev(bool marked_only);
|
||||
|
||||
/**
|
||||
* @brief Focus camera on next avatar
|
||||
* @param marked_only Whether to choose only marked avatars
|
||||
*/
|
||||
void focusOnNext(BOOL marked_only);
|
||||
void focusOnNext(bool marked_only);
|
||||
|
||||
void refreshTracker();
|
||||
void trackAvatar(const LLAvatarListEntry* entry);
|
||||
void trackAvatar(const LLAvatarListEntry* entry) const;
|
||||
|
||||
/**
|
||||
* @brief Handler for the "refresh" button click.
|
||||
@@ -325,7 +325,8 @@ public:
|
||||
void onClickEject();
|
||||
void onClickEjectFromEstate();
|
||||
void onClickBanFromEstate();
|
||||
void onAvatarSortingChanged();
|
||||
|
||||
void onAvatarSortingChanged() { mDirtyAvatarSorting = true; }
|
||||
|
||||
/**
|
||||
* @brief Called via notification feedback.
|
||||
@@ -339,7 +340,7 @@ public:
|
||||
|
||||
static void callbackIdle(void *userdata);
|
||||
|
||||
void doCommand(avlist_command_t cmd, bool single = false);
|
||||
void doCommand(avlist_command_t cmd, bool single = false) const;
|
||||
|
||||
/**
|
||||
* @brief Cleanup avatar list, removing dead entries from it.
|
||||
@@ -359,7 +360,7 @@ private:
|
||||
bool mDirtyAvatarSorting;
|
||||
|
||||
/**
|
||||
* @brief TRUE when Updating
|
||||
* @brief true when Updating
|
||||
*/
|
||||
const LLCachedControl<bool> mUpdate;
|
||||
|
||||
|
||||
@@ -17,6 +17,7 @@
|
||||
<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="voice" image_overlay="inv_item_sound.tga" width="24" tool_tip="Voice Status"/>
|
||||
<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"/>
|
||||
@@ -355,7 +356,8 @@
|
||||
<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="RadarColumnActivityHidden" name="hide_act" label="Act." tool_tip="Activity"/>
|
||||
<check_box follows="bottom|left" bottom_delta="-20" left="5" control_name="RadarColumnVoiceHidden" name="hide_voice" label="Voice" tool_tip="Voice Status"/>
|
||||
<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"/>
|
||||
|
||||
@@ -176,6 +176,10 @@
|
||||
<on_click function="ToggleControl" userdata="RadarColumnActivityHidden"/>
|
||||
<on_check control="RadarColumnActivityHidden"/>
|
||||
</menu_item_check>
|
||||
<menu_item_check label="Voice" name="Voice">
|
||||
<on_click function="ToggleControl" userdata="RadarColumnVoiceHidden"/>
|
||||
<on_check control="RadarColumnVoiceHidden"/>
|
||||
</menu_item_check>
|
||||
<menu_item_check label="Age" name="Age">
|
||||
<on_click function="ToggleControl" userdata="RadarColumnAgeHidden"/>
|
||||
<on_check control="RadarColumnAgeHidden"/>
|
||||
|
||||
Reference in New Issue
Block a user