add multi chracter key checks

This commit is contained in:
Stanley Dimant
2024-07-19 11:45:38 +02:00
committed by Loporrit
parent d9d10c42de
commit 0228c2343b
7 changed files with 35 additions and 16 deletions

View File

@@ -1273,7 +1273,13 @@ public class SettingsUi : WindowMediatorSubscriberBase
}
var friendlyName = secretKey.FriendlyName;
if (ImGui.TreeNode($"chara", $"Character: {item.CharacterName}, World: {worldPreview}, Secret Key: {friendlyName}"))
bool thisIsYou = false;
if (string.Equals(_dalamudUtilService.GetPlayerName(), item.CharacterName, StringComparison.OrdinalIgnoreCase)
&& _dalamudUtilService.GetWorldId() == worldIdx)
{
thisIsYou = true;
}
if (ImGui.TreeNode($"chara", (thisIsYou ? "[CURRENT] " : "") + $"Character: {item.CharacterName}, World: {worldPreview}, Secret Key: {friendlyName}"))
{
var charaName = item.CharacterName;
if (ImGui.InputText("Character Name", ref charaName, 64))