Merge branch '1.11.6' into pause-on-duty-opt

This commit is contained in:
2025-09-07 23:42:53 +02:00
21 changed files with 591 additions and 403 deletions

View File

@@ -373,8 +373,8 @@ public class SettingsUi : WindowMediatorSubscriberBase
}
else if (!_speedTestTask.IsCompleted)
{
UiSharedService.ColorTextWrapped("Running Speedtest to File Servers...", ImGuiColors.DalamudYellow);
UiSharedService.ColorTextWrapped("Please be patient, depending on usage and load this can take a while.", ImGuiColors.DalamudYellow);
UiSharedService.ColorTextWrapped("Running Speedtest to File Servers...", UIColors.Get("LightlessYellow"));
UiSharedService.ColorTextWrapped("Please be patient, depending on usage and load this can take a while.", UIColors.Get("LightlessYellow"));
if (_uiShared.IconTextButton(FontAwesomeIcon.Ban, "Cancel speedtest"))
{
_speedTestCts?.Cancel();
@@ -393,7 +393,7 @@ public class SettingsUi : WindowMediatorSubscriberBase
}
else
{
UiSharedService.ColorTextWrapped("Speedtest completed with no results", ImGuiColors.DalamudYellow);
UiSharedService.ColorTextWrapped("Speedtest completed with no results", UIColors.Get("LightlessYellow"));
}
}
}
@@ -637,7 +637,7 @@ public class SettingsUi : WindowMediatorSubscriberBase
ImGuiHelpers.ScaledDummy(10);
UiSharedService.ColorTextWrapped("Exporting MCDF has moved.", ImGuiColors.DalamudYellow);
UiSharedService.ColorTextWrapped("Exporting MCDF has moved.", UIColors.Get("LightlessYellow"));
ImGuiHelpers.ScaledDummy(5);
UiSharedService.TextWrapped("It is now found in the Main UI under \"Your User Menu\" (");
ImGui.SameLine();
@@ -720,7 +720,7 @@ public class SettingsUi : WindowMediatorSubscriberBase
bool isLinux = _dalamudUtilService.IsWine;
if (!useFileCompactor && !isLinux)
{
UiSharedService.ColorTextWrapped("Hint: To free up space when using Lightless consider enabling the File Compactor", ImGuiColors.DalamudYellow);
UiSharedService.ColorTextWrapped("Hint: To free up space when using Lightless consider enabling the File Compactor", UIColors.Get("LightlessYellow"));
}
if (isLinux || !_cacheMonitor.StorageisNTFS) ImGui.BeginDisabled();
if (ImGui.Checkbox("Use file compactor", ref useFileCompactor))
@@ -756,7 +756,7 @@ public class SettingsUi : WindowMediatorSubscriberBase
}
else
{
UiSharedService.ColorText($"File compactor currently running ({_fileCompactor.Progress})", ImGuiColors.DalamudYellow);
UiSharedService.ColorText($"File compactor currently running ({_fileCompactor.Progress})", UIColors.Get("LightlessYellow"));
}
if (isLinux || !_cacheMonitor.StorageisNTFS)
{
@@ -974,37 +974,98 @@ public class SettingsUi : WindowMediatorSubscriberBase
_configService.Save();
}
if (ImGui.Checkbox("Color-code the Server Info Bar entry according to status", ref useColorsInDtr))
}
_uiShared.ColoredSeparator(UIColors.Get("LightlessPurple"), 1.5f);
ImGui.TreePop();
}
ImGui.Separator();
if (_uiShared.MediumTreeNode("Colors", UIColors.Get("LightlessPurple")))
{
ImGui.TextUnformatted("UI Theme Colors");
var colorNames = new[]
{
("LightlessPurple", "Lightless Purple", "Primary colors"),
("LightlessBlue", "Lightless Blue", "Secondary colors"),
("LightlessYellow", "Lightless Yellow", "Warning colors"),
("PairBlue", "Pair Blue", "Pair UI elements"),
("DimRed", "Dim Red", "Error and offline")
};
foreach (var (colorKey, displayName, description) in colorNames)
{
var currentColor = UIColors.Get(colorKey);
var colorToEdit = currentColor;
ImGui.AlignTextToFramePadding();
if (ImGui.ColorEdit4($"##color_{colorKey}", ref colorToEdit, ImGuiColorEditFlags.NoInputs | ImGuiColorEditFlags.AlphaPreviewHalf))
{
_configService.Current.UseColorsInDtr = useColorsInDtr;
UIColors.Set(colorKey, colorToEdit);
}
ImGui.SameLine();
ImGui.TextUnformatted($"{displayName} - {description}");
if (UIColors.IsCustom(colorKey))
{
ImGui.SameLine();
if (_uiShared.IconTextButton(FontAwesomeIcon.Undo, $"Reset {colorKey}"))
{
UIColors.Reset(colorKey);
}
UiSharedService.AttachToolTip("Reset this color to default");
}
}
ImGui.Spacing();
if (_uiShared.IconTextButton(FontAwesomeIcon.Undo, "Reset All Theme Colors"))
{
UIColors.ResetAll();
}
_uiShared.DrawHelpText("This will reset all theme colors to their default values");
ImGui.Spacing();
ImGui.TextUnformatted("Server Info Bar Colors");
if (ImGui.Checkbox("Color-code the Server Info Bar entry according to status", ref useColorsInDtr))
{
_configService.Current.UseColorsInDtr = useColorsInDtr;
_configService.Save();
}
_uiShared.DrawHelpText("This will color the Server Info Bar entry based on connection status and visible pairs.");
using (ImRaii.Disabled(!useColorsInDtr))
{
using var indent = ImRaii.PushIndent();
if (InputDtrColors("Default", ref dtrColorsDefault))
{
_configService.Current.DtrColorsDefault = dtrColorsDefault;
_configService.Save();
}
using (ImRaii.Disabled(!useColorsInDtr))
ImGui.SameLine();
if (InputDtrColors("Not Connected", ref dtrColorsNotConnected))
{
using var indent2 = ImRaii.PushIndent();
if (InputDtrColors("Default", ref dtrColorsDefault))
{
_configService.Current.DtrColorsDefault = dtrColorsDefault;
_configService.Save();
}
_configService.Current.DtrColorsNotConnected = dtrColorsNotConnected;
_configService.Save();
}
ImGui.SameLine();
if (InputDtrColors("Not Connected", ref dtrColorsNotConnected))
{
_configService.Current.DtrColorsNotConnected = dtrColorsNotConnected;
_configService.Save();
}
ImGui.SameLine();
if (InputDtrColors("Pairs in Range", ref dtrColorsPairsInRange))
{
_configService.Current.DtrColorsPairsInRange = dtrColorsPairsInRange;
_configService.Save();
}
ImGui.SameLine();
if (InputDtrColors("Pairs in Range", ref dtrColorsPairsInRange))
{
_configService.Current.DtrColorsPairsInRange = dtrColorsPairsInRange;
_configService.Save();
}
}
ImGui.Spacing();
ImGui.TextUnformatted("Nameplate Colors");
var nameColorsEnabled = _configService.Current.IsNameplateColorsEnabled;
var nameColors = _configService.Current.NameplateColors;
var isFriendOverride = _configService.Current.overrideFriendColor;
@@ -1016,6 +1077,7 @@ public class SettingsUi : WindowMediatorSubscriberBase
_configService.Save();
_nameplateService.RequestRedraw();
}
_uiShared.DrawHelpText("This will override the nameplate colors for visible paired players in-game.");
using (ImRaii.Disabled(!nameColorsEnabled))
{
@@ -1119,7 +1181,6 @@ public class SettingsUi : WindowMediatorSubscriberBase
_configService.Current.UseFocusTarget = useFocusTarget;
_configService.Save();
}
_uiShared.ColoredSeparator(UIColors.Get("LightlessPurple"), 1.5f);
ImGui.TreePop();
}
@@ -1553,7 +1614,7 @@ public class SettingsUi : WindowMediatorSubscriberBase
var selectedServer = _serverConfigurationManager.GetServerByIndex(idx);
if (selectedServer == _serverConfigurationManager.CurrentServer)
{
UiSharedService.ColorTextWrapped("For any changes to be applied to the current service you need to reconnect to the service.", ImGuiColors.DalamudYellow);
UiSharedService.ColorTextWrapped("For any changes to be applied to the current service you need to reconnect to the service.", UIColors.Get("LightlessYellow"));
}
bool useOauth = selectedServer.UseOAuth2;
@@ -1565,7 +1626,7 @@ public class SettingsUi : WindowMediatorSubscriberBase
if (selectedServer.SecretKeys.Any() || useOauth)
{
UiSharedService.ColorTextWrapped("Characters listed here will automatically connect to the selected Lightless service with the settings as provided below." +
" Make sure to enter the character names correctly or use the 'Add current character' button at the bottom.", ImGuiColors.DalamudYellow);
" Make sure to enter the character names correctly or use the 'Add current character' button at the bottom.", UIColors.Get("LightlessYellow"));
int i = 0;
_uiShared.DrawUpdateOAuthUIDsButton(selectedServer);
@@ -1586,14 +1647,14 @@ public class SettingsUi : WindowMediatorSubscriberBase
}
if (_secretKeysConversionTask != null && !_secretKeysConversionTask.IsCompleted)
{
UiSharedService.ColorTextWrapped("Converting Secret Keys to UIDs", ImGuiColors.DalamudYellow);
UiSharedService.ColorTextWrapped("Converting Secret Keys to UIDs", UIColors.Get("LightlessYellow"));
}
if (_secretKeysConversionTask != null && _secretKeysConversionTask.IsCompletedSuccessfully)
{
Vector4? textColor = null;
if (_secretKeysConversionTask.Result.PartialSuccess)
{
textColor = ImGuiColors.DalamudYellow;
textColor = UIColors.Get("LightlessYellow");
}
if (!_secretKeysConversionTask.Result.Success)
{
@@ -1627,10 +1688,10 @@ public class SettingsUi : WindowMediatorSubscriberBase
if (authWithCid != null)
{
ImGuiHelpers.ScaledDummy(5);
UiSharedService.ColorText("A potential rename/world change from this character was detected:", ImGuiColors.DalamudYellow);
UiSharedService.ColorText("A potential rename/world change from this character was detected:", UIColors.Get("LightlessYellow"));
using (ImRaii.PushIndent(10f))
UiSharedService.ColorText("Entry: " + authWithCid.CharacterName + " - " + _dalamudUtilService.WorldData.Value[(ushort)authWithCid.WorldId], UIColors.Get("LightlessBlue"));
UiSharedService.ColorText("Press the button below to adjust that entry to your current character:", ImGuiColors.DalamudYellow);
UiSharedService.ColorText("Press the button below to adjust that entry to your current character:", UIColors.Get("LightlessYellow"));
using (ImRaii.PushIndent(10f))
UiSharedService.ColorText("Current: " + youName + " - " + _dalamudUtilService.WorldData.Value[(ushort)youWorld], UIColors.Get("LightlessBlue"));
ImGuiHelpers.ScaledDummy(5);
@@ -1776,7 +1837,7 @@ public class SettingsUi : WindowMediatorSubscriberBase
}
else
{
UiSharedService.ColorTextWrapped("You need to add a Secret Key first before adding Characters.", ImGuiColors.DalamudYellow);
UiSharedService.ColorTextWrapped("You need to add a Secret Key first before adding Characters.", UIColors.Get("LightlessYellow"));
}
ImGui.EndTabItem();
@@ -1810,7 +1871,7 @@ public class SettingsUi : WindowMediatorSubscriberBase
}
else
{
UiSharedService.ColorTextWrapped("This key is in use and cannot be deleted", ImGuiColors.DalamudYellow);
UiSharedService.ColorTextWrapped("This key is in use and cannot be deleted", UIColors.Get("LightlessYellow"));
}
if (item.Key != selectedServer.SecretKeys.Keys.LastOrDefault())
@@ -1990,7 +2051,7 @@ public class SettingsUi : WindowMediatorSubscriberBase
else
{
UiSharedService.ColorTextWrapped("Default Permission Settings unavailable for this service. " +
"You need to connect to this service to change the default permissions since they are stored on the service.", ImGuiColors.DalamudYellow);
"You need to connect to this service to change the default permissions since they are stored on the service.", UIColors.Get("LightlessYellow"));
}
ImGui.EndTabItem();