Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions Code/client/Services/Generic/NameTagService.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -316,8 +316,12 @@ void NameTagService::OnDraw() noexcept

if (isLeader)
{
// Same icon as the party widget, a square crownWidth wide, centred on the text.
const ImVec2 origin(contentPos.x, contentPos.y + (textSize.y - crownWidth) * 0.5f);
// Same icon as the party widget, a square crownWidth wide. The line height includes room for
// accents and descenders, so centre the crown on the capital letters instead of on the line.
float textCenterY = textSize.y * 0.5f;
if (const ImFontGlyph* pCapital = font->FindGlyph('H'))
textCenterY = (pCapital->Y0 + pCapital->Y1) * 0.5f * (fontSize / font->FontSize);
const ImVec2 origin(contentPos.x, contentPos.y + textCenterY - crownWidth * 0.5f);
DrawPartyCrown(drawList, ImVec2(origin.x + 1.f, origin.y + 1.f), crownWidth, shadowColor);
DrawPartyCrown(drawList, origin, crownWidth, ColorWithAlpha(ImVec4(0.95f, 0.95f, 0.95f, 1.f), alpha));
}
Expand Down
8 changes: 4 additions & 4 deletions Code/client/Services/NameTagService.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,10 @@ struct NameTagService
Filter NameTags = Filter::kParty;
Filter Backdrop = Filter::kParty;
float FontSize = 16.f;
float NameFadeStart = 3000.f;
float NameInvisible = 5000.f;
float PartyFadeStart = 3000.f;
float PartyInvisible = 5000.f;
float NameFadeStart = 2000.f;
float NameInvisible = 8000.f;
float PartyFadeStart = 2000.f;
float PartyInvisible = 8000.f;
// Drawn in italics instead of the name of players whose name is hidden.
String StrangerLabel = "Stranger";
// Players whose real name may be shown. The UI decides this from the
Expand Down
8 changes: 4 additions & 4 deletions Code/skyrim_ui/src/app/services/setting.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -209,22 +209,22 @@ export class SettingService {
nameFadeStart: new SliderSetting(
this.storeService,
'playerUi_nameFadeStart',
3000,
2000,
),
nameInvisible: new SliderSetting(
this.storeService,
'playerUi_nameInvisible',
5000,
8000,
),
partyFadeStart: new SliderSetting(
this.storeService,
'playerUi_partyFadeStart',
3000,
2000,
),
partyInvisible: new SliderSetting(
this.storeService,
'playerUi_partyInvisible',
5000,
8000,
),
};

Expand Down