Rename "Default profile", hide character controls when profile is set as default

This commit is contained in:
RisaDev
2024-06-17 17:39:22 +03:00
parent 6a55cccf0d
commit 822995530e
2 changed files with 30 additions and 21 deletions

View File

@@ -505,6 +505,10 @@ public class ProfileManager : IDisposable
bool IsProfileAppliesToCurrentActor(Profile profile)
{
//default profile check is done later
if (profile == DefaultProfile)
return false;
return profile.CharacterName.Text == name &&
(!profile.LimitLookupToOwnedObjects ||
(actorIdentifier.Type == IdentifierType.Owned &&

View File

@@ -162,8 +162,8 @@ public class ProfilePanel
{
if (ImGui.Checkbox("##DefaultProfile", ref isDefault))
_manager.SetDefaultProfile(isDefault ? _selector.Selected! : null);
ImGuiUtil.LabeledHelpMarker("Default profile (Players and Retainers only)",
"Whether the templates in this profile are applied to all players and retainers without a specific profile. Only one profile can be default at the same time.");
ImGuiUtil.LabeledHelpMarker("Apply to all players and retainers",
"Whether the templates in this profile are applied to all players and retainers without a specific profile. This setting cannot be applied to multiple profiles.");
}
if(isDefaultOrCurrentProfilesEnabled)
{
@@ -171,7 +171,7 @@ public class ProfilePanel
ImGui.PushStyleColor(ImGuiCol.Text, Constants.Colors.Warning);
ImGuiUtil.PrintIcon(FontAwesomeIcon.ExclamationTriangle);
ImGui.PopStyleColor();
ImGuiUtil.HoverTooltip("Can only be changed when currently selected and the default profiles are disabled.");
ImGuiUtil.HoverTooltip("Can only be changed when both currently selected and profile where this checkbox is checked are disabled.");
}
}
}
@@ -217,6 +217,8 @@ public class ProfilePanel
name = _newCharacterName ?? _selector.Selected!.CharacterName;
ImGui.SetNextItemWidth(width.X);
if(_manager.DefaultProfile != _selector.Selected)
{
if (!_selector.IncognitoMode)
{
if (ImGui.InputText("##CharacterName", ref name, 128))
@@ -242,6 +244,9 @@ public class ProfilePanel
ImGuiUtil.LabeledHelpMarker("Limit to my creatures",
"When enabled limits the character search to only your own summons, mounts and minions.\nUseful when there is possibility there will be another character with that name owned by another player.\n* For battle chocobo use \"Chocobo\" as character name.");
}
else
ImGui.TextUnformatted("All players and retainers");
}
}
}