Skip to content

Commit 8229955

Browse files
committed
Rename "Default profile", hide character controls when profile is set as default
1 parent 6a55ccc commit 8229955

File tree

2 files changed

+31
-22
lines changed

2 files changed

+31
-22
lines changed

CustomizePlus/Profiles/ProfileManager.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -505,6 +505,10 @@ public IEnumerable<Profile> GetEnabledProfilesByActor(ActorIdentifier actorIdent
505505

506506
bool IsProfileAppliesToCurrentActor(Profile profile)
507507
{
508+
//default profile check is done later
509+
if (profile == DefaultProfile)
510+
return false;
511+
508512
return profile.CharacterName.Text == name &&
509513
(!profile.LimitLookupToOwnedObjects ||
510514
(actorIdentifier.Type == IdentifierType.Owned &&

CustomizePlus/UI/Windows/MainWindow/Tabs/Profiles/ProfilePanel.cs

Lines changed: 27 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -162,16 +162,16 @@ private void DrawEnabledSetting()
162162
{
163163
if (ImGui.Checkbox("##DefaultProfile", ref isDefault))
164164
_manager.SetDefaultProfile(isDefault ? _selector.Selected! : null);
165-
ImGuiUtil.LabeledHelpMarker("Default profile (Players and Retainers only)",
166-
"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.");
165+
ImGuiUtil.LabeledHelpMarker("Apply to all players and retainers",
166+
"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.");
167167
}
168168
if(isDefaultOrCurrentProfilesEnabled)
169169
{
170170
ImGui.SameLine();
171171
ImGui.PushStyleColor(ImGuiCol.Text, Constants.Colors.Warning);
172172
ImGuiUtil.PrintIcon(FontAwesomeIcon.ExclamationTriangle);
173173
ImGui.PopStyleColor();
174-
ImGuiUtil.HoverTooltip("Can only be changed when currently selected and the default profiles are disabled.");
174+
ImGuiUtil.HoverTooltip("Can only be changed when both currently selected and profile where this checkbox is checked are disabled.");
175175
}
176176
}
177177
}
@@ -217,30 +217,35 @@ private void DrawBasicSettings()
217217
name = _newCharacterName ?? _selector.Selected!.CharacterName;
218218
ImGui.SetNextItemWidth(width.X);
219219

220-
if (!_selector.IncognitoMode)
220+
if(_manager.DefaultProfile != _selector.Selected)
221221
{
222-
if (ImGui.InputText("##CharacterName", ref name, 128))
222+
if (!_selector.IncognitoMode)
223223
{
224-
_newCharacterName = name;
225-
_changedProfile = _selector.Selected;
226-
}
227-
228-
if (ImGui.IsItemDeactivatedAfterEdit() && _changedProfile != null)
229-
{
230-
_manager.ChangeCharacterName(_changedProfile, name);
231-
_newCharacterName = null;
232-
_changedProfile = null;
224+
if (ImGui.InputText("##CharacterName", ref name, 128))
225+
{
226+
_newCharacterName = name;
227+
_changedProfile = _selector.Selected;
228+
}
229+
230+
if (ImGui.IsItemDeactivatedAfterEdit() && _changedProfile != null)
231+
{
232+
_manager.ChangeCharacterName(_changedProfile, name);
233+
_newCharacterName = null;
234+
_changedProfile = null;
235+
}
233236
}
237+
else
238+
ImGui.TextUnformatted("Incognito active");
239+
240+
ImGui.SameLine();
241+
var enabled = _selector.Selected?.LimitLookupToOwnedObjects ?? false;
242+
if (ImGui.Checkbox("##LimitLookupToOwnedObjects", ref enabled))
243+
_manager.SetLimitLookupToOwned(_selector.Selected!, enabled);
244+
ImGuiUtil.LabeledHelpMarker("Limit to my creatures",
245+
"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.");
234246
}
235247
else
236-
ImGui.TextUnformatted("Incognito active");
237-
238-
ImGui.SameLine();
239-
var enabled = _selector.Selected?.LimitLookupToOwnedObjects ?? false;
240-
if (ImGui.Checkbox("##LimitLookupToOwnedObjects", ref enabled))
241-
_manager.SetLimitLookupToOwned(_selector.Selected!, enabled);
242-
ImGuiUtil.LabeledHelpMarker("Limit to my creatures",
243-
"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.");
248+
ImGui.TextUnformatted("All players and retainers");
244249
}
245250
}
246251
}

0 commit comments

Comments
 (0)