Add option to show Client tags on a new line

The checkbox is available in Preferences > Vanity > Tags/Colors.
Debug Setting: SLBDisplayClientTagOnNewLine
This commit is contained in:
Salvatore La Bua
2013-09-28 05:32:54 +02:00
parent afe0f7ef3d
commit df7c60de35
8 changed files with 30 additions and 4 deletions

View File

@@ -868,6 +868,17 @@ Found in Advanced->Rendering->Info Displays</string>
<key>Value</key>
<integer>0</integer>
</map>
<key>SLBDisplayClientTagOnNewLine</key>
<map>
<key>Comment</key>
<string>Display the client tag on a new line</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>Boolean</string>
<key>Value</key>
<integer>0</integer>
</map>
<key>LogShowHistoryLines</key>
<map>
<key>Comment</key>

View File

@@ -66,6 +66,7 @@ LLPrefsAscentVan::LLPrefsAscentVan()
getChild<LLUICtrl>("show_self_tag_color_check")->setCommitCallback(boost::bind(&LLPrefsAscentVan::onCommitCheckBox, this, _1, _2));
getChild<LLUICtrl>("customize_own_tag_check")->setCommitCallback(boost::bind(&LLPrefsAscentVan::onCommitCheckBox, this, _1, _2));
getChild<LLUICtrl>("show_friend_tag_check")->setCommitCallback(boost::bind(&LLPrefsAscentVan::onCommitCheckBox, this, _1, _2));
getChild<LLUICtrl>("display_client_new_line_check")->setCommitCallback(boost::bind(&LLPrefsAscentVan::onCommitCheckBox, this, _1, _2));
getChild<LLUICtrl>("use_status_check")->setCommitCallback(boost::bind(&LLPrefsAscentVan::onCommitCheckBox, this, _1, _2));
getChild<LLUICtrl>("custom_tag_label_box")->setCommitCallback(boost::bind(&LLPrefsAscentVan::onCommitTextModified, this, _1, _2));
@@ -174,6 +175,7 @@ void LLPrefsAscentVan::refreshValues()
mShowSelfClientTag = gSavedSettings.getBOOL("AscentShowSelfTag");
mShowSelfClientTagColor = gSavedSettings.getBOOL("AscentShowSelfTagColor");
mShowFriendsTag = gSavedSettings.getBOOL("AscentShowFriendsTag");
mDisplayClientTagOnNewLine = gSavedSettings.getBOOL("SLBDisplayClientTagOnNewLine");
mCustomTagOn = gSavedSettings.getBOOL("AscentUseCustomTag");
mCustomTagLabel = gSavedSettings.getString("AscentCustomTagLabel");
mCustomTagColor = gSavedSettings.getColor4("AscentCustomTagColor");
@@ -246,6 +248,7 @@ void LLPrefsAscentVan::cancel()
gSavedSettings.setBOOL("AscentShowSelfTag", mShowSelfClientTag);
gSavedSettings.setBOOL("AscentShowSelfTagColor", mShowSelfClientTagColor);
gSavedSettings.setBOOL("AscentShowFriendsTag", mShowFriendsTag);
gSavedSettings.setBOOL("SLBDisplayClientTagOnNewLine", mDisplayClientTagOnNewLine);
gSavedSettings.setBOOL("AscentUseCustomTag", mCustomTagOn);
gSavedSettings.setString("AscentCustomTagLabel", mCustomTagLabel);
gSavedSettings.setColor4("AscentCustomTagColor", mCustomTagColor);

View File

@@ -71,6 +71,7 @@ protected:
BOOL mShowSelfClientTag;
BOOL mShowSelfClientTagColor;
BOOL mShowFriendsTag;
BOOL mDisplayClientTagOnNewLine;
BOOL mCustomTagOn;
std::string mCustomTagLabel;
LLColor4 mCustomTagColor;

View File

@@ -564,6 +564,7 @@ SHClientTagMgr::SHClientTagMgr()
gSavedSettings.getControl("AscentEstateOwnerColor")->getSignal()->connect(boost::bind(&LLVOAvatar::invalidateNameTags));
gSavedSettings.getControl("AscentFriendColor")->getSignal()->connect(boost::bind(&LLVOAvatar::invalidateNameTags));
gSavedSettings.getControl("AscentMutedColor")->getSignal()->connect(boost::bind(&LLVOAvatar::invalidateNameTags));
gSavedSettings.getControl("SLBDisplayClientTagOnNewLine")->getSignal()->connect(boost::bind(&LLVOAvatar::invalidateNameTags));
//Following group of settings all actually manipulate the tag cache for agent avatar. Even if the tag system is 'disabled', we still allow an
//entry to exist for the agent avatar.
@@ -3060,6 +3061,7 @@ void LLVOAvatar::idleUpdateNameTagText(BOOL new_name)
LLNameValue *title = getNVPair("Title");
LLNameValue* firstname = getNVPair("FirstName");
LLNameValue* lastname = getNVPair("LastName");
static const LLCachedControl<bool> display_client_new_line("SLBDisplayClientTagOnNewLine");
// Avatars must have a first and last name
if (!firstname || !lastname) return;
@@ -3282,7 +3284,12 @@ void LLVOAvatar::idleUpdateNameTagText(BOOL new_name)
else if(allow_nameplate_override && !mCCSAttachmentText.empty())
tag_format=mCCSAttachmentText;
else
tag_format=sRenderGroupTitles ? "%g\n%f %l %t" : "%f %l %t";
{
if(!display_client_new_line)
tag_format=sRenderGroupTitles ? "%g\n%f %l %t" : "%f %l %t";
else
tag_format=sRenderGroupTitles ? "%g\n%f %l\n%t" : "%f %l\n%t";
}
// replace first name, last name and title
typedef boost::tokenizer<boost::char_separator<char> > tokenizer;

View File

@@ -24,6 +24,7 @@
<check_box label="Display client tag to self" tool_tip="Enabling this will show your client tag on your avatar name locally." name="show_self_tag_check"/>
<check_box label="Display client tag color to self" tool_tip="Enabling this set your avatar name color to your client tag color or custom set color." name="show_self_tag_color_check"/>
<check_box label="Display friend client tags as (Friend)" tool_tip="Enabling this changes your friends' client tags to (Friend)." name="show_friend_tag_check"/>
<check_box label="Display client tag on a new line" tool_tip="Enabling this will show client tag on a new line." name="display_client_new_line_check"/>
<!-- End of Left Side -->
<check_box label="Use a custom color and label (Local only)" tool_tip="Enabling this will let you set your own name tag to show up with your custom client and tag color. This only shows up to yourself." name="customize_own_tag_check"/>
<text name="custom_tag_label_text">Label:</text>

View File

@@ -24,8 +24,9 @@
<check_box bottom_delta="-23" control_name="AscentShowSelfTag" follows="top" height="16" initial_value="true" label="Display client tag to self" left_delta="-24" tool_tip="Enabling this will show your client tag on your avatar name locally." name="show_self_tag_check"/>
<check_box bottom_delta="-20" control_name="AscentShowSelfTagColor" follows="top" height="16" initial_value="true" label="Display client tag color to self" tool_tip="Enabling this set your avatar name color to your client tag color or custom set color." name="show_self_tag_color_check"/>
<check_box bottom_delta="-20" control_name="AscentShowFriendsTag" follows="top" height="16" initial_value="true" label="Display friend client tags as (Friend)" tool_tip="Enabling this changes your friends' client tags to (Friend)." name="show_friend_tag_check"/>
<check_box bottom_delta="-20" control_name="SLBDisplayClientTagOnNewLine" follows="top" height="16" initial_value="true" label="Display client tag on a new line" tool_tip="Enabling this will show client tag on a new line." name="display_client_new_line_check"/>
<!-- End of Left Side -->
<check_box bottom_delta="87" control_name="AscentUseCustomTag" follows="top" height="16" initial_value="true" label="Use a custom color and label (Local only)" left_delta="230" tool_tip="Enabling this will let you set your own name tag to show up with your custom client and tag color. This only shows up to yourself." name="customize_own_tag_check"/>
<check_box bottom_delta="107" control_name="AscentUseCustomTag" follows="top" height="16" initial_value="true" label="Use a custom color and label (Local only)" left_delta="230" tool_tip="Enabling this will let you set your own name tag to show up with your custom client and tag color. This only shows up to yourself." name="customize_own_tag_check"/>
<text bottom_delta="-17" left_delta="25" follows="top" height="10" name="custom_tag_label_text">Label:</text>
<line_editor bottom_delta="-6" follows="top" font="SansSerif" height="18" left_delta="35" name="custom_tag_label_box" tool_tip="The custom string you would like to replace your client tag with (Local only)" width="100"/>
<text bottom_delta="6" left_delta="110" follows="top" height="10" name="custom_tag_color_text">Color:</text>
@@ -33,7 +34,7 @@
<check_box bottom_delta="-8" control_name="AscentShowOthersTag" follows="top" height="16" initial_value="true" label="Display client tag for others" left_delta="-205" tool_tip="Enabling this will show client tag names on others' avatar names." name="show_other_tag_check"/>
<check_box bottom_delta="-20" control_name="AscentShowOthersTagColor" follows="top" height="16" initial_value="true" label="Display client tag color for others" left_delta="0" tool_tip="Enabling this sets others' avatar name color to their client's color." name="show_client_tag_color_check"/>
<check_box bottom_delta="-20" control_name="AscentShowIdleTime" follows="top" height="16" initial_value="true" label="Show Idle Time" tool_tip="Enabling this will show the amount of time an avatar has been idle." name="show_idle_time_check"/>
<check_box bottom_delta="-20" control_name="AscentUpdateTagsOnLoad" follows="top" height="16" initial_value="true" label="Automatically check website for updates to client definitions" left_delta="-230" tool_tip="Enabling this will allow Singularity to download fresh definitions when needed." name="update_tags_check"/>
<check_box bottom_delta="-40" control_name="AscentUpdateTagsOnLoad" follows="top" height="16" initial_value="true" label="Automatically check website for updates to client definitions" left_delta="-230" tool_tip="Enabling this will allow Singularity to download fresh definitions when needed." name="update_tags_check"/>
<button bottom_delta="0" control_name="ManualUpdate" name="update_clientdefs" follows="top" label="Manual Update" height="18" left_delta="340" width="110"/>
<!-- End of Client Tag settings -->
<text bottom_delta="-25" follows="top" height="10" left="20" name="effects_color_textbox">Color For My Effects:</text>
@@ -46,7 +47,7 @@
<color_swatch border_color="0.45098 0.517647 0.607843 1" bottom_delta="0" can_apply_immediately="true" color="0.6 0.6 1 1" control_name="AscentLindenColor" follows="top" height="47" label="Lindens" left_delta="54" name="linden_color_swatch" width="44" tool_tip="Color of Lindens"/>
<color_swatch border_color="0.45098 0.517647 0.607843 1" bottom_delta="0" can_apply_immediately="true" color="0.8 1 1 1" control_name="AscentMutedColor" follows="top" height="47" label="Muted" left_delta="54" name="muted_color_swatch" width="44" tool_tip="Color of Muted"/>
<color_swatch border_color="0.45098 0.517647 0.607843 1" bottom_delta="0" can_apply_immediately="true" color="0 1 0 1" control_name="MapAvatar" follows="top" height="47" label="Others" left_delta="54" name="others_color_swatch" width="44" tool_tip="Color of everyone else on the minimap and world map"/>
<color_swatch border_color="0.45098 0.517647 0.607843 1" bottom_delta="0" can_apply_immediately="true" color="0.375 1 1 1" control_name="MoyMiniMapCustomColor" follows="top" height="47" label="Custom (Minimap)" left_delta="54" name="custom_color_swatch" width="44" tool_tip="Color of users picked out on the minimap only"/>
<color_swatch border_color="0.45098 0.517647 0.607843 1" bottom_delta="0" can_apply_immediately="true" color="0.375 1 1 1" control_name="MoyMiniMapCustomColor" follows="top" height="47" label="Custom (Minimap)" left_delta="54" name="custom_color_swatch" width="44" tool_tip="Color of users picked out on the minimap only"/>
<text bottom_delta="-9" follows="top" height="10" left="20" name="chat_color_text">Use colors for chat:</text>
<check_box bottom_delta="-7" control_name="ColorFriendChat" follows="top" height="20" label="" left_delta="150" name="color_friend_check" width="44" tool_tip="Color Friend Chat"/>
<check_box bottom_delta="0" control_name="ColorEstateOwnerChat" follows="top" height="20" label="" left_delta="54" name="color_estate_owner_check" width="44" tool_tip="Color Estate Managers Chat"/>

View File

@@ -27,6 +27,7 @@
<check_box label="Mostrarte tag de cliente" tool_tip="Elige el color que verás del tag de tu visor." name="show_self_tag_check"/>
<check_box label="Mostrarte color del tag de cliente" tool_tip="Activándolo, ajustará el nombre de avatar en el color de tu cliente o en el color personalizado." name="show_self_tag_color_check"/>
<check_box label="Ver tags de amigos como (Amigo)" tool_tip="Activándolo cambia el tag de cliente de tus amigos a (Amigo)." name="show_friend_tag_check"/>
<check_box label="Mostrarte tag de cliente en una nueva línea" tool_tip="Activándolo mostra el tag de cliente en una nueva línea." name="display_client_new_line_check"/>
<!-- End of Left Side -->
<check_box label="Usar color y etiqueta personalizadas (Sólo local)" tool_tip="Activándolo te permitirá ajustar tu tag de nombre para mostrar con tu tag de cliente y color personalizados. Esto sólo funciona para ti mismo." name="customize_own_tag_check"/>
<text name="custom_tag_label_text">

View File

@@ -22,6 +22,7 @@
<check_box label="Fonction d&#xE9;sactiv&#xE9;e par Linden Lab" tool_tip="Le viewer utilis&#xE9; par les avatars ne peut plus &#xEA;tre visible depuis que Linden lab l&#x27;a d&#xE9;sactiv&#xE9;" name="show_self_tag_check"/>
<check_box label="Afficher sa propre couleur custom " tool_tip="Vous seul la voyez." name="show_self_tag_color_check"/>
<check_box label="Afficher le tag (Friend)" tool_tip="Rajoute (friends) dans le tag quand vous voyez un(e) ami(e)." name="show_friend_tag_check"/>
<check_box label="Afficher le tag sur une nouvelle ligne" tool_tip="L&apos;activation de cette montrera le tag sur une nouvelle ligne." name="display_client_new_line_check"/>
<!-- End of Left Side -->
<check_box label="Choisir une couleur custom (Mode Local uniquement)" left_delta="205" tool_tip="Vous seul(e) la voyez." name="customize_own_tag_check"/>
<text name="custom_tag_label_text">Label :</text>