Remove report profile on group list since I accidentally removed it anyway

Add reload last data to group options too

Add report button on the profile window UI instead

ImGui.TextUnformatted
This commit is contained in:
Loporrit
2025-02-18 12:04:29 +00:00
parent 54ee56dbc8
commit 30041e0663
7 changed files with 53 additions and 43 deletions

View File

@@ -167,17 +167,17 @@ public class DrawGroupPair : DrawPairBase
{
ImGui.BeginTooltip();
ImGui.Text("Individual User permissions");
ImGui.TextUnformatted("Individual User permissions");
if (individualSoundsDisabled)
{
var userSoundsText = "Sound sync disabled with " + _pair.UserData.AliasOrUID;
_uiSharedService.IconText(FontAwesomeIcon.VolumeOff);
ImGui.SameLine(40 * ImGuiHelpers.GlobalScale);
ImGui.Text(userSoundsText);
ImGui.TextUnformatted(userSoundsText);
ImGui.NewLine();
ImGui.SameLine(40 * ImGuiHelpers.GlobalScale);
ImGui.Text("You: " + (_pair.UserPair!.OwnPermissions.IsDisableSounds() ? "Disabled" : "Enabled") + ", They: " + (_pair.UserPair!.OtherPermissions.IsDisableSounds() ? "Disabled" : "Enabled"));
ImGui.TextUnformatted("You: " + (_pair.UserPair!.OwnPermissions.IsDisableSounds() ? "Disabled" : "Enabled") + ", They: " + (_pair.UserPair!.OtherPermissions.IsDisableSounds() ? "Disabled" : "Enabled"));
}
if (individualAnimDisabled)
@@ -185,10 +185,10 @@ public class DrawGroupPair : DrawPairBase
var userAnimText = "Animation sync disabled with " + _pair.UserData.AliasOrUID;
_uiSharedService.IconText(FontAwesomeIcon.Stop);
ImGui.SameLine(40 * ImGuiHelpers.GlobalScale);
ImGui.Text(userAnimText);
ImGui.TextUnformatted(userAnimText);
ImGui.NewLine();
ImGui.SameLine(40 * ImGuiHelpers.GlobalScale);
ImGui.Text("You: " + (_pair.UserPair!.OwnPermissions.IsDisableAnimations() ? "Disabled" : "Enabled") + ", They: " + (_pair.UserPair!.OtherPermissions.IsDisableAnimations() ? "Disabled" : "Enabled"));
ImGui.TextUnformatted("You: " + (_pair.UserPair!.OwnPermissions.IsDisableAnimations() ? "Disabled" : "Enabled") + ", They: " + (_pair.UserPair!.OtherPermissions.IsDisableAnimations() ? "Disabled" : "Enabled"));
}
if (individualVFXDisabled)
@@ -196,10 +196,10 @@ public class DrawGroupPair : DrawPairBase
var userVFXText = "VFX sync disabled with " + _pair.UserData.AliasOrUID;
_uiSharedService.IconText(FontAwesomeIcon.Circle);
ImGui.SameLine(40 * ImGuiHelpers.GlobalScale);
ImGui.Text(userVFXText);
ImGui.TextUnformatted(userVFXText);
ImGui.NewLine();
ImGui.SameLine(40 * ImGuiHelpers.GlobalScale);
ImGui.Text("You: " + (_pair.UserPair!.OwnPermissions.IsDisableVFX() ? "Disabled" : "Enabled") + ", They: " + (_pair.UserPair!.OtherPermissions.IsDisableVFX() ? "Disabled" : "Enabled"));
ImGui.TextUnformatted("You: " + (_pair.UserPair!.OwnPermissions.IsDisableVFX() ? "Disabled" : "Enabled") + ", They: " + (_pair.UserPair!.OtherPermissions.IsDisableVFX() ? "Disabled" : "Enabled"));
}
ImGui.EndTooltip();
@@ -214,14 +214,14 @@ public class DrawGroupPair : DrawPairBase
{
ImGui.BeginTooltip();
ImGui.Text("Syncshell User permissions");
ImGui.TextUnformatted("Syncshell User permissions");
if (soundsDisabled)
{
var userSoundsText = "Sound sync disabled by " + _pair.UserData.AliasOrUID;
_uiSharedService.IconText(FontAwesomeIcon.VolumeOff);
ImGui.SameLine(40 * ImGuiHelpers.GlobalScale);
ImGui.Text(userSoundsText);
ImGui.TextUnformatted(userSoundsText);
}
if (animDisabled)
@@ -229,7 +229,7 @@ public class DrawGroupPair : DrawPairBase
var userAnimText = "Animation sync disabled by " + _pair.UserData.AliasOrUID;
_uiSharedService.IconText(FontAwesomeIcon.Stop);
ImGui.SameLine(40 * ImGuiHelpers.GlobalScale);
ImGui.Text(userAnimText);
ImGui.TextUnformatted(userAnimText);
}
if (vfxDisabled)
@@ -237,7 +237,7 @@ public class DrawGroupPair : DrawPairBase
var userVFXText = "VFX sync disabled by " + _pair.UserData.AliasOrUID;
_uiSharedService.IconText(FontAwesomeIcon.Circle);
ImGui.SameLine(40 * ImGuiHelpers.GlobalScale);
ImGui.Text(userVFXText);
ImGui.TextUnformatted(userVFXText);
}
ImGui.EndTooltip();
@@ -314,7 +314,9 @@ public class DrawGroupPair : DrawPairBase
UiSharedService.AttachToolTip("Hold CTRL and SHIFT and click to transfer ownership of this Syncshell to " + (_fullInfoDto.UserAliasOrUID) + Environment.NewLine + "WARNING: This action is irreversible.");
}
if (userIsOwner || (userIsModerator && !(entryIsMod || entryIsOwner)))
ImGui.Separator();
if (_pair.IsVisible)
{
if (_uiSharedService.IconTextButton(FontAwesomeIcon.Eye, "Target player"))
@@ -330,13 +332,15 @@ public class DrawGroupPair : DrawPairBase
_displayHandler.OpenProfile(_pair);
ImGui.CloseCurrentPopup();
}
UiSharedService.AttachToolTip("Opens the profile for this user in a new window");
if (_uiSharedService.IconTextButton(FontAwesomeIcon.ExclamationTriangle, "Report Profile"))
{
ImGui.CloseCurrentPopup();
_mediator.Publish(new OpenReportPopupMessage(_pair));
}
UiSharedService.AttachToolTip("Report this users Profile to the administrative team");
if (_pair.IsVisible)
{
if (_uiSharedService.IconTextButton(FontAwesomeIcon.Sync, "Reload last data"))
{
_pair.ApplyLastReceivedData(forced: true);
ImGui.CloseCurrentPopup();
}
UiSharedService.AttachToolTip("This reapplies the last received character data to this character");
}
ImGui.EndPopup();
}

View File

@@ -127,17 +127,17 @@ public class DrawUserPair : DrawPairBase
{
ImGui.BeginTooltip();
ImGui.Text("Individual User permissions");
ImGui.TextUnformatted("Individual User permissions");
if (individualSoundsDisabled)
{
var userSoundsText = "Sound sync disabled with " + _pair.UserData.AliasOrUID;
_uiSharedService.IconText(FontAwesomeIcon.VolumeOff);
ImGui.SameLine(40 * ImGuiHelpers.GlobalScale);
ImGui.Text(userSoundsText);
ImGui.TextUnformatted(userSoundsText);
ImGui.NewLine();
ImGui.SameLine(40 * ImGuiHelpers.GlobalScale);
ImGui.Text("You: " + (_pair.UserPair!.OwnPermissions.IsDisableSounds() ? "Disabled" : "Enabled") + ", They: " + (_pair.UserPair!.OtherPermissions.IsDisableSounds() ? "Disabled" : "Enabled"));
ImGui.TextUnformatted("You: " + (_pair.UserPair!.OwnPermissions.IsDisableSounds() ? "Disabled" : "Enabled") + ", They: " + (_pair.UserPair!.OtherPermissions.IsDisableSounds() ? "Disabled" : "Enabled"));
}
if (individualAnimDisabled)
@@ -145,10 +145,10 @@ public class DrawUserPair : DrawPairBase
var userAnimText = "Animation sync disabled with " + _pair.UserData.AliasOrUID;
_uiSharedService.IconText(FontAwesomeIcon.Stop);
ImGui.SameLine(40 * ImGuiHelpers.GlobalScale);
ImGui.Text(userAnimText);
ImGui.TextUnformatted(userAnimText);
ImGui.NewLine();
ImGui.SameLine(40 * ImGuiHelpers.GlobalScale);
ImGui.Text("You: " + (_pair.UserPair!.OwnPermissions.IsDisableAnimations() ? "Disabled" : "Enabled") + ", They: " + (_pair.UserPair!.OtherPermissions.IsDisableAnimations() ? "Disabled" : "Enabled"));
ImGui.TextUnformatted("You: " + (_pair.UserPair!.OwnPermissions.IsDisableAnimations() ? "Disabled" : "Enabled") + ", They: " + (_pair.UserPair!.OtherPermissions.IsDisableAnimations() ? "Disabled" : "Enabled"));
}
if (individualVFXDisabled)
@@ -156,10 +156,10 @@ public class DrawUserPair : DrawPairBase
var userVFXText = "VFX sync disabled with " + _pair.UserData.AliasOrUID;
_uiSharedService.IconText(FontAwesomeIcon.Circle);
ImGui.SameLine(40 * ImGuiHelpers.GlobalScale);
ImGui.Text(userVFXText);
ImGui.TextUnformatted(userVFXText);
ImGui.NewLine();
ImGui.SameLine(40 * ImGuiHelpers.GlobalScale);
ImGui.Text("You: " + (_pair.UserPair!.OwnPermissions.IsDisableVFX() ? "Disabled" : "Enabled") + ", They: " + (_pair.UserPair!.OtherPermissions.IsDisableVFX() ? "Disabled" : "Enabled"));
ImGui.TextUnformatted("You: " + (_pair.UserPair!.OwnPermissions.IsDisableVFX() ? "Disabled" : "Enabled") + ", They: " + (_pair.UserPair!.OtherPermissions.IsDisableVFX() ? "Disabled" : "Enabled"));
}
ImGui.EndTooltip();

View File

@@ -215,7 +215,7 @@ internal sealed class GroupPanel
if (string.Equals(groupDto.OwnerUID, ApiController.UID, StringComparison.Ordinal))
{
ImGui.PushFont(UiBuilder.IconFont);
ImGui.Text(FontAwesomeIcon.Crown.ToIconString());
ImGui.TextUnformatted(FontAwesomeIcon.Crown.ToIconString());
ImGui.PopFont();
UiSharedService.AttachToolTip("You are the owner of Syncshell " + groupName);
ImGui.SameLine();
@@ -223,7 +223,7 @@ internal sealed class GroupPanel
else if (groupDto.GroupUserInfo.IsModerator())
{
ImGui.PushFont(UiBuilder.IconFont);
ImGui.Text(FontAwesomeIcon.UserShield.ToIconString());
ImGui.TextUnformatted(FontAwesomeIcon.UserShield.ToIconString());
ImGui.PopFont();
UiSharedService.AttachToolTip("You are a moderator of Syncshell " + groupName);
ImGui.SameLine();
@@ -510,14 +510,14 @@ internal sealed class GroupPanel
ImGui.BeginTooltip();
if (!invitesEnabled || soundsDisabled || animDisabled || vfxDisabled)
{
ImGui.Text("Syncshell permissions");
ImGui.TextUnformatted("Syncshell permissions");
if (!invitesEnabled)
{
var lockedText = "Syncshell is closed for joining";
_uiShared.IconText(lockedIcon);
ImGui.SameLine(40 * ImGuiHelpers.GlobalScale);
ImGui.Text(lockedText);
ImGui.TextUnformatted(lockedText);
}
if (soundsDisabled)
@@ -525,7 +525,7 @@ internal sealed class GroupPanel
var soundsText = "Sound sync disabled through owner";
_uiShared.IconText(soundsIcon);
ImGui.SameLine(40 * ImGuiHelpers.GlobalScale);
ImGui.Text(soundsText);
ImGui.TextUnformatted(soundsText);
}
if (animDisabled)
@@ -533,7 +533,7 @@ internal sealed class GroupPanel
var animText = "Animation sync disabled through owner";
_uiShared.IconText(animIcon);
ImGui.SameLine(40 * ImGuiHelpers.GlobalScale);
ImGui.Text(animText);
ImGui.TextUnformatted(animText);
}
if (vfxDisabled)
@@ -541,7 +541,7 @@ internal sealed class GroupPanel
var vfxText = "VFX sync disabled through owner";
_uiShared.IconText(vfxIcon);
ImGui.SameLine(40 * ImGuiHelpers.GlobalScale);
ImGui.Text(vfxText);
ImGui.TextUnformatted(vfxText);
}
}
@@ -550,14 +550,14 @@ internal sealed class GroupPanel
if (!invitesEnabled || soundsDisabled || animDisabled || vfxDisabled)
ImGui.Separator();
ImGui.Text("Your permissions");
ImGui.TextUnformatted("Your permissions");
if (userSoundsDisabled)
{
var userSoundsText = "Sound sync disabled through you";
_uiShared.IconText(userSoundsIcon);
ImGui.SameLine(40 * ImGuiHelpers.GlobalScale);
ImGui.Text(userSoundsText);
ImGui.TextUnformatted(userSoundsText);
}
if (userAnimDisabled)
@@ -565,7 +565,7 @@ internal sealed class GroupPanel
var userAnimText = "Animation sync disabled through you";
_uiShared.IconText(userAnimIcon);
ImGui.SameLine(40 * ImGuiHelpers.GlobalScale);
ImGui.Text(userAnimText);
ImGui.TextUnformatted(userAnimText);
}
if (userVFXDisabled)
@@ -573,7 +573,7 @@ internal sealed class GroupPanel
var userVFXText = "VFX sync disabled through you";
_uiShared.IconText(userVFXIcon);
ImGui.SameLine(40 * ImGuiHelpers.GlobalScale);
ImGui.Text(userVFXText);
ImGui.TextUnformatted(userVFXText);
}
if (!invitesEnabled || soundsDisabled || animDisabled || vfxDisabled)

View File

@@ -67,7 +67,7 @@ public class PermissionWindowUI : WindowMediatorSubscriberBase
_uiSharedService.BooleanToColoredIcon(!otherIsPaused, false);
ImGui.SameLine();
ImGui.AlignTextToFramePadding();
ImGui.Text(Pair.UserData.AliasOrUID + " has " + (!otherIsPaused ? "not " : string.Empty) + "paused you");
ImGui.TextUnformatted(Pair.UserData.AliasOrUID + " has " + (!otherIsPaused ? "not " : string.Empty) + "paused you");
}
ImGuiHelpers.ScaledDummy(0.5f);
@@ -85,7 +85,7 @@ public class PermissionWindowUI : WindowMediatorSubscriberBase
_uiSharedService.BooleanToColoredIcon(!otherDisableSounds, false);
ImGui.SameLine();
ImGui.AlignTextToFramePadding();
ImGui.Text(Pair.UserData.AliasOrUID + " has " + (!otherDisableSounds ? "not " : string.Empty) + "disabled sound sync with you");
ImGui.TextUnformatted(Pair.UserData.AliasOrUID + " has " + (!otherDisableSounds ? "not " : string.Empty) + "disabled sound sync with you");
}
if (ImGui.Checkbox("Disable Animations", ref disableAnimations))
@@ -99,7 +99,7 @@ public class PermissionWindowUI : WindowMediatorSubscriberBase
_uiSharedService.BooleanToColoredIcon(!otherDisableAnimations, false);
ImGui.SameLine();
ImGui.AlignTextToFramePadding();
ImGui.Text(Pair.UserData.AliasOrUID + " has " + (!otherDisableAnimations ? "not " : string.Empty) + "disabled animation sync with you");
ImGui.TextUnformatted(Pair.UserData.AliasOrUID + " has " + (!otherDisableAnimations ? "not " : string.Empty) + "disabled animation sync with you");
}
if (ImGui.Checkbox("Disable VFX", ref disableVfx))
@@ -113,7 +113,7 @@ public class PermissionWindowUI : WindowMediatorSubscriberBase
_uiSharedService.BooleanToColoredIcon(!otherDisableVFX, false);
ImGui.SameLine();
ImGui.AlignTextToFramePadding();
ImGui.Text(Pair.UserData.AliasOrUID + " has " + (!otherDisableVFX ? "not " : string.Empty) + "disabled VFX sync with you");
ImGui.TextUnformatted(Pair.UserData.AliasOrUID + " has " + (!otherDisableVFX ? "not " : string.Empty) + "disabled VFX sync with you");
}
ImGuiHelpers.ScaledDummy(0.5f);

View File

@@ -486,7 +486,7 @@ public class SettingsUi : WindowMediatorSubscriberBase
if (!ApiController.ServerAlive)
{
ImGui.Text("Connect to the server to configure individual syncshell settings.");
ImGui.TextUnformatted("Connect to the server to configure individual syncshell settings.");
return;
}

View File

@@ -1,4 +1,5 @@
using Dalamud.Interface.Colors;
using Dalamud.Interface;
using Dalamud.Interface.Colors;
using Dalamud.Interface.Textures.TextureWraps;
using Dalamud.Interface.Utility;
using ImGuiNET;
@@ -79,6 +80,11 @@ public class StandaloneProfileUi : WindowMediatorSubscriberBase
using (_uiSharedService.UidFont.Push())
UiSharedService.ColorText(Pair.UserData.AliasOrUID, UiSharedService.AccentColor);
var reportButtonSize = _uiSharedService.GetIconTextButtonSize(FontAwesomeIcon.ExclamationTriangle, "Report Profile");
ImGui.SameLine(ImGui.GetWindowContentRegionMax().X - reportButtonSize);
if (_uiSharedService.IconTextButton(FontAwesomeIcon.ExclamationTriangle, "Report Profile"))
Mediator.Publish(new OpenReportPopupMessage(Pair));
ImGuiHelpers.ScaledDummy(new Vector2(spacing.Y, spacing.Y));
var textPos = ImGui.GetCursorPosY() - headerSize;
ImGui.Separator();

View File

@@ -371,7 +371,7 @@ public class SyncshellAdminUI : WindowMediatorSubscriberBase
bool isDisableVfx = perm.IsDisableVFX();
ImGui.AlignTextToFramePadding();
ImGui.Text("Sound Sync");
ImGui.TextUnformatted("Sound Sync");
_uiSharedService.BooleanToColoredIcon(!isDisableSounds);
ImGui.SameLine(230);
if (_uiSharedService.IconTextButton(isDisableSounds ? FontAwesomeIcon.VolumeUp : FontAwesomeIcon.VolumeMute,
@@ -382,7 +382,7 @@ public class SyncshellAdminUI : WindowMediatorSubscriberBase
}
ImGui.AlignTextToFramePadding();
ImGui.Text("Animation Sync");
ImGui.TextUnformatted("Animation Sync");
_uiSharedService.BooleanToColoredIcon(!isDisableAnimations);
ImGui.SameLine(230);
if (_uiSharedService.IconTextButton(isDisableAnimations ? FontAwesomeIcon.Running : FontAwesomeIcon.Stop,
@@ -393,7 +393,7 @@ public class SyncshellAdminUI : WindowMediatorSubscriberBase
}
ImGui.AlignTextToFramePadding();
ImGui.Text("VFX Sync");
ImGui.TextUnformatted("VFX Sync");
_uiSharedService.BooleanToColoredIcon(!isDisableVfx);
ImGui.SameLine(230);
if (_uiSharedService.IconTextButton(isDisableVfx ? FontAwesomeIcon.Sun : FontAwesomeIcon.Circle,