add multi chracter key checks

This commit is contained in:
Stanley Dimant 2024-07-19 11:45:38 +02:00
parent c67add20d6
commit 9daf9b42a2
7 changed files with 35 additions and 16 deletions

View file

@ -1074,7 +1074,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))