Compare commits
25 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
15bf87feb4 | ||
|
|
9c0379631f | ||
|
|
44475fda50 | ||
|
|
071885b04c | ||
|
|
27c3231084 | ||
|
|
2b98bf6891 | ||
|
|
b6b8e7bddf | ||
|
|
9f8cc48e34 | ||
|
|
ae6013adf6 | ||
|
|
2b67f44788 | ||
|
|
ad74729c4a | ||
|
|
4f3a6a8205 | ||
|
|
71e80f5c48 | ||
|
|
77f667ccfd | ||
|
|
97e964473b | ||
|
|
d5d89a759e | ||
|
|
e5c87e5d68 | ||
|
|
5559c06d2b | ||
|
|
53bea001ba | ||
|
|
a401a18c04 | ||
|
|
213f6e9f6d | ||
|
|
4570c4b5f4 | ||
|
|
e6c1120323 | ||
|
|
0d35d04a20 | ||
|
|
5fb9ec7637 |
84
.github/workflows/lightless-tag-and-release.yml
vendored
Normal file
84
.github/workflows/lightless-tag-and-release.yml
vendored
Normal file
@@ -0,0 +1,84 @@
|
||||
name: Tag and Release Lightless
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ master ]
|
||||
|
||||
env:
|
||||
PLUGIN_NAME: LightlessSync
|
||||
DOTNET_VERSION: 9.x
|
||||
|
||||
jobs:
|
||||
tag-and-release:
|
||||
runs-on: windows-2022
|
||||
permissions:
|
||||
contents: write
|
||||
|
||||
steps:
|
||||
- name: Checkout Lightless
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
submodules: true
|
||||
|
||||
- name: Setup .NET 9 SDK
|
||||
uses: actions/setup-dotnet@v4
|
||||
with:
|
||||
dotnet-version: 9.x
|
||||
|
||||
- name: Download Dalamud
|
||||
run: |
|
||||
Invoke-WebRequest -Uri https://goatcorp.github.io/dalamud-distrib/stg/latest.zip -OutFile latest.zip
|
||||
Expand-Archive -Force latest.zip "$env:AppData\XIVLauncher\addon\Hooks\dev"
|
||||
|
||||
- name: Lets Build Lightless!
|
||||
run: |
|
||||
dotnet restore
|
||||
dotnet build --configuration Release --no-restore
|
||||
dotnet publish --configuration Release --no-build
|
||||
|
||||
- name: Get version
|
||||
id: package_version
|
||||
uses: KageKirin/get-csproj-version@v0
|
||||
with:
|
||||
file: LightlessSync/LightlessSync.csproj
|
||||
|
||||
- name: Display version
|
||||
run: |
|
||||
echo "Version: ${{ steps.package_version.outputs.version }}"
|
||||
|
||||
- name: Prepare Lightless Client
|
||||
run: |
|
||||
$publishPath = "${{ env.PLUGIN_NAME }}/bin/x64/Release/publish"
|
||||
if (Test-Path $publishPath) {
|
||||
Remove-Item -Recurse -Force $publishPath
|
||||
Write-Host "Removed $publishPath"
|
||||
} else {
|
||||
Write-Host "$publishPath does not exist, nothing to remove."
|
||||
}
|
||||
mkdir output
|
||||
Compress-Archive -Path ${{ env.PLUGIN_NAME }}/bin/x64/Release/* -DestinationPath output/LightlessClient.zip
|
||||
|
||||
- name: Create Git tag if not exists
|
||||
shell: pwsh
|
||||
run: |
|
||||
$tag = "${{ steps.package_version.outputs.version }}"
|
||||
git fetch --tags
|
||||
if (-not (git tag -l $tag)) {
|
||||
Write-Host "Tag $tag does not exist. Creating and pushing..."
|
||||
git config user.name "GitHub Action"
|
||||
git config user.email "action@github.com"
|
||||
git tag $tag
|
||||
git push origin $tag
|
||||
} else {
|
||||
Write-Host "Tag $tag already exists. Skipping tag creation."
|
||||
}
|
||||
|
||||
- name: Create GitHub Release
|
||||
uses: softprops/action-gh-release@v2
|
||||
with:
|
||||
tag_name: ${{ steps.package_version.outputs.version }}
|
||||
name: ${{ steps.package_version.outputs.version }}
|
||||
draft: false
|
||||
prerelease: false
|
||||
files: output/LightlessClient.zip
|
||||
@@ -3,7 +3,7 @@
|
||||
<PropertyGroup>
|
||||
<Authors></Authors>
|
||||
<Company></Company>
|
||||
<Version>1.11.1</Version>
|
||||
<Version>1.11.2</Version>
|
||||
<Description></Description>
|
||||
<Copyright></Copyright>
|
||||
<PackageProjectUrl>https://github.com/Light-Public-Syncshells/LightlessClient</PackageProjectUrl>
|
||||
|
||||
@@ -63,7 +63,7 @@ internal sealed partial class CharaDataHubUi
|
||||
ImGui.AlignTextToFramePadding();
|
||||
ImGui.TextUnformatted("GPose Lobby");
|
||||
ImGui.SameLine();
|
||||
UiSharedService.ColorTextWrapped(_charaDataGposeTogetherManager.CurrentGPoseLobbyId, ImGuiColors.ParsedGreen);
|
||||
UiSharedService.ColorTextWrapped(_charaDataGposeTogetherManager.CurrentGPoseLobbyId, UIColors.Get("LightlessBlue"));
|
||||
ImGui.SameLine();
|
||||
if (_uiSharedService.IconButton(FontAwesomeIcon.Clipboard))
|
||||
{
|
||||
@@ -130,7 +130,7 @@ internal sealed partial class CharaDataHubUi
|
||||
ImGui.AlignTextToFramePadding();
|
||||
var note = _serverConfigurationManager.GetNoteForUid(user.UserData.UID);
|
||||
var userText = note == null ? user.UserData.AliasOrUID : $"{note} ({user.UserData.AliasOrUID})";
|
||||
UiSharedService.ColorText(userText, ImGuiColors.ParsedGreen);
|
||||
UiSharedService.ColorText(userText, UIColors.Get("LightlessBlue"));
|
||||
|
||||
var buttonsize = _uiSharedService.GetIconButtonSize(FontAwesomeIcon.ArrowRight).X;
|
||||
var buttonsize2 = _uiSharedService.GetIconButtonSize(FontAwesomeIcon.Plus).X;
|
||||
@@ -165,7 +165,7 @@ internal sealed partial class CharaDataHubUi
|
||||
UiSharedService.AttachToolTip(user.WorldDataDescriptor + UiSharedService.TooltipSeparator);
|
||||
|
||||
ImGui.SameLine();
|
||||
_uiSharedService.IconText(FontAwesomeIcon.Map, sameMapAndServer.SameMap ? ImGuiColors.ParsedGreen : ImGuiColors.DalamudRed);
|
||||
_uiSharedService.IconText(FontAwesomeIcon.Map, sameMapAndServer.SameMap ? UIColors.Get("LightlessBlue") : ImGuiColors.DalamudRed);
|
||||
if (ImGui.IsItemClicked(ImGuiMouseButton.Left) && user.WorldData != null)
|
||||
{
|
||||
_dalamudUtilService.SetMarkerAndOpenMap(new(user.WorldData.Value.PositionX, user.WorldData.Value.PositionY, user.WorldData.Value.PositionZ), user.Map);
|
||||
@@ -175,12 +175,12 @@ internal sealed partial class CharaDataHubUi
|
||||
+ "Note: For GPose synchronization to work properly, you must be on the same map.");
|
||||
|
||||
ImGui.SameLine();
|
||||
_uiSharedService.IconText(FontAwesomeIcon.Globe, sameMapAndServer.SameServer ? ImGuiColors.ParsedGreen : ImGuiColors.DalamudRed);
|
||||
_uiSharedService.IconText(FontAwesomeIcon.Globe, sameMapAndServer.SameServer ? UIColors.Get("LightlessBlue") : ImGuiColors.DalamudRed);
|
||||
UiSharedService.AttachToolTip((sameMapAndServer.SameMap ? "You are on the same server." : "You are not on the same server.") + UiSharedService.TooltipSeparator
|
||||
+ "Note: GPose synchronization is not dependent on the current server, but you will have to spawn a character for the other lobby users.");
|
||||
|
||||
ImGui.SameLine();
|
||||
_uiSharedService.IconText(FontAwesomeIcon.Running, sameMapAndServer.SameEverything ? ImGuiColors.ParsedGreen : ImGuiColors.DalamudRed);
|
||||
_uiSharedService.IconText(FontAwesomeIcon.Running, sameMapAndServer.SameEverything ? UIColors.Get("LightlessBlue") : ImGuiColors.DalamudRed);
|
||||
UiSharedService.AttachToolTip(sameMapAndServer.SameEverything ? "You are in the same instanced area." : "You are not the same instanced area." + UiSharedService.TooltipSeparator +
|
||||
"Note: Users not in your instance, but on the same map, will be drawn as floating wisps." + Environment.NewLine
|
||||
+ "Note: GPose synchronization is not dependent on the current instance, but you will have to spawn a character for the other lobby users.");
|
||||
|
||||
@@ -241,7 +241,7 @@ internal sealed partial class CharaDataHubUi
|
||||
ImGui.SameLine(pos);
|
||||
if (!dataDto.HasMissingFiles)
|
||||
{
|
||||
UiSharedService.ColorTextWrapped("All files to download this character data are present on the server", ImGuiColors.HealerGreen);
|
||||
UiSharedService.ColorTextWrapped("All files to download this character data are present on the server", UIColors.Get("LightlessBlue"));
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -769,7 +769,7 @@ internal sealed partial class CharaDataHubUi
|
||||
}
|
||||
else if (_charaDataManager.DataCreationTask != null && _charaDataManager.DataCreationTask.IsCompleted)
|
||||
{
|
||||
var color = _charaDataManager.DataCreationTask.Result.Success ? ImGuiColors.HealerGreen : ImGuiColors.DalamudRed;
|
||||
var color = _charaDataManager.DataCreationTask.Result.Success ? UIColors.Get("LightlessBlue") : ImGuiColors.DalamudRed;
|
||||
UiSharedService.ColorTextWrapped(_charaDataManager.DataCreationTask.Result.Output, color);
|
||||
}
|
||||
|
||||
|
||||
@@ -112,7 +112,7 @@ internal partial class CharaDataHubUi
|
||||
var noteText = pose.Key.MetaInfo.IsOwnData ? "YOU" : (userNote == null ? pose.Key.MetaInfo.Uploader.AliasOrUID : $"{userNote} ({pose.Key.MetaInfo.Uploader.AliasOrUID})");
|
||||
ImGui.TextUnformatted("Pose by");
|
||||
ImGui.SameLine();
|
||||
UiSharedService.ColorText(noteText, ImGuiColors.ParsedGreen);
|
||||
UiSharedService.ColorText(noteText, UIColors.Get("LightlessBlue"));
|
||||
using (ImRaii.Group())
|
||||
{
|
||||
UiSharedService.ColorText("Character Data Description", ImGuiColors.DalamudGrey);
|
||||
@@ -176,7 +176,7 @@ internal partial class CharaDataHubUi
|
||||
Vector2 coneBase2 = circleCenter + baseDir2 * circleRadius;
|
||||
|
||||
// Draw the cone as a filled triangle
|
||||
drawList.AddTriangleFilled(circleCenter, coneBase1, coneBase2, UiSharedService.Color(ImGuiColors.ParsedGreen));
|
||||
drawList.AddTriangleFilled(circleCenter, coneBase1, coneBase2, UiSharedService.Color(UIColors.Get("LightlessBlue")));
|
||||
drawList.AddCircle(circleCenter, circleDiameter / 2, UiSharedService.Color(ImGuiColors.DalamudWhite), 360, 2);
|
||||
var distance = pose.Value.Distance.ToString("0.0") + "y";
|
||||
var textSize = ImGui.CalcTextSize(distance);
|
||||
|
||||
@@ -383,7 +383,7 @@ internal sealed partial class CharaDataHubUi : WindowMediatorSubscriberBase
|
||||
UiSharedService.AttachToolTip($"Target the GPose Character {CharaName(actor.Name.TextValue)}");
|
||||
ImGui.AlignTextToFramePadding();
|
||||
var pos = ImGui.GetCursorPosX();
|
||||
using (ImRaii.PushColor(ImGuiCol.Text, ImGuiColors.HealerGreen, actor.Address == (_dalamudUtilService.GetGposeTargetGameObjectAsync().GetAwaiter().GetResult()?.Address ?? nint.Zero)))
|
||||
using (ImRaii.PushColor(ImGuiCol.Text, UIColors.Get("LightlessBlue"), actor.Address == (_dalamudUtilService.GetGposeTargetGameObjectAsync().GetAwaiter().GetResult()?.Address ?? nint.Zero)))
|
||||
{
|
||||
ImGui.TextUnformatted(CharaName(actor.Name.TextValue));
|
||||
}
|
||||
|
||||
@@ -276,7 +276,7 @@ public class CompactUi : WindowMediatorSubscriberBase
|
||||
{
|
||||
ImGui.SetCursorPosX((ImGui.GetWindowContentRegionMin().X + UiSharedService.GetWindowContentRegionWidth()) / 2 - (userSize.X + textSize.X) / 2 - ImGui.GetStyle().ItemSpacing.X / 2);
|
||||
if (!printShard) ImGui.AlignTextToFramePadding();
|
||||
ImGui.TextColored(ImGuiColors.ParsedGreen, userCount);
|
||||
ImGui.TextColored(UIColors.Get("LightlessPurple"), userCount);
|
||||
ImGui.SameLine();
|
||||
if (!printShard) ImGui.AlignTextToFramePadding();
|
||||
ImGui.TextUnformatted("Users Online");
|
||||
@@ -589,7 +589,7 @@ public class CompactUi : WindowMediatorSubscriberBase
|
||||
{
|
||||
ServerState.Connecting => ImGuiColors.DalamudYellow,
|
||||
ServerState.Reconnecting => ImGuiColors.DalamudRed,
|
||||
ServerState.Connected => ImGuiColors.ParsedGreen,
|
||||
ServerState.Connected => UIColors.Get("LightlessPurple"),
|
||||
ServerState.Disconnected => ImGuiColors.DalamudYellow,
|
||||
ServerState.Disconnecting => ImGuiColors.DalamudYellow,
|
||||
ServerState.Unauthorized => ImGuiColors.DalamudRed,
|
||||
|
||||
@@ -202,7 +202,7 @@ public class DrawUserPair
|
||||
}
|
||||
else if (!_pair.IsOnline)
|
||||
{
|
||||
using var _ = ImRaii.PushColor(ImGuiCol.Text, ImGuiColors.DalamudRed);
|
||||
using var _ = ImRaii.PushColor(ImGuiCol.Text, UIColors.Get("DimRed"));
|
||||
_uiSharedService.IconText(_pair.IndividualPairStatus == API.Data.Enum.IndividualPairStatus.OneSided
|
||||
? FontAwesomeIcon.ArrowsLeftRight
|
||||
: (_pair.IndividualPairStatus == API.Data.Enum.IndividualPairStatus.Bidirectional
|
||||
@@ -211,7 +211,7 @@ public class DrawUserPair
|
||||
}
|
||||
else if (_pair.IsVisible)
|
||||
{
|
||||
_uiSharedService.IconText(FontAwesomeIcon.Eye, ImGuiColors.ParsedGreen);
|
||||
_uiSharedService.IconText(FontAwesomeIcon.Eye, UIColors.Get("LightlessBlue"));
|
||||
userPairText = _pair.UserData.AliasOrUID + " is visible: " + _pair.PlayerName + Environment.NewLine + "Click to target this player";
|
||||
if (ImGui.IsItemClicked())
|
||||
{
|
||||
@@ -220,7 +220,7 @@ public class DrawUserPair
|
||||
}
|
||||
else
|
||||
{
|
||||
using var _ = ImRaii.PushColor(ImGuiCol.Text, ImGuiColors.HealerGreen);
|
||||
using var _ = ImRaii.PushColor(ImGuiCol.Text, UIColors.Get("PairBlue"));
|
||||
_uiSharedService.IconText(_pair.IndividualPairStatus == API.Data.Enum.IndividualPairStatus.Bidirectional
|
||||
? FontAwesomeIcon.User : FontAwesomeIcon.Users);
|
||||
userPairText = _pair.UserData.AliasOrUID + " is online";
|
||||
|
||||
@@ -308,7 +308,7 @@ public partial class IntroUi : WindowMediatorSubscriberBase
|
||||
}
|
||||
else
|
||||
{
|
||||
UiSharedService.ColorTextWrapped($"OAuth2 is connected. Linked to: Discord User {_serverConfigurationManager.GetDiscordUserFromToken(selectedServer)}", ImGuiColors.HealerGreen);
|
||||
UiSharedService.ColorTextWrapped($"OAuth2 is connected. Linked to: Discord User {_serverConfigurationManager.GetDiscordUserFromToken(selectedServer)}", UIColors.Get("LightlessBlue"));
|
||||
UiSharedService.TextWrapped("Now press the update UIDs button to get a list of all of your UIDs on the server.");
|
||||
_uiShared.DrawUpdateOAuthUIDsButton(selectedServer);
|
||||
var playerName = _dalamudUtilService.GetPlayerName();
|
||||
|
||||
@@ -110,7 +110,7 @@ public class PopoutProfileUi : WindowMediatorSubscriberBase
|
||||
var rectMax = drawList.GetClipRectMax();
|
||||
|
||||
using (_uiSharedService.UidFont.Push())
|
||||
UiSharedService.ColorText(_pair.UserData.AliasOrUID, ImGuiColors.HealerGreen);
|
||||
UiSharedService.ColorText(_pair.UserData.AliasOrUID, UIColors.Get("LightlessBlue"));
|
||||
|
||||
ImGuiHelpers.ScaledDummy(spacing.Y, spacing.Y);
|
||||
var textPos = ImGui.GetCursorPosY();
|
||||
@@ -123,7 +123,7 @@ public class PopoutProfileUi : WindowMediatorSubscriberBase
|
||||
UiSharedService.ColorText(note, ImGuiColors.DalamudGrey);
|
||||
}
|
||||
string status = _pair.IsVisible ? "Visible" : (_pair.IsOnline ? "Online" : "Offline");
|
||||
UiSharedService.ColorText(status, (_pair.IsVisible || _pair.IsOnline) ? ImGuiColors.HealerGreen : ImGuiColors.DalamudRed);
|
||||
UiSharedService.ColorText(status, (_pair.IsVisible || _pair.IsOnline) ? UIColors.Get("LightlessBlue") : ImGuiColors.DalamudRed);
|
||||
if (_pair.IsVisible)
|
||||
{
|
||||
ImGui.SameLine();
|
||||
|
||||
@@ -853,7 +853,7 @@ public class SettingsUi : WindowMediatorSubscriberBase
|
||||
_uiShared.DrawHelpText("If this option is selected all already existing notes for UIDs will be overwritten by the imported notes.");
|
||||
if (_notesSuccessfullyApplied.HasValue && _notesSuccessfullyApplied.Value)
|
||||
{
|
||||
UiSharedService.ColorTextWrapped("User Notes successfully imported", ImGuiColors.HealerGreen);
|
||||
UiSharedService.ColorTextWrapped("User Notes successfully imported", UIColors.Get("LightlessBlue"));
|
||||
}
|
||||
else if (_notesSuccessfullyApplied.HasValue && !_notesSuccessfullyApplied.Value)
|
||||
{
|
||||
@@ -1474,10 +1474,10 @@ public class SettingsUi : WindowMediatorSubscriberBase
|
||||
ImGuiHelpers.ScaledDummy(5);
|
||||
UiSharedService.ColorText("A potential rename/world change from this character was detected:", ImGuiColors.DalamudYellow);
|
||||
using (ImRaii.PushIndent(10f))
|
||||
UiSharedService.ColorText("Entry: " + authWithCid.CharacterName + " - " + _dalamudUtilService.WorldData.Value[(ushort)authWithCid.WorldId], ImGuiColors.ParsedGreen);
|
||||
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);
|
||||
using (ImRaii.PushIndent(10f))
|
||||
UiSharedService.ColorText("Current: " + youName + " - " + _dalamudUtilService.WorldData.Value[(ushort)youWorld], ImGuiColors.ParsedGreen);
|
||||
UiSharedService.ColorText("Current: " + youName + " - " + _dalamudUtilService.WorldData.Value[(ushort)youWorld], UIColors.Get("LightlessBlue"));
|
||||
ImGuiHelpers.ScaledDummy(5);
|
||||
if (_uiShared.IconTextButton(FontAwesomeIcon.ArrowRight, "Update Entry to Current Character"))
|
||||
{
|
||||
@@ -1528,7 +1528,7 @@ public class SettingsUi : WindowMediatorSubscriberBase
|
||||
{
|
||||
misManaged = true;
|
||||
}
|
||||
Vector4 color = ImGuiColors.ParsedGreen;
|
||||
Vector4 color = UIColors.Get("LightlessBlue");
|
||||
string text = thisIsYou ? "Your Current Character" : string.Empty;
|
||||
if (misManaged)
|
||||
{
|
||||
@@ -1926,11 +1926,11 @@ public class SettingsUi : WindowMediatorSubscriberBase
|
||||
{
|
||||
ImGui.TextUnformatted("Service " + _serverConfigurationManager.CurrentServer!.ServerName + ":");
|
||||
ImGui.SameLine();
|
||||
ImGui.TextColored(ImGuiColors.ParsedGreen, "Available");
|
||||
ImGui.TextColored(UIColors.Get("LightlessBlue"), "Available");
|
||||
ImGui.SameLine();
|
||||
ImGui.TextUnformatted("(");
|
||||
ImGui.SameLine();
|
||||
ImGui.TextColored(ImGuiColors.ParsedGreen, _apiController.OnlineUsers.ToString(CultureInfo.InvariantCulture));
|
||||
ImGui.TextColored(UIColors.Get("LightlessBlue"), _apiController.OnlineUsers.ToString(CultureInfo.InvariantCulture));
|
||||
ImGui.SameLine();
|
||||
ImGui.TextUnformatted("Users Online");
|
||||
ImGui.SameLine();
|
||||
|
||||
@@ -77,7 +77,7 @@ public class StandaloneProfileUi : WindowMediatorSubscriberBase
|
||||
var headerSize = ImGui.GetCursorPosY() - ImGui.GetStyle().WindowPadding.Y;
|
||||
|
||||
using (_uiSharedService.UidFont.Push())
|
||||
UiSharedService.ColorText(Pair.UserData.AliasOrUID, ImGuiColors.HealerGreen);
|
||||
UiSharedService.ColorText(Pair.UserData.AliasOrUID, UIColors.Get("LightlessBlue"));
|
||||
|
||||
ImGuiHelpers.ScaledDummy(new Vector2(spacing.Y, spacing.Y));
|
||||
var textPos = ImGui.GetCursorPosY() - headerSize;
|
||||
@@ -118,7 +118,7 @@ public class StandaloneProfileUi : WindowMediatorSubscriberBase
|
||||
UiSharedService.ColorText(note, ImGuiColors.DalamudGrey);
|
||||
}
|
||||
string status = Pair.IsVisible ? "Visible" : (Pair.IsOnline ? "Online" : "Offline");
|
||||
UiSharedService.ColorText(status, (Pair.IsVisible || Pair.IsOnline) ? ImGuiColors.HealerGreen : ImGuiColors.DalamudRed);
|
||||
UiSharedService.ColorText(status, (Pair.IsVisible || Pair.IsOnline) ? UIColors.Get("LightlessBlue") : ImGuiColors.DalamudRed);
|
||||
if (Pair.IsVisible)
|
||||
{
|
||||
ImGui.SameLine();
|
||||
|
||||
34
LightlessSync/UI/UIColors.cs
Normal file
34
LightlessSync/UI/UIColors.cs
Normal file
@@ -0,0 +1,34 @@
|
||||
using System.Globalization;
|
||||
using System.Numerics;
|
||||
|
||||
namespace LightlessSync.UI
|
||||
{
|
||||
internal static class UIColors
|
||||
{
|
||||
private static readonly Dictionary<string, string> HexColors = new(StringComparer.OrdinalIgnoreCase)
|
||||
{
|
||||
{ "LightlessPurple", "#ad8af5" },
|
||||
{ "LightlessBlue", "#64c7e8" },
|
||||
{ "PairBlue", "#4e98b1" },
|
||||
{ "DimRed", "#bd0000" },
|
||||
};
|
||||
|
||||
public static Vector4 Get(string name)
|
||||
{
|
||||
if (!HexColors.TryGetValue(name, out var hex))
|
||||
throw new ArgumentException($"Color '{name}' not found in UIColors.");
|
||||
|
||||
return HexToRgba(hex);
|
||||
}
|
||||
|
||||
public static Vector4 HexToRgba(string hexColor)
|
||||
{
|
||||
hexColor = hexColor.TrimStart('#');
|
||||
int r = int.Parse(hexColor.Substring(0, 2), NumberStyles.HexNumber);
|
||||
int g = int.Parse(hexColor.Substring(2, 2), NumberStyles.HexNumber);
|
||||
int b = int.Parse(hexColor.Substring(4, 2), NumberStyles.HexNumber);
|
||||
int a = hexColor.Length == 8 ? int.Parse(hexColor.Substring(6, 2), NumberStyles.HexNumber) : 255;
|
||||
return new Vector4(r / 255f, g / 255f, b / 255f, a / 255f);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -305,7 +305,7 @@ public partial class UiSharedService : DisposableMediatorSubscriberBase
|
||||
}
|
||||
}
|
||||
|
||||
public static Vector4 GetBoolColor(bool input) => input ? ImGuiColors.ParsedGreen : ImGuiColors.DalamudRed;
|
||||
public static Vector4 GetBoolColor(bool input) => input ? UIColors.Get("LightlessBlue") : UIColors.Get("DimRed");
|
||||
|
||||
public static string GetNotes(List<Pair> pairs)
|
||||
{
|
||||
@@ -394,7 +394,7 @@ public partial class UiSharedService : DisposableMediatorSubscriberBase
|
||||
}
|
||||
|
||||
public static Vector4 UploadColor((long, long) data) => data.Item1 == 0 ? ImGuiColors.DalamudGrey :
|
||||
data.Item1 == data.Item2 ? ImGuiColors.ParsedGreen : ImGuiColors.DalamudYellow;
|
||||
data.Item1 == data.Item2 ? UIColors.Get("LightlessBlue") : ImGuiColors.DalamudYellow;
|
||||
|
||||
public bool ApplyNotesFromClipboard(string notes, bool overwrite)
|
||||
{
|
||||
@@ -436,7 +436,7 @@ public partial class UiSharedService : DisposableMediatorSubscriberBase
|
||||
|
||||
public void BooleanToColoredIcon(bool value, bool inline = true)
|
||||
{
|
||||
using var colorgreen = ImRaii.PushColor(ImGuiCol.Text, ImGuiColors.HealerGreen, value);
|
||||
using var colorgreen = ImRaii.PushColor(ImGuiCol.Text, UIColors.Get("LightlessBlue"), value);
|
||||
using var colorred = ImRaii.PushColor(ImGuiCol.Text, ImGuiColors.DalamudRed, !value);
|
||||
|
||||
if (inline) ImGui.SameLine();
|
||||
@@ -645,7 +645,7 @@ public partial class UiSharedService : DisposableMediatorSubscriberBase
|
||||
{
|
||||
if (_discordOAuthCheck.Result != null)
|
||||
{
|
||||
ColorTextWrapped("Server is compatible with Discord OAuth2", ImGuiColors.HealerGreen);
|
||||
ColorTextWrapped("Server is compatible with Discord OAuth2", UIColors.Get("LightlessBlue"));
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -678,7 +678,7 @@ public partial class UiSharedService : DisposableMediatorSubscriberBase
|
||||
selectedServer.OAuthToken = _discordOAuthGetCode.Result;
|
||||
_discordOAuthGetCode = null;
|
||||
_serverConfigurationManager.Save();
|
||||
ColorTextWrapped("Success", ImGuiColors.HealerGreen);
|
||||
ColorTextWrapped("Success", UIColors.Get("LightlessBlue"));
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -708,7 +708,7 @@ public partial class UiSharedService : DisposableMediatorSubscriberBase
|
||||
|
||||
if (tokenExpiry > DateTime.UtcNow)
|
||||
{
|
||||
ColorTextWrapped($"OAuth2 is enabled, linked to: Discord User {_serverConfigurationManager.GetDiscordUserFromToken(selectedServer)}", ImGuiColors.HealerGreen);
|
||||
ColorTextWrapped($"OAuth2 is enabled, linked to: Discord User {_serverConfigurationManager.GetDiscordUserFromToken(selectedServer)}", UIColors.Get("LightlessBlue"));
|
||||
TextWrapped($"The OAuth2 token will expire on {tokenExpiry:yyyy-MM-dd} and automatically renew itself during login on or after {(tokenExpiry - TimeSpan.FromDays(7)):yyyy-MM-dd}.");
|
||||
using (ImRaii.Disabled(!CtrlPressed()))
|
||||
{
|
||||
@@ -740,7 +740,7 @@ public partial class UiSharedService : DisposableMediatorSubscriberBase
|
||||
if (foundUids > 0)
|
||||
{
|
||||
ColorTextWrapped($"Found {foundUids} associated UIDs on the server, Primary UID: {primaryUid.Key} (Vanity UID: {vanity})",
|
||||
ImGuiColors.HealerGreen);
|
||||
UIColors.Get("LightlessBlue"));
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 770 KiB After Width: | Height: | Size: 206 KiB |
Submodule PenumbraAPI updated: af41b1787a...953dd227af
@@ -1,6 +1,6 @@
|
||||
# Lightless Sync Dalamud Plugin
|
||||
|
||||
Available at [This dalamud Repo](https://raw.githubusercontent.com/Light-Public-Syncshells/repo/main/plogonmaster.json)
|
||||
Available at [This dalamud Repo](https://raw.githubusercontent.com/Light-Public-Syncshells/LightlessSync/refs/heads/main/plogonmaster.json)
|
||||
|
||||
# [Lightless Sync Discord](https://discord.gg/dsbjcXMnhA)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user