diff --git a/Data/samplePlugin.json b/Data/samplePlugin.json
index 4e819d1..b2b99e5 100644
--- a/Data/samplePlugin.json
+++ b/Data/samplePlugin.json
@@ -1,11 +1,13 @@
{
"Author": "your name here",
"Name": "Sample Plugin",
- "Description": "A simple description that shows up in /xlplugins. List any major slash-command(s).",
+ "Punchline": "A short one-liner that shows up in /xlplugins.",
+ "Description": "A description that shows up in /xlplugins. List any major slash-command(s).",
"InternalName": "samplePlugin",
- "AssemblyVersion": "1.0.0.0",
- "RepoUrl": "https://github.com/yourName/yourRepo",
"ApplicableVersion": "any",
- "Tags": ["sample", "plugin", "goats"],
- "DalamudApiLevel": 3
+ "Tags": [
+ "sample",
+ "plugin",
+ "goats"
+ ]
}
diff --git a/SamplePlugin.sln b/SamplePlugin.sln
index d1e8332..cdcc9cb 100644
--- a/SamplePlugin.sln
+++ b/SamplePlugin.sln
@@ -9,18 +9,18 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "UIDev", "UIDev\UIDev.csproj
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
- Debug|Any CPU = Debug|Any CPU
- Release|Any CPU = Release|Any CPU
+ Debug|x64 = Debug|x64
+ Release|x64 = Release|x64
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
- {13C812E9-0D42-4B95-8646-40EEBF30636F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {13C812E9-0D42-4B95-8646-40EEBF30636F}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {13C812E9-0D42-4B95-8646-40EEBF30636F}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {13C812E9-0D42-4B95-8646-40EEBF30636F}.Release|Any CPU.Build.0 = Release|Any CPU
- {4FEC9558-EB25-419F-B86E-51B8CFDA32B7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {4FEC9558-EB25-419F-B86E-51B8CFDA32B7}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {4FEC9558-EB25-419F-B86E-51B8CFDA32B7}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {4FEC9558-EB25-419F-B86E-51B8CFDA32B7}.Release|Any CPU.Build.0 = Release|Any CPU
+ {13C812E9-0D42-4B95-8646-40EEBF30636F}.Debug|x64.ActiveCfg = Debug|x64
+ {13C812E9-0D42-4B95-8646-40EEBF30636F}.Debug|x64.Build.0 = Debug|x64
+ {13C812E9-0D42-4B95-8646-40EEBF30636F}.Release|x64.ActiveCfg = Release|x64
+ {13C812E9-0D42-4B95-8646-40EEBF30636F}.Release|x64.Build.0 = Release|x64
+ {4FEC9558-EB25-419F-B86E-51B8CFDA32B7}.Debug|x64.ActiveCfg = Debug|x64
+ {4FEC9558-EB25-419F-B86E-51B8CFDA32B7}.Debug|x64.Build.0 = Debug|x64
+ {4FEC9558-EB25-419F-B86E-51B8CFDA32B7}.Release|x64.ActiveCfg = Release|x64
+ {4FEC9558-EB25-419F-B86E-51B8CFDA32B7}.Release|x64.Build.0 = Release|x64
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
diff --git a/SamplePlugin/Configuration.cs b/SamplePlugin/Configuration.cs
index 954de16..f71a1b9 100644
--- a/SamplePlugin/Configuration.cs
+++ b/SamplePlugin/Configuration.cs
@@ -14,7 +14,7 @@ namespace SamplePlugin
// the below exist just to make saving less cumbersome
[NonSerialized]
- private DalamudPluginInterface pluginInterface;
+ private DalamudPluginInterface? pluginInterface;
public void Initialize(DalamudPluginInterface pluginInterface)
{
@@ -23,7 +23,7 @@ namespace SamplePlugin
public void Save()
{
- this.pluginInterface.SavePluginConfig(this);
+ this.pluginInterface!.SavePluginConfig(this);
}
}
}
diff --git a/SamplePlugin/Plugin.cs b/SamplePlugin/Plugin.cs
index d3d7cb0..e278eee 100644
--- a/SamplePlugin/Plugin.cs
+++ b/SamplePlugin/Plugin.cs
@@ -1,70 +1,67 @@
using Dalamud.Game.Command;
+using Dalamud.IoC;
using Dalamud.Plugin;
-using System;
using System.IO;
using System.Reflection;
namespace SamplePlugin
{
- public class Plugin : IDalamudPlugin
+ public sealed class Plugin : IDalamudPlugin
{
public string Name => "Sample Plugin";
private const string commandName = "/pmycommand";
- private DalamudPluginInterface pi;
- private Configuration configuration;
- private PluginUI ui;
-
- // When loaded by LivePluginLoader, the executing assembly will be wrong.
- // Supplying this property allows LivePluginLoader to supply the correct location, so that
- // you have full compatibility when loaded normally and through LPL.
- public string AssemblyLocation { get => assemblyLocation; set => assemblyLocation = value; }
- private string assemblyLocation = System.Reflection.Assembly.GetExecutingAssembly().Location;
+ private DalamudPluginInterface PluginInterface { get; init; }
+ private CommandManager CommandManager { get; init; }
+ private Configuration Configuration { get; init; }
+ private PluginUI PluginUi { get; init; }
- public void Initialize(DalamudPluginInterface pluginInterface)
+ public Plugin(
+ [RequiredVersion("1.0")] DalamudPluginInterface pluginInterface,
+ [RequiredVersion("1.0")] CommandManager commandManager)
{
- this.pi = pluginInterface;
-
- this.configuration = this.pi.GetPluginConfig() as Configuration ?? new Configuration();
- this.configuration.Initialize(this.pi);
+ this.PluginInterface = pluginInterface;
+ this.CommandManager = commandManager;
+
+ this.Configuration = this.PluginInterface.GetPluginConfig() as Configuration ?? new Configuration();
+ this.Configuration.Initialize(this.PluginInterface);
// you might normally want to embed resources and load them from the manifest stream
- var imagePath = Path.Combine(Path.GetDirectoryName(AssemblyLocation), @"goat.png");
- var goatImage = this.pi.UiBuilder.LoadImage(imagePath);
- this.ui = new PluginUI(this.configuration, goatImage);
+ var assemblyLocation = Assembly.GetExecutingAssembly().Location;
+ var imagePath = Path.Combine(Path.GetDirectoryName(assemblyLocation)!, "goat.png");
+ var goatImage = this.PluginInterface.UiBuilder.LoadImage(imagePath);
+ this.PluginUi = new PluginUI(this.Configuration, goatImage);
- this.pi.CommandManager.AddHandler(commandName, new CommandInfo(OnCommand)
+ this.CommandManager.AddHandler(commandName, new CommandInfo(OnCommand)
{
HelpMessage = "A useful message to display in /xlhelp"
});
- this.pi.UiBuilder.OnBuildUi += DrawUI;
- this.pi.UiBuilder.OnOpenConfigUi += (sender, args) => DrawConfigUI();
+ this.PluginInterface.UiBuilder.Draw += DrawUI;
+ this.PluginInterface.UiBuilder.OpenConfigUi += DrawConfigUI;
}
public void Dispose()
{
- this.ui.Dispose();
-
- this.pi.CommandManager.RemoveHandler(commandName);
- this.pi.Dispose();
+ this.PluginUi.Dispose();
+ this.CommandManager.RemoveHandler(commandName);
}
private void OnCommand(string command, string args)
{
// in response to the slash command, just display our main ui
- this.ui.Visible = true;
+ this.PluginUi.Visible = true;
}
private void DrawUI()
{
- this.ui.Draw();
+ this.PluginUi.Draw();
}
private void DrawConfigUI()
{
- this.ui.SettingsVisible = true;
+ this.PluginUi.SettingsVisible = true;
}
}
}
diff --git a/SamplePlugin/Properties/AssemblyInfo.cs b/SamplePlugin/Properties/AssemblyInfo.cs
deleted file mode 100644
index 8c14100..0000000
--- a/SamplePlugin/Properties/AssemblyInfo.cs
+++ /dev/null
@@ -1,36 +0,0 @@
-using System.Reflection;
-using System.Runtime.CompilerServices;
-using System.Runtime.InteropServices;
-
-// General Information about an assembly is controlled through the following
-// set of attributes. Change these attribute values to modify the information
-// associated with an assembly.
-[assembly: AssemblyTitle("samplePlugin")]
-[assembly: AssemblyDescription("")]
-[assembly: AssemblyConfiguration("")]
-[assembly: AssemblyCompany("")]
-[assembly: AssemblyProduct("SamplePlugin")]
-[assembly: AssemblyCopyright("Copyright © 2020")]
-[assembly: AssemblyTrademark("")]
-[assembly: AssemblyCulture("")]
-
-// Setting ComVisible to false makes the types in this assembly not visible
-// to COM components. If you need to access a type in this assembly from
-// COM, set the ComVisible attribute to true on that type.
-[assembly: ComVisible(false)]
-
-// The following GUID is for the ID of the typelib if this project is exposed to COM
-[assembly: Guid("13c812e9-0d42-4b95-8646-40eebf30636f")]
-
-// Version information for an assembly consists of the following four values:
-//
-// Major Version
-// Minor Version
-// Build Number
-// Revision
-//
-// You can specify all the values or you can default the Build and Revision Numbers
-// by using the '*' as shown below:
-// [assembly: AssemblyVersion("1.0.*")]
-[assembly: AssemblyVersion("1.0.0.0")]
-[assembly: AssemblyFileVersion("1.0.0.0")]
diff --git a/SamplePlugin/SamplePlugin.csproj b/SamplePlugin/SamplePlugin.csproj
index f9aaabb..4106336 100644
--- a/SamplePlugin/SamplePlugin.csproj
+++ b/SamplePlugin/SamplePlugin.csproj
@@ -1,64 +1,25 @@
-
-
+
- Debug
- AnyCPU
- {13C812E9-0D42-4B95-8646-40EEBF30636F}
- Library
- Properties
- SamplePlugin
- samplePlugin
- v4.7.2
- 512
- true
+
+
+ 0.0.0.1
+ A sample plugin.
+
+ https://github.com/goatcorp/SamplePlugin
-
- true
- full
- false
- bin\Debug\
- DEBUG;TRACE
- prompt
- 4
+
+
+ net5.0-windows
+ x64
+ enable
+ latest
+ true
+ false
+ false
+ $(AppData)\XIVLauncher\devPlugins\SamplePlugin\
-
- pdbonly
- true
- bin\Release\
- TRACE
- prompt
- 4
-
-
-
- $(AppData)\XIVLauncher\addon\Hooks\dev\Dalamud.dll
- False
-
-
- $(AppData)\XIVLauncher\addon\Hooks\dev\ImGui.NET.dll
- False
-
-
- $(AppData)\XIVLauncher\addon\Hooks\dev\ImGuiScene.dll
- False
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
PreserveNewest
@@ -68,5 +29,41 @@
false
-
-
\ No newline at end of file
+
+
+ $(appdata)\XIVLauncher\addon\Hooks\dev\
+
+
+
+
+
+ $(DalamudLibPath)FFXIVClientStructs.dll
+ false
+
+
+ $(DalamudLibPath)Newtonsoft.Json.dll
+ false
+
+
+ $(DalamudLibPath)Dalamud.dll
+ false
+
+
+ $(DalamudLibPath)ImGui.NET.dll
+ false
+
+
+ $(DalamudLibPath)ImGuiScene.dll
+ false
+
+
+ $(DalamudLibPath)Lumina.dll
+ false
+
+
+ $(DalamudLibPath)Lumina.Excel.dll
+ false
+
+
+
+
diff --git a/UIDev/App.config b/UIDev/App.config
deleted file mode 100644
index 56efbc7..0000000
--- a/UIDev/App.config
+++ /dev/null
@@ -1,6 +0,0 @@
-
-
-
-
-
-
\ No newline at end of file
diff --git a/UIDev/Framework/UIBootstrap.cs b/UIDev/Framework/UIBootstrap.cs
index 6de0014..afa8144 100644
--- a/UIDev/Framework/UIBootstrap.cs
+++ b/UIDev/Framework/UIBootstrap.cs
@@ -1,6 +1,5 @@
using ImGuiNET;
using ImGuiScene;
-using System;
using System.Numerics;
using System.Runtime.InteropServices;
using static SDL2.SDL;
@@ -14,87 +13,78 @@ namespace UIDev
// you can edit this if you want more control over things
// mainly if you want a regular window instead of transparent overlay
// Typically you don't want to change any colors here if you keep the fullscreen overlay
- using (var scene = new SimpleImGuiScene(RendererFactory.RendererBackend.DirectX11, new WindowCreateInfo
+ using var scene = new SimpleImGuiScene(RendererFactory.RendererBackend.DirectX11, new WindowCreateInfo
{
Title = "UI Test",
Fullscreen = true,
TransparentColor = new float[] { 0, 0, 0 },
- }))
+ });
+
+ // the background color of your window - typically don't change this for fullscreen overlays
+ scene.Renderer.ClearColor = new Vector4(0, 0, 0, 0);
+
+ // this just makes the application quit if you hit escape
+ scene.Window.OnSDLEvent += (ref SDL_Event sdlEvent) =>
{
- // the background color of your window - typically don't change this for fullscreen overlays
- scene.Renderer.ClearColor = new Vector4(0, 0, 0, 0);
-
- // this just makes the application quit if you hit escape
- scene.Window.OnSDLEvent += (ref SDL_Event sdlEvent) =>
+ if (sdlEvent.type == SDL_EventType.SDL_KEYDOWN && sdlEvent.key.keysym.scancode == SDL_Scancode.SDL_SCANCODE_ESCAPE)
{
- if (sdlEvent.type == SDL_EventType.SDL_KEYDOWN && sdlEvent.key.keysym.scancode == SDL_Scancode.SDL_SCANCODE_ESCAPE)
- {
- scene.ShouldQuit = true;
- }
- };
+ scene.ShouldQuit = true;
+ }
+ };
- // all of this is taken straight from dalamud
+ // all of this is taken straight from dalamud
- ImFontConfigPtr fontConfig = ImGuiNative.ImFontConfig_ImFontConfig();
- fontConfig.MergeMode = true;
- fontConfig.PixelSnapH = true;
+ ImFontConfigPtr fontConfig = ImGuiNative.ImFontConfig_ImFontConfig();
+ fontConfig.MergeMode = true;
+ fontConfig.PixelSnapH = true;
- var fontPathJp = @"NotoSansCJKjp-Medium.otf";
- ImGui.GetIO().Fonts.AddFontFromFileTTF(fontPathJp, 17.0f, null, ImGui.GetIO().Fonts.GetGlyphRangesJapanese());
+ var fontPathJp = "NotoSansCJKjp-Medium.otf";
+ ImGui.GetIO().Fonts.AddFontFromFileTTF(fontPathJp, 17.0f, null, ImGui.GetIO().Fonts.GetGlyphRangesJapanese());
- var fontPathGame = @"gamesym.ttf";
+ var fontPathGame = "gamesym.ttf";
+ var rangeHandle = GCHandle.Alloc(new ushort[] { 0xE020, 0xE0DB, 0 }, GCHandleType.Pinned);
+ ImGui.GetIO().Fonts.AddFontFromFileTTF(fontPathGame, 17.0f, fontConfig, rangeHandle.AddrOfPinnedObject());
- var rangeHandle = GCHandle.Alloc(new ushort[]
- {
- 0xE020,
- 0xE0DB,
- 0
- }, GCHandleType.Pinned);
+ ImGui.GetIO().Fonts.Build();
+
+ fontConfig.Destroy();
+ rangeHandle.Free();
- ImGui.GetIO().Fonts.AddFontFromFileTTF(fontPathGame, 17.0f, fontConfig, rangeHandle.AddrOfPinnedObject());
+ ImGui.GetStyle().GrabRounding = 3f;
+ ImGui.GetStyle().FrameRounding = 4f;
+ ImGui.GetStyle().WindowRounding = 4f;
+ ImGui.GetStyle().WindowBorderSize = 0f;
+ ImGui.GetStyle().WindowMenuButtonPosition = ImGuiDir.Right;
+ ImGui.GetStyle().ScrollbarSize = 16f;
- ImGui.GetIO().Fonts.Build();
+ ImGui.GetStyle().Colors[(int)ImGuiCol.WindowBg] = new Vector4(0.06f, 0.06f, 0.06f, 0.87f);
+ ImGui.GetStyle().Colors[(int)ImGuiCol.FrameBg] = new Vector4(0.29f, 0.29f, 0.29f, 0.54f);
+ ImGui.GetStyle().Colors[(int)ImGuiCol.FrameBgHovered] = new Vector4(0.54f, 0.54f, 0.54f, 0.40f);
+ ImGui.GetStyle().Colors[(int)ImGuiCol.FrameBgActive] = new Vector4(0.64f, 0.64f, 0.64f, 0.67f);
+ ImGui.GetStyle().Colors[(int)ImGuiCol.TitleBgActive] = new Vector4(0.29f, 0.29f, 0.29f, 1.00f);
+ ImGui.GetStyle().Colors[(int)ImGuiCol.CheckMark] = new Vector4(0.86f, 0.86f, 0.86f, 1.00f);
+ ImGui.GetStyle().Colors[(int)ImGuiCol.SliderGrab] = new Vector4(0.54f, 0.54f, 0.54f, 1.00f);
+ ImGui.GetStyle().Colors[(int)ImGuiCol.SliderGrabActive] = new Vector4(0.67f, 0.67f, 0.67f, 1.00f);
+ ImGui.GetStyle().Colors[(int)ImGuiCol.Button] = new Vector4(0.71f, 0.71f, 0.71f, 0.40f);
+ ImGui.GetStyle().Colors[(int)ImGuiCol.ButtonHovered] = new Vector4(0.47f, 0.47f, 0.47f, 1.00f);
+ ImGui.GetStyle().Colors[(int)ImGuiCol.ButtonActive] = new Vector4(0.74f, 0.74f, 0.74f, 1.00f);
+ ImGui.GetStyle().Colors[(int)ImGuiCol.Header] = new Vector4(0.59f, 0.59f, 0.59f, 0.31f);
+ ImGui.GetStyle().Colors[(int)ImGuiCol.HeaderHovered] = new Vector4(0.50f, 0.50f, 0.50f, 0.80f);
+ ImGui.GetStyle().Colors[(int)ImGuiCol.HeaderActive] = new Vector4(0.60f, 0.60f, 0.60f, 1.00f);
+ ImGui.GetStyle().Colors[(int)ImGuiCol.ResizeGrip] = new Vector4(0.79f, 0.79f, 0.79f, 0.25f);
+ ImGui.GetStyle().Colors[(int)ImGuiCol.ResizeGripHovered] = new Vector4(0.78f, 0.78f, 0.78f, 0.67f);
+ ImGui.GetStyle().Colors[(int)ImGuiCol.ResizeGripActive] = new Vector4(0.88f, 0.88f, 0.88f, 0.95f);
+ ImGui.GetStyle().Colors[(int)ImGuiCol.Tab] = new Vector4(0.23f, 0.23f, 0.23f, 0.86f);
+ ImGui.GetStyle().Colors[(int)ImGuiCol.TabHovered] = new Vector4(0.71f, 0.71f, 0.71f, 0.80f);
+ ImGui.GetStyle().Colors[(int)ImGuiCol.TabActive] = new Vector4(0.36f, 0.36f, 0.36f, 1.00f);
+ // end dalamud copy
- fontConfig.Destroy();
- rangeHandle.Free();
+ pluginUI.Initialize(scene);
+ scene.Run();
- ImGui.GetStyle().GrabRounding = 3f;
- ImGui.GetStyle().FrameRounding = 4f;
- ImGui.GetStyle().WindowRounding = 4f;
- ImGui.GetStyle().WindowBorderSize = 0f;
- ImGui.GetStyle().WindowMenuButtonPosition = ImGuiDir.Right;
- ImGui.GetStyle().ScrollbarSize = 16f;
-
- ImGui.GetStyle().Colors[(int)ImGuiCol.WindowBg] = new Vector4(0.06f, 0.06f, 0.06f, 0.87f);
- ImGui.GetStyle().Colors[(int)ImGuiCol.FrameBg] = new Vector4(0.29f, 0.29f, 0.29f, 0.54f);
- ImGui.GetStyle().Colors[(int)ImGuiCol.FrameBgHovered] = new Vector4(0.54f, 0.54f, 0.54f, 0.40f);
- ImGui.GetStyle().Colors[(int)ImGuiCol.FrameBgActive] = new Vector4(0.64f, 0.64f, 0.64f, 0.67f);
- ImGui.GetStyle().Colors[(int)ImGuiCol.TitleBgActive] = new Vector4(0.29f, 0.29f, 0.29f, 1.00f);
- ImGui.GetStyle().Colors[(int)ImGuiCol.CheckMark] = new Vector4(0.86f, 0.86f, 0.86f, 1.00f);
- ImGui.GetStyle().Colors[(int)ImGuiCol.SliderGrab] = new Vector4(0.54f, 0.54f, 0.54f, 1.00f);
- ImGui.GetStyle().Colors[(int)ImGuiCol.SliderGrabActive] = new Vector4(0.67f, 0.67f, 0.67f, 1.00f);
- ImGui.GetStyle().Colors[(int)ImGuiCol.Button] = new Vector4(0.71f, 0.71f, 0.71f, 0.40f);
- ImGui.GetStyle().Colors[(int)ImGuiCol.ButtonHovered] = new Vector4(0.47f, 0.47f, 0.47f, 1.00f);
- ImGui.GetStyle().Colors[(int)ImGuiCol.ButtonActive] = new Vector4(0.74f, 0.74f, 0.74f, 1.00f);
- ImGui.GetStyle().Colors[(int)ImGuiCol.Header] = new Vector4(0.59f, 0.59f, 0.59f, 0.31f);
- ImGui.GetStyle().Colors[(int)ImGuiCol.HeaderHovered] = new Vector4(0.50f, 0.50f, 0.50f, 0.80f);
- ImGui.GetStyle().Colors[(int)ImGuiCol.HeaderActive] = new Vector4(0.60f, 0.60f, 0.60f, 1.00f);
- ImGui.GetStyle().Colors[(int)ImGuiCol.ResizeGrip] = new Vector4(0.79f, 0.79f, 0.79f, 0.25f);
- ImGui.GetStyle().Colors[(int)ImGuiCol.ResizeGripHovered] = new Vector4(0.78f, 0.78f, 0.78f, 0.67f);
- ImGui.GetStyle().Colors[(int)ImGuiCol.ResizeGripActive] = new Vector4(0.88f, 0.88f, 0.88f, 0.95f);
- ImGui.GetStyle().Colors[(int)ImGuiCol.Tab] = new Vector4(0.23f, 0.23f, 0.23f, 0.86f);
- ImGui.GetStyle().Colors[(int)ImGuiCol.TabHovered] = new Vector4(0.71f, 0.71f, 0.71f, 0.80f);
- ImGui.GetStyle().Colors[(int)ImGuiCol.TabActive] = new Vector4(0.36f, 0.36f, 0.36f, 1.00f);
- // end dalamud copy
-
- pluginUI.Initialize(scene);
-
- scene.Run();
-
- pluginUI.Dispose();
- }
+ pluginUI.Dispose();
}
}
}
diff --git a/UIDev/Properties/AssemblyInfo.cs b/UIDev/Properties/AssemblyInfo.cs
deleted file mode 100644
index b25f720..0000000
--- a/UIDev/Properties/AssemblyInfo.cs
+++ /dev/null
@@ -1,36 +0,0 @@
-using System.Reflection;
-using System.Runtime.CompilerServices;
-using System.Runtime.InteropServices;
-
-// General Information about an assembly is controlled through the following
-// set of attributes. Change these attribute values to modify the information
-// associated with an assembly.
-[assembly: AssemblyTitle("UIDev")]
-[assembly: AssemblyDescription("")]
-[assembly: AssemblyConfiguration("")]
-[assembly: AssemblyCompany("")]
-[assembly: AssemblyProduct("UIDev")]
-[assembly: AssemblyCopyright("Copyright © 2020")]
-[assembly: AssemblyTrademark("")]
-[assembly: AssemblyCulture("")]
-
-// Setting ComVisible to false makes the types in this assembly not visible
-// to COM components. If you need to access a type in this assembly from
-// COM, set the ComVisible attribute to true on that type.
-[assembly: ComVisible(false)]
-
-// The following GUID is for the ID of the typelib if this project is exposed to COM
-[assembly: Guid("4fec9558-eb25-419f-b86e-51b8cfda32b7")]
-
-// Version information for an assembly consists of the following four values:
-//
-// Major Version
-// Minor Version
-// Build Number
-// Revision
-//
-// You can specify all the values or you can default the Build and Revision Numbers
-// by using the '*' as shown below:
-// [assembly: AssemblyVersion("1.0.*")]
-[assembly: AssemblyVersion("1.0.0.0")]
-[assembly: AssemblyFileVersion("1.0.0.0")]
diff --git a/UIDev/UIDev.csproj b/UIDev/UIDev.csproj
index f8605ce..260030e 100644
--- a/UIDev/UIDev.csproj
+++ b/UIDev/UIDev.csproj
@@ -1,85 +1,33 @@
-
-
+
- Debug
- AnyCPU
- {4FEC9558-EB25-419F-B86E-51B8CFDA32B7}
- Exe
- UIDev
- UIDev
- v4.7.2
- 512
- true
- true
- publish\
- true
- Disk
- false
- Foreground
- 7
- Days
- false
- false
- true
- 0
- 1.0.0.%2a
- false
- false
- true
-
-
- AnyCPU
- true
- full
- false
- bin\Debug\
- DEBUG;TRACE
- prompt
- 4
- false
+ net5.0-windows
+ x64
+ enable
+ WinExe
+ latest
true
-
- AnyCPU
- pdbonly
- true
- bin\Release\
- TRACE
- prompt
- 4
- false
- true
+
+
+ $(appdata)\XIVLauncher\addon\Hooks\dev\
+
+
+ $(DalamudLibPath)Newtonsoft.Json.dll
+
- $(AppData)\XIVLauncher\addon\Hooks\dev\ImGui.NET.dll
+ $(DalamudLibPath)ImGui.NET.dll
- $(AppData)\XIVLauncher\addon\Hooks\dev\ImGuiScene.dll
+ $(DalamudLibPath)ImGuiScene.dll
- $(AppData)\XIVLauncher\addon\Hooks\dev\SDL2-CS.dll
+ $(DalamudLibPath)SDL2-CS.dll
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
PreserveNewest
@@ -94,17 +42,4 @@
false
-
-
- False
- Microsoft .NET Framework 4.7.2 %28x86 and x64%29
- true
-
-
- False
- .NET Framework 3.5 SP1
- false
-
-
-
-
\ No newline at end of file
+
diff --git a/UIDev/UITest.cs b/UIDev/UITest.cs
index a42d042..ea5d6db 100644
--- a/UIDev/UITest.cs
+++ b/UIDev/UITest.cs
@@ -1,6 +1,5 @@
using ImGuiNET;
using ImGuiScene;
-using System;
using System.Numerics;
namespace UIDev
@@ -12,8 +11,8 @@ namespace UIDev
UIBootstrap.Inititalize(new UITest());
}
- private TextureWrap goatImage;
- private SimpleImGuiScene scene;
+ private TextureWrap? goatImage;
+ private SimpleImGuiScene? scene;
public void Initialize(SimpleImGuiScene scene)
{
@@ -21,7 +20,7 @@ namespace UIDev
// but it can accomplish the same things, and is really only used for initial setup here
// eg, to load an image resource for use with ImGui
- this.goatImage = scene.LoadImage(@"goat.png");
+ this.goatImage = scene.LoadImage("goat.png");
scene.OnBuildUI += Draw;
@@ -34,7 +33,7 @@ namespace UIDev
public void Dispose()
{
- this.goatImage.Dispose();
+ this.goatImage?.Dispose();
}
// You COULD go all out here and make your UI generic and work on interfaces etc, and then
@@ -48,7 +47,7 @@ namespace UIDev
if (!Visible)
{
- this.scene.ShouldQuit = true;
+ this.scene!.ShouldQuit = true;
}
}
@@ -93,7 +92,7 @@ namespace UIDev
ImGui.Text("Have a goat:");
ImGui.Indent(55);
- ImGui.Image(this.goatImage.ImGuiHandle, new Vector2(this.goatImage.Width, this.goatImage.Height));
+ ImGui.Image(this.goatImage!.ImGuiHandle, new Vector2(this.goatImage.Width, this.goatImage.Height));
ImGui.Unindent(55);
}
ImGui.End();