lightfinder nearby badge alignment
This commit is contained in:
@@ -177,14 +177,14 @@ public class TopTabMenu
|
||||
{
|
||||
var buttonMax = ImGui.GetItemRectMax();
|
||||
var badgeRadius = 8f * ImGuiHelpers.GlobalScale;
|
||||
var badgeCenter = new Vector2(buttonMax.X - badgeRadius * 0.5f, buttonMax.Y - buttonSize.Y + badgeRadius * 0.5f);
|
||||
var badgeCenter = new Vector2(buttonMax.X - badgeRadius * 1.3f, buttonMax.Y - buttonSize.Y + badgeRadius * 0.5f);
|
||||
var badgeText = nearbyCount > 99 ? "99+" : nearbyCount.ToString();
|
||||
var textSize = ImGui.CalcTextSize(badgeText);
|
||||
|
||||
drawList.AddCircleFilled(badgeCenter, badgeRadius + 1f, ImGui.GetColorU32(new Vector4(0, 0, 0, 0.6f)));
|
||||
drawList.AddCircleFilled(badgeCenter, badgeRadius, ImGui.GetColorU32(UIColors.Get("LightlessPurple")));
|
||||
|
||||
var textPos = new Vector2(badgeCenter.X - textSize.X * 0.5f, badgeCenter.Y - textSize.Y * 0.5f);
|
||||
var textPos = new Vector2(badgeCenter.X - textSize.X * 0.45f, badgeCenter.Y - textSize.Y * 0.55f);
|
||||
drawList.AddText(textPos, ImGui.GetColorU32(new Vector4(1, 1, 1, 1)), badgeText);
|
||||
}
|
||||
UiSharedService.AttachToolTip(GetLightfinderTooltip());
|
||||
|
||||
Reference in New Issue
Block a user