Commit 423f2e94 authored by Kitty Barnett's avatar Kitty Barnett
Browse files

CATZ-507: Adjust avatar nametag offset

--HG--
branch : Settings-Misc
parent 477d76c7
......@@ -9968,6 +9968,17 @@
<key>Value</key>
<integer>0</integer>
</map>
<key>NameTagOffset</key>
<map>
<key>Comment</key>
<string>Height-offset for avatars' name tags</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>F32</string>
<key>Value</key>
<real>0.0</real>
</map>
<key>NameTagShowGroupTitles</key>
<map>
<key>Comment</key>
......
......@@ -3415,9 +3415,19 @@ void LLVOAvatar::idleUpdateNameTagPosition(const LLVector3& root_pos_last)
mCurRootToHeadOffset = lerp(mCurRootToHeadOffset, mTargetRootToHeadOffset, LLSmoothInterpolation::getInterpolant(0.2f));
// [SL:KB] - Patch: Settings-NameTagOffset
//static LLCachedControl<F32> name_tag_offset_proj(gSavedSettings, "NameTagOffset", 25.f);
static LLCachedControl<F32> name_tag_offset_fixed(gSavedSettings, "NameTagOffset", 0.f);
// [/SL:KB]
LLVector3 name_position = mRoot->getLastWorldPosition() + (mCurRootToHeadOffset * root_rot);
name_position += (local_camera_up * root_rot) - (projected_vec(local_camera_at * root_rot, camera_to_av));
name_position += pixel_up_vec * NAMETAG_VERTICAL_SCREEN_OFFSET;
// [SL:KB] - Patch: Settings-NameTagOffset
// NOTE: name_tag_offset_proj gives us an offset that's camera-dependent whereas name_tag_offset_fixed is a static screen-space offset
//name_position += pixel_up_vec * name_tag_offset_proj;
name_position[VZ] += name_tag_offset_fixed;
// [/SL:KB]
mNameText->setPositionAgent(name_position);
}
......
......@@ -248,6 +248,34 @@
value="2"
width="160" />
</radio_group>
<slider
control_name="NameTagOffset"
decimal_digits="0"
follows="top|left"
height="16"
increment="0.05"
label="Position: Low"
label_width="80"
layout="topleft"
left="175"
min_val="0"
max_val="1"
name="name_tag_offset"
show_text="false"
top_pad="0"
width="200" />
<text
type="string"
length="1"
follows="left|top"
height="15"
layout="topleft"
left_pad="3"
name="name_tags_textbox"
top_delta="0"
width="125">
High
</text>
<check_box
enabled_control="AvatarNameTagMode"
control_name="RenderNameShowSelf"
......@@ -256,7 +284,7 @@
layout="topleft"
left="35"
name="show_my_name_checkbox1"
top_pad="2"
top_pad="6"
width="100" />
<check_box
control_name="NameTagShowUsernames"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment