Skip to content

Commit d8c0c4b

Browse files
committed
Move support button, improve text alignment in support log
1 parent d7f39aa commit d8c0c4b

File tree

2 files changed

+39
-40
lines changed

2 files changed

+39
-40
lines changed

CustomizePlus/Core/Services/SupportLogBuilderService.cs

Lines changed: 31 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -42,65 +42,64 @@ public string BuildSupportLog()
4242
{
4343
var sb = new StringBuilder(10240);
4444
sb.AppendLine("**Settings**");
45-
sb.Append($"> **`Plugin Version: `** {Plugin.Version}\n");
46-
sb.Append($"> **`Commit Hash: `** {ThisAssembly.Git.Commit}+{ThisAssembly.Git.Sha}\n");
47-
sb.Append($"> **`Root editing: `** {_configuration.EditorConfiguration.RootPositionEditingEnabled}\n");
45+
sb.Append($"> **`Plugin Version: `** {Plugin.Version}\n");
46+
sb.Append($"> **`Commit Hash: `** {ThisAssembly.Git.Commit}+{ThisAssembly.Git.Sha}\n");
47+
sb.Append($"> **`Root editing: `** {_configuration.EditorConfiguration.RootPositionEditingEnabled}\n");
4848
sb.AppendLine("**Settings -> Editor Settings**");
49-
sb.Append($"> **`Limit to my creatures (editor): `** {_configuration.EditorConfiguration.LimitLookupToOwnedObjects}\n");
50-
sb.Append($"> **`Preview character (editor): `** {_configuration.EditorConfiguration.PreviewCharacterName?.Incognify() ?? "Not set"}\n");
49+
sb.Append($"> **`Limit to my creatures (editor): `** {_configuration.EditorConfiguration.LimitLookupToOwnedObjects}\n");
50+
sb.Append($"> **`Preview character (editor): `** {_configuration.EditorConfiguration.PreviewCharacterName?.Incognify() ?? "Not set"}\n");
5151
sb.AppendLine("**Settings -> Profile application**");
52-
sb.Append($"> **`Character window: `** {_configuration.ProfileApplicationSettings.ApplyInCharacterWindow}\n");
53-
sb.Append($"> **`Try On: `** {_configuration.ProfileApplicationSettings.ApplyInTryOn}\n");
54-
sb.Append($"> **`Cards: `** {_configuration.ProfileApplicationSettings.ApplyInCards}\n");
55-
sb.Append($"> **`Inspect: `** {_configuration.ProfileApplicationSettings.ApplyInInspect}\n");
56-
sb.Append($"> **`Lobby: `** {_configuration.ProfileApplicationSettings.ApplyInLobby}\n");
52+
sb.Append($"> **`Character window: `** {_configuration.ProfileApplicationSettings.ApplyInCharacterWindow}\n");
53+
sb.Append($"> **`Try On: `** {_configuration.ProfileApplicationSettings.ApplyInTryOn}\n");
54+
sb.Append($"> **`Cards: `** {_configuration.ProfileApplicationSettings.ApplyInCards}\n");
55+
sb.Append($"> **`Inspect: `** {_configuration.ProfileApplicationSettings.ApplyInInspect}\n");
56+
sb.Append($"> **`Lobby: `** {_configuration.ProfileApplicationSettings.ApplyInLobby}\n");
5757
sb.AppendLine("**Relevant plugins**");
5858
GatherRelevantPlugins(sb);
5959
sb.AppendLine("**Templates**");
60-
sb.Append($"> **`Count: `** {_templateManager.Templates.Count}\n");
60+
sb.Append($"> **`Count: `** {_templateManager.Templates.Count}\n");
6161
foreach (var template in _templateManager.Templates)
6262
{
63-
sb.Append($"> > **`{template.ToString(),-29}`**\n");
63+
sb.Append($"> > **`{template.ToString(),-32}`**\n");
6464
}
6565
sb.AppendLine("**Profiles**");
66-
sb.Append($"> **`Count: `** {_profileManager.Profiles.Count}\n");
66+
sb.Append($"> **`Count: `** {_profileManager.Profiles.Count}\n");
6767
foreach (var profile in _profileManager.Profiles)
6868
{
6969
sb.Append($"> > =====\n");
70-
sb.Append($"> > **`{profile.ToString(),-29}`*\n");
71-
sb.Append($"> > **`Name: {profile.Name.Text.Incognify()}`**\n");
72-
sb.Append($"> > **`Type: {profile.ProfileType}`**\n");
73-
sb.Append($"> > **`Character name: {profile.CharacterName.Text.Incognify()}`**\n");
74-
sb.Append($"> > **`Limit to my creatures: {profile.LimitLookupToOwnedObjects}`**\n");
70+
sb.Append($"> > **`{profile.ToString(),-32}`*\n");
71+
sb.Append($"> > **`Name: `** {profile.Name.Text.Incognify()}\n");
72+
sb.Append($"> > **`Type: `** {profile.ProfileType} \n");
73+
sb.Append($"> > **`Character name: `** {profile.CharacterName.Text.Incognify()}\n");
74+
sb.Append($"> > **`Limit to my creatures: `** {profile.LimitLookupToOwnedObjects}\n");
7575
sb.Append($"> > **`Templates:`**\n");
76-
sb.Append($"> > > **`Count: {profile.Templates.Count}`**\n");
76+
sb.Append($"> > > **`Count: `** {profile.Templates.Count}\n");
7777
foreach (var template in profile.Templates)
7878
{
79-
sb.Append($"> > > **`{template.ToString()}`**\n");
79+
sb.Append($"> > > **`{template.ToString(), -32}`**\n");
8080
}
8181
sb.Append($"> > **`Armatures:`**\n");
82-
sb.Append($"> > > **`Count: {profile.Armatures.Count}`**\n");
82+
sb.Append($"> > > **`Count: `** {profile.Armatures.Count}\n");
8383
foreach (var armature in profile.Armatures)
8484
{
85-
sb.Append($"> > > **`{armature.ToString()}`**\n");
85+
sb.Append($"> > > **`{armature.ToString(), -32}`**\n");
8686
}
8787
sb.Append($"> > =====\n");
8888
}
8989
sb.AppendLine("**Armatures**");
90-
sb.Append($"> **`Count: `** {_armatureManager.Armatures.Count}\n");
90+
sb.Append($"> **`Count: `** {_armatureManager.Armatures.Count}\n");
9191
foreach (var kvPair in _armatureManager.Armatures)
9292
{
9393
var identifier = kvPair.Key;
9494
var armature = kvPair.Value;
9595
sb.Append($"> > =====\n");
96-
sb.Append($"> > **`{armature.ToString(),-29}`**\n");
97-
sb.Append($"> > **`Actor: {armature.ActorIdentifier.Incognito(null) ?? "None"}`**\n");
98-
sb.Append($"> > **`Built: {armature.IsBuilt}`**\n");
99-
sb.Append($"> > **`Visible: {armature.IsVisible}`**\n");
100-
sb.Append($"> > **`Pending rebind: {armature.IsPendingProfileRebind}`**\n");
101-
sb.Append($"> > **`Last seen: {armature.LastSeen}`**\n");
102-
sb.Append($"> > **`Profile: {armature.Profile?.ToString() ?? "None"}`**\n");
103-
sb.Append($"> > **`Main Root Bone/Total Bones/Partial Skeleton Count: {armature.MainRootBone}/{armature.TotalBoneCount}/{armature.PartialSkeletonCount}`**\n");
96+
sb.Append($"> > **`{armature.ToString(),-32}`**\n");
97+
sb.Append($"> > **`Actor: `** {armature.ActorIdentifier.Incognito(null) ?? "None"}\n");
98+
sb.Append($"> > **`Built: `** {armature.IsBuilt}\n");
99+
sb.Append($"> > **`Visible: `** {armature.IsVisible}\n");
100+
sb.Append($"> > **`Pending rebind: `** {armature.IsPendingProfileRebind}\n");
101+
sb.Append($"> > **`Last seen: `** {armature.LastSeen}\n");
102+
sb.Append($"> > **`Profile: `** {armature.Profile?.ToString() ?? "None"}\n");
104103
sb.Append($"> > **`Bone template bindings:`**\n");
105104
foreach (var bindingKvPair in armature.BoneTemplateBinding)
106105
{
@@ -128,7 +127,7 @@ private void GatherRelevantPlugins(StringBuilder sb)
128127
foreach (var plugin in relevantPlugins)
129128
{
130129
if (plugins.TryGetValue(plugin, out var data))
131-
sb.Append($"> **`{data.Name + ':',-29}`** {data.Version}{(data.IsLoaded ? string.Empty : " (Disabled)")}\n");
130+
sb.Append($"> **`{data.Name + ':',-32}`** {data.Version}{(data.IsLoaded ? string.Empty : " (Disabled)")}\n");
132131
}
133132
}
134133
}

CustomizePlus/UI/Windows/MainWindow/Tabs/SettingsTab.cs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -313,16 +313,16 @@ private void DrawSupportButtons()
313313
DrawDiscordButton(width);
314314

315315
ImGui.SetCursorPos(new Vector2(xPos, 1 * ImGui.GetFrameHeightWithSpacing()));
316-
if (ImGui.Button("Show update history", new Vector2(width, 0)))
317-
_changeLog.Changelog.ForceOpen = true;
316+
if (ImGui.Button("Copy Support Info to Clipboard"))
317+
{
318+
var text = _supportLogBuilderService.BuildSupportLog();
319+
ImGui.SetClipboardText(text);
320+
_messageService.NotificationMessage($"Copied Support Info to Clipboard.", NotificationType.Success, false);
321+
}
318322

319323
ImGui.SetCursorPos(new Vector2(xPos, 2 * ImGui.GetFrameHeightWithSpacing()));
320-
if (!ImGui.Button("Copy Support Info to Clipboard"))
321-
return;
322-
323-
var text = _supportLogBuilderService.BuildSupportLog();
324-
ImGui.SetClipboardText(text);
325-
_messageService.NotificationMessage($"Copied Support Info to Clipboard.", NotificationType.Success, false);
324+
if (ImGui.Button("Show update history", new Vector2(width, 0)))
325+
_changeLog.Changelog.ForceOpen = true;
326326
}
327327

328328
/// <summary> Draw a button to open the official discord server. </summary>

0 commit comments

Comments
 (0)