remove presence from online/offline
This commit is contained in:
@@ -359,40 +359,26 @@ public class CompactUi : Window, IDisposable
|
|||||||
|
|
||||||
var textPos = originalY + pauseIconSize.Y / 2 - textSize.Y / 2;
|
var textPos = originalY + pauseIconSize.Y / 2 - textSize.Y / 2;
|
||||||
ImGui.SetCursorPosY(textPos);
|
ImGui.SetCursorPosY(textPos);
|
||||||
FontAwesomeIcon presenceIcon;
|
|
||||||
FontAwesomeIcon connectionIcon;
|
FontAwesomeIcon connectionIcon;
|
||||||
string connectionText = string.Empty;
|
string connectionText = string.Empty;
|
||||||
string presenceText = string.Empty;
|
|
||||||
Vector4 presenceColor;
|
|
||||||
Vector4 connectionColor;
|
Vector4 connectionColor;
|
||||||
if (!(entry.UserPair!.OwnPermissions.IsPaired() && entry.UserPair!.OtherPermissions.IsPaired()))
|
if (!(entry.UserPair!.OwnPermissions.IsPaired() && entry.UserPair!.OtherPermissions.IsPaired()))
|
||||||
{
|
{
|
||||||
connectionIcon = FontAwesomeIcon.ArrowUp;
|
connectionIcon = FontAwesomeIcon.ArrowUp;
|
||||||
connectionText = entryUID + " has not added you back";
|
connectionText = entryUID + " has not added you back";
|
||||||
connectionColor = ImGuiColors.DalamudRed;
|
connectionColor = ImGuiColors.DalamudRed;
|
||||||
presenceIcon = FontAwesomeIcon.Question;
|
|
||||||
presenceColor = ImGuiColors.DalamudGrey;
|
|
||||||
presenceText = entryUID + " online status is unknown (not paired)";
|
|
||||||
}
|
}
|
||||||
else if (entry.UserPair!.OwnPermissions.IsPaused() || entry.UserPair!.OtherPermissions.IsPaused())
|
else if (entry.UserPair!.OwnPermissions.IsPaused() || entry.UserPair!.OtherPermissions.IsPaused())
|
||||||
{
|
{
|
||||||
connectionIcon = FontAwesomeIcon.PauseCircle;
|
connectionIcon = FontAwesomeIcon.PauseCircle;
|
||||||
connectionText = "Pairing status with " + entryUID + " is paused";
|
connectionText = "Pairing status with " + entryUID + " is paused";
|
||||||
connectionColor = ImGuiColors.DalamudYellow;
|
connectionColor = ImGuiColors.DalamudYellow;
|
||||||
presenceIcon = FontAwesomeIcon.Question;
|
|
||||||
presenceColor = ImGuiColors.DalamudGrey;
|
|
||||||
presenceText = entryUID + " online status is unknown (paused)";
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
connectionIcon = FontAwesomeIcon.Check;
|
connectionIcon = FontAwesomeIcon.Check;
|
||||||
connectionText = "You are paired with " + entryUID;
|
connectionText = "You are paired with " + entryUID;
|
||||||
connectionColor = ImGuiColors.ParsedGreen;
|
connectionColor = ImGuiColors.ParsedGreen;
|
||||||
presenceIcon = entry.IsVisible ? FontAwesomeIcon.Eye : (entry.IsOnline ? FontAwesomeIcon.Link : FontAwesomeIcon.Unlink);
|
|
||||||
presenceColor = (entry.IsOnline || entry.IsVisible) ? ImGuiColors.ParsedGreen : ImGuiColors.DalamudRed;
|
|
||||||
presenceText = entryUID + " is offline";
|
|
||||||
if (entry.IsOnline && !entry.IsVisible) presenceText = entryUID + " is online";
|
|
||||||
else if (entry.IsOnline && entry.IsVisible) presenceText = entryUID + " is visible: " + entry.PlayerName;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
ImGui.PushFont(UiBuilder.IconFont);
|
ImGui.PushFont(UiBuilder.IconFont);
|
||||||
@@ -401,10 +387,13 @@ public class CompactUi : Window, IDisposable
|
|||||||
UiShared.AttachToolTip(connectionText);
|
UiShared.AttachToolTip(connectionText);
|
||||||
ImGui.SameLine();
|
ImGui.SameLine();
|
||||||
ImGui.SetCursorPosY(textPos);
|
ImGui.SetCursorPosY(textPos);
|
||||||
ImGui.PushFont(UiBuilder.IconFont);
|
if (entry is { IsOnline: true, IsVisible: true })
|
||||||
UiShared.ColorText(presenceIcon.ToIconString(), presenceColor);
|
{
|
||||||
ImGui.PopFont();
|
ImGui.PushFont(UiBuilder.IconFont);
|
||||||
UiShared.AttachToolTip(presenceText);
|
UiShared.ColorText(FontAwesomeIcon.Eye.ToIconString(), ImGuiColors.ParsedGreen);
|
||||||
|
ImGui.PopFont();
|
||||||
|
UiShared.AttachToolTip(entryUID + " is visible: " + entry.PlayerName!);
|
||||||
|
}
|
||||||
|
|
||||||
var textIsUid = true;
|
var textIsUid = true;
|
||||||
ShowUidForEntry.TryGetValue(entry.UserPair!.User.UID, out var showUidInsteadOfName);
|
ShowUidForEntry.TryGetValue(entry.UserPair!.User.UID, out var showUidInsteadOfName);
|
||||||
|
|||||||
Reference in New Issue
Block a user