Fixed DalamudPackager target

This commit is contained in:
r00telement
2021-12-06 23:14:06 +00:00
parent 1ea45342c6
commit c1abfc512a
3 changed files with 24 additions and 13 deletions

View File

@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<Project>
<Target Name="PackagePlugin" AfterTargets="Build">
<DalamudPackager
ProjectDir="$(ProjectDir)"
OutputPath="$(OutputPath)"
AssemblyName="$(AssemblyName)"
MakeZip="true"
Exclude="$(AssemblyName).pdb;$(AssemblyName).deps.json" />
</Target>
</Project>

View File

@@ -74,8 +74,4 @@
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
</ItemGroup>
<Target Name="PackagePlugin" AfterTargets="Build">
<DalamudPackager ProjectDir="$(ProjectDir)" OutputPath="$(OutputPath)" AssemblyName="$(AssemblyName)" MakeZip="true" Exclude="$(AssemblyName).pdb;$(AssemblyName).deps.json" />
</Target>
</Project>

View File

@@ -62,6 +62,8 @@ namespace PlayerTags
private PluginData m_PluginData = new PluginData();
private bool m_OpenConfigClicked = false;
public Plugin()
{
UIColorHelper.Initialize(DataManager);
@@ -116,12 +118,6 @@ namespace PlayerTags
}
}
private void Rehook()
{
Unhook();
Hook();
}
private void ClientState_Login(object? sender, EventArgs e)
{
Hook();
@@ -140,15 +136,23 @@ namespace PlayerTags
private void UiBuilder_Draw()
{
// Don't bother showing the config unless the player is in the world
if (ClientState.LocalPlayer != null)
if (m_PluginConfiguration.IsVisible)
{
m_PluginConfigurationUI.Draw();
// Only allow the config to be shown either when in the world, or when explicitly opened
if (ClientState.LocalPlayer != null || m_OpenConfigClicked)
{
m_PluginConfigurationUI.Draw();
}
}
else
{
m_OpenConfigClicked = false;
}
}
private void UiBuilder_OpenConfigUi()
{
m_OpenConfigClicked = true;
m_PluginConfiguration.IsVisible = true;
}