mirror of
https://github.com/goatcorp/Dalamud.git
synced 2025-12-12 18:27:23 +01:00
Compare commits
17 commits
7102d22f59
...
c665ac61e5
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c665ac61e5 | ||
|
|
8ed1af30df | ||
|
|
e8485dee25 | ||
|
|
0072f49fe8 | ||
|
|
c45c6aafe1 | ||
|
|
2029a0f8a6 | ||
|
|
bcb8094c2d | ||
|
|
624191d1e0 | ||
|
|
c254c8600e | ||
|
|
61376fe84e | ||
|
|
2f5f52b572 | ||
|
|
7199bfb0a9 | ||
|
|
abcddde591 | ||
|
|
2a99108eb1 | ||
|
|
8a5f1fd96d | ||
|
|
d4fe523d73 | ||
|
|
9e5723359a |
14 changed files with 719 additions and 579 deletions
|
|
@ -6,7 +6,7 @@
|
|||
|
||||
<PropertyGroup Label="Feature">
|
||||
<Description>XIV Launcher addon framework</Description>
|
||||
<DalamudVersion>13.0.0.13</DalamudVersion>
|
||||
<DalamudVersion>13.0.0.14</DalamudVersion>
|
||||
<AssemblyVersion>$(DalamudVersion)</AssemblyVersion>
|
||||
<Version>$(DalamudVersion)</Version>
|
||||
<FileVersion>$(DalamudVersion)</FileVersion>
|
||||
|
|
@ -227,9 +227,4 @@
|
|||
<!-- writes the attribute to the customAssemblyInfo file -->
|
||||
<WriteCodeFragment Language="C#" OutputFile="$(CustomAssemblyInfoFile)" AssemblyAttributes="@(AssemblyAttributes)" />
|
||||
</Target>
|
||||
|
||||
<!-- Copy plugin .targets folder into distrib -->
|
||||
<Target Name="CopyPluginTargets" AfterTargets="Build">
|
||||
<Copy SourceFiles="$(ProjectDir)\..\targets\Dalamud.Plugin.targets;$(ProjectDir)\..\targets\Dalamud.Plugin.Bootstrap.targets" DestinationFolder="$(OutDir)\targets" />
|
||||
</Target>
|
||||
</Project>
|
||||
|
|
|
|||
|
|
@ -151,7 +151,7 @@ public enum DalamudAsset
|
|||
/// <see cref="DalamudAssetPurpose.Font"/>: FontAwesome Free Solid.
|
||||
/// </summary>
|
||||
[DalamudAsset(DalamudAssetPurpose.Font)]
|
||||
[DalamudAssetPath("UIRes", "FontAwesomeFreeSolid.otf")]
|
||||
[DalamudAssetPath("UIRes", "FontAwesome710FreeSolid.otf")]
|
||||
FontAwesomeFreeSolid = 2003,
|
||||
|
||||
/// <summary>
|
||||
|
|
|
|||
|
|
@ -82,8 +82,10 @@ internal sealed class DataManager : IInternalDisposableService, IDataManager
|
|||
var tsInfo =
|
||||
JsonConvert.DeserializeObject<LauncherTroubleshootingInfo>(
|
||||
dalamud.StartInfo.TroubleshootingPackData);
|
||||
|
||||
// Don't fail for IndexIntegrityResult.Exception, since the check during launch has a very small timeout
|
||||
this.HasModifiedGameDataFiles =
|
||||
tsInfo?.IndexIntegrity is LauncherTroubleshootingInfo.IndexIntegrityResult.Failed or LauncherTroubleshootingInfo.IndexIntegrityResult.Exception;
|
||||
tsInfo?.IndexIntegrity is LauncherTroubleshootingInfo.IndexIntegrityResult.Failed;
|
||||
|
||||
if (this.HasModifiedGameDataFiles)
|
||||
Log.Verbose("Game data integrity check failed!\n{TsData}", dalamud.StartInfo.TroubleshootingPackData);
|
||||
|
|
|
|||
|
|
@ -3,7 +3,6 @@ using System.Globalization;
|
|||
using Lumina.Text.ReadOnly;
|
||||
|
||||
using DSeString = Dalamud.Game.Text.SeStringHandling.SeString;
|
||||
using LSeString = Lumina.Text.SeString;
|
||||
|
||||
namespace Dalamud.Game.Text.Evaluator;
|
||||
|
||||
|
|
@ -71,9 +70,6 @@ public readonly struct SeStringParameter
|
|||
|
||||
public static implicit operator SeStringParameter(ReadOnlySeStringSpan value) => new(new ReadOnlySeString(value));
|
||||
|
||||
[Obsolete("Switch to using ReadOnlySeString instead of Lumina's SeString.", true)]
|
||||
public static implicit operator SeStringParameter(LSeString value) => new(new ReadOnlySeString(value.RawData));
|
||||
|
||||
public static implicit operator SeStringParameter(DSeString value) => new(new ReadOnlySeString(value.Encode()));
|
||||
|
||||
public static implicit operator SeStringParameter(string value) => new(value);
|
||||
|
|
|
|||
|
|
@ -113,14 +113,6 @@ public class SeString
|
|||
/// <returns>Equivalent SeString.</returns>
|
||||
public static implicit operator SeString(string str) => new(new TextPayload(str));
|
||||
|
||||
/// <summary>
|
||||
/// Implicitly convert a string into a SeString containing a <see cref="TextPayload"/>.
|
||||
/// </summary>
|
||||
/// <param name="str">string to convert.</param>
|
||||
/// <returns>Equivalent SeString.</returns>
|
||||
[Obsolete("Switch to using ReadOnlySeString instead of Lumina's SeString.", true)]
|
||||
public static explicit operator SeString(Lumina.Text.SeString str) => str.ToDalamudString();
|
||||
|
||||
/// <summary>
|
||||
/// Parse a binary game message into an SeString.
|
||||
/// </summary>
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
|
|
@ -25,7 +25,9 @@ public record struct SeStringDrawParams
|
|||
public SeStringReplacementEntity.GetEntityDelegate? GetEntity { get; set; }
|
||||
|
||||
/// <summary>Gets or sets the screen offset of the left top corner.</summary>
|
||||
/// <value>Screen offset to draw at, or <c>null</c> to use <see cref="ImGui.GetCursorScreenPos()"/>.</value>
|
||||
/// <value>Screen offset to draw at, or <c>null</c> to use <see cref="ImGui.GetCursorScreenPos()"/>, if no <see cref="TargetDrawList"/>
|
||||
/// is specified. Otherwise, you must specify it (for example, by passing <see cref="ImGui.GetCursorScreenPos()"/> when passing the window
|
||||
/// draw list.</value>
|
||||
public Vector2? ScreenOffset { get; set; }
|
||||
|
||||
/// <summary>Gets or sets the font to use.</summary>
|
||||
|
|
|
|||
|
|
@ -63,11 +63,12 @@ public unsafe ref struct SeStringDrawState
|
|||
else
|
||||
{
|
||||
this.drawList = ssdp.TargetDrawList.Value;
|
||||
this.ScreenOffset = Vector2.Zero;
|
||||
this.ScreenOffset = ssdp.ScreenOffset ?? Vector2.Zero;
|
||||
|
||||
// API14: Remove, always throw
|
||||
if (ThreadSafety.IsMainThread)
|
||||
{
|
||||
this.ScreenOffset = ssdp.ScreenOffset ?? ImGui.GetCursorScreenPos();
|
||||
this.FontSize = ssdp.FontSize ?? ImGui.GetFontSize();
|
||||
}
|
||||
else
|
||||
|
|
|
|||
|
|
@ -177,6 +177,24 @@ internal unsafe class SeStringRendererTestWidget : IDataWindowWidget
|
|||
ImGuiHelpers.SeStringWrapped(this.logkind.Value.Data.Span, this.style);
|
||||
}
|
||||
|
||||
if (ImGui.CollapsingHeader("Draw into drawlist"))
|
||||
{
|
||||
ImGuiHelpers.ScaledDummy(100);
|
||||
ImGui.SetCursorScreenPos(ImGui.GetItemRectMin() + ImGui.GetStyle().FramePadding);
|
||||
var clipMin = ImGui.GetItemRectMin() + ImGui.GetStyle().FramePadding;
|
||||
var clipMax = ImGui.GetItemRectMax() - ImGui.GetStyle().FramePadding;
|
||||
clipMin.Y = MathF.Max(clipMin.Y, ImGui.GetWindowPos().Y);
|
||||
clipMax.Y = MathF.Min(clipMax.Y, ImGui.GetWindowPos().Y + ImGui.GetWindowHeight());
|
||||
|
||||
var dl = ImGui.GetWindowDrawList();
|
||||
dl.PushClipRect(clipMin, clipMax);
|
||||
ImGuiHelpers.CompileSeStringWrapped(
|
||||
"<icon(1)>Test test<icon(1)>",
|
||||
new SeStringDrawParams
|
||||
{ Color = 0xFFFFFFFF, WrapWidth = float.MaxValue, TargetDrawList = dl });
|
||||
dl.PopClipRect();
|
||||
}
|
||||
|
||||
if (ImGui.CollapsingHeader("Addon Table"u8))
|
||||
{
|
||||
if (ImGui.BeginTable("Addon Sheet"u8, 3))
|
||||
|
|
|
|||
|
|
@ -219,6 +219,12 @@ public interface IUiBuilder
|
|||
/// </summary>
|
||||
bool ShouldUseReducedMotion { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets a value indicating whether the user has enabled the "Enable sound effects for plugin windows" setting.<br />
|
||||
/// This setting is effected by the in-game "System Sounds" option and volume.
|
||||
/// </summary>
|
||||
bool PluginUISoundEffectsEnabled { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Loads an ULD file that can load textures containing multiple icons in a single texture.
|
||||
/// </summary>
|
||||
|
|
@ -560,6 +566,9 @@ public sealed class UiBuilder : IDisposable, IUiBuilder
|
|||
/// </summary>
|
||||
public bool ShouldUseReducedMotion => Service<DalamudConfiguration>.Get().ReduceMotions ?? false;
|
||||
|
||||
/// <inheritdoc />
|
||||
public bool PluginUISoundEffectsEnabled => Service<DalamudConfiguration>.Get().EnablePluginUISoundEffects;
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets a value indicating whether statistics about UI draw time should be collected.
|
||||
/// </summary>
|
||||
|
|
|
|||
|
|
@ -908,7 +908,7 @@ public abstract class Window
|
|||
private void DrawErrorMessage()
|
||||
{
|
||||
// TODO: Once window systems are services, offer to reload the plugin
|
||||
ImGui.TextColoredWrapped(ImGuiColors.DalamudRed,Loc.Localize("WindowSystemErrorOccurred", "An error occurred while rendering this window. Please contact the developer for details."));
|
||||
ImGui.TextColoredWrapped(ImGuiColors.DalamudRed, Loc.Localize("WindowSystemErrorOccurred", "An error occurred while rendering this window. Please contact the developer for details."));
|
||||
|
||||
ImGuiHelpers.ScaledDummy(5);
|
||||
|
||||
|
|
|
|||
|
|
@ -158,16 +158,6 @@ public static partial class Util
|
|||
return branchInternal = gitBranch;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the active Dalamud track, if this instance was launched through XIVLauncher and used a version
|
||||
/// downloaded from webservices.
|
||||
/// </summary>
|
||||
/// <returns>The name of the track, or null.</returns>
|
||||
internal static string? GetActiveTrack()
|
||||
{
|
||||
return Environment.GetEnvironmentVariable("DALAMUD_BRANCH");
|
||||
}
|
||||
|
||||
/// <inheritdoc cref="DescribeAddress(nint)"/>
|
||||
public static unsafe string DescribeAddress(void* p) => DescribeAddress((nint)p);
|
||||
|
||||
|
|
@ -703,6 +693,16 @@ public static partial class Util
|
|||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the active Dalamud track, if this instance was launched through XIVLauncher and used a version
|
||||
/// downloaded from webservices.
|
||||
/// </summary>
|
||||
/// <returns>The name of the track, or null.</returns>
|
||||
internal static string? GetActiveTrack()
|
||||
{
|
||||
return Environment.GetEnvironmentVariable("DALAMUD_BRANCH");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets a random, inoffensive, human-friendly string.
|
||||
/// </summary>
|
||||
|
|
|
|||
|
|
@ -1,11 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project>
|
||||
<PropertyGroup>
|
||||
<DalamudLibPath Condition="$([MSBuild]::IsOSPlatform('Windows'))">$(appdata)\XIVLauncher\addon\Hooks\dev\</DalamudLibPath>
|
||||
<DalamudLibPath Condition="$([MSBuild]::IsOSPlatform('Linux'))">$(HOME)/.xlcore/dalamud/Hooks/dev/</DalamudLibPath>
|
||||
<DalamudLibPath Condition="$([MSBuild]::IsOSPlatform('OSX'))">$(HOME)/Library/Application Support/XIV on Mac/dalamud/Hooks/dev/</DalamudLibPath>
|
||||
<DalamudLibPath Condition="$(DALAMUD_HOME) != ''">$(DALAMUD_HOME)/</DalamudLibPath>
|
||||
</PropertyGroup>
|
||||
|
||||
<Import Project="$(DalamudLibPath)/targets/Dalamud.Plugin.targets"/>
|
||||
</Project>
|
||||
|
|
@ -1,35 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project>
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net8.0-windows</TargetFramework>
|
||||
<Platforms>x64</Platforms>
|
||||
<Nullable>enable</Nullable>
|
||||
<LangVersion>latest</LangVersion>
|
||||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
||||
<ProduceReferenceAssembly>false</ProduceReferenceAssembly>
|
||||
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
|
||||
<RestorePackagesWithLockFile>true</RestorePackagesWithLockFile>
|
||||
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
|
||||
<AssemblySearchPaths>$(AssemblySearchPaths);$(DalamudLibPath)</AssemblySearchPaths>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="DalamudPackager" Version="11.0.0" />
|
||||
<Reference Include="FFXIVClientStructs" Private="false" />
|
||||
<Reference Include="Newtonsoft.Json" Private="false" />
|
||||
<Reference Include="Dalamud" Private="false" />
|
||||
<Reference Include="ImGui.NET" Private="false" />
|
||||
<Reference Include="ImGuiScene" Private="false" />
|
||||
<Reference Include="Lumina" Private="false" />
|
||||
<Reference Include="Lumina.Excel" Private="false" />
|
||||
<Reference Include="Serilog" Private="false" />
|
||||
</ItemGroup>
|
||||
|
||||
<Target Name="Message" BeforeTargets="BeforeBuild">
|
||||
<Message Text="Dalamud.Plugin: root at $(DalamudLibPath)" Importance="high" />
|
||||
</Target>
|
||||
|
||||
<Target Name="DeprecationNotice" BeforeTargets="BeforeBuild">
|
||||
<Warning Text="Using the targets file to include the Dalamud SDK is no longer recommended. Please upgrade to Dalamud.NET.Sdk - learn more here: https://dalamud.dev/plugin-development/how-tos/v12-sdk-migration" />
|
||||
</Target>
|
||||
</Project>
|
||||
Loading…
Add table
Add a link
Reference in a new issue