mirror of
https://github.com/goatcorp/Dalamud.git
synced 2025-12-12 18:27:23 +01:00
fix: update lumina, flash window
This commit is contained in:
parent
877b95eca6
commit
bef5a35fd9
6 changed files with 85 additions and 10 deletions
|
|
@ -14,10 +14,10 @@
|
|||
</PropertyGroup>
|
||||
<PropertyGroup Label="Feature">
|
||||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
||||
<AssemblyVersion>4.7.7.0</AssemblyVersion>
|
||||
<FileVersion>4.7.7.0</FileVersion>
|
||||
<AssemblyVersion>4.7.8.0</AssemblyVersion>
|
||||
<FileVersion>4.7.8.0</FileVersion>
|
||||
<Description>XIVLauncher addon injection</Description>
|
||||
<Version>4.7.7.0</Version>
|
||||
<Version>4.7.8.0</Version>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
|
||||
<DocumentationFile></DocumentationFile>
|
||||
|
|
|
|||
|
|
@ -202,6 +202,7 @@ namespace Dalamud {
|
|||
}
|
||||
ImGui.Separator();
|
||||
ImGui.MenuItem(this.assemblyVersion, false);
|
||||
ImGui.MenuItem(this.StartInfo.GameVersion, false);
|
||||
|
||||
ImGui.EndMenu();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -14,9 +14,9 @@
|
|||
</PropertyGroup>
|
||||
<PropertyGroup Label="Feature">
|
||||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
||||
<AssemblyVersion>4.7.7.0</AssemblyVersion>
|
||||
<Version>4.7.7.0</Version>
|
||||
<FileVersion>4.7.7.0</FileVersion>
|
||||
<AssemblyVersion>4.7.8.0</AssemblyVersion>
|
||||
<Version>4.7.8.0</Version>
|
||||
<FileVersion>4.7.8.0</FileVersion>
|
||||
</PropertyGroup>
|
||||
<ItemGroup Label="Resources">
|
||||
<None Include="$(SolutionDir)/Resources/**/*" CopyToOutputDirectory="PreserveNewest" Visible="false" />
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ using Lumina.Excel;
|
|||
|
||||
namespace Dalamud.Data.TransientSheet
|
||||
{
|
||||
[SheetName("ContentFinderCondition")]
|
||||
[Sheet("ContentFinderCondition")]
|
||||
public class ContentFinderCondition : IExcelRow
|
||||
{
|
||||
// column defs from Thu, 13 Feb 2020 20:46:12 GMT
|
||||
|
|
@ -595,7 +595,7 @@ namespace Dalamud.Data.TransientSheet
|
|||
public int RowId { get; set; }
|
||||
public int SubRowId { get; set; }
|
||||
|
||||
public void PopulateData(RowParser parser)
|
||||
public void PopulateData(RowParser parser, Lumina.Lumina lumina)
|
||||
{
|
||||
RowId = parser.Row;
|
||||
SubRowId = parser.SubRow;
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System.Linq;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Threading.Tasks;
|
||||
|
|
@ -64,11 +65,19 @@ namespace Dalamud.Game.Network {
|
|||
contentFinderCondition.Image = 112324;
|
||||
}
|
||||
|
||||
var flashInfo = new NativeFunctions.FLASHWINFO();
|
||||
flashInfo.cbSize = (uint) Marshal.SizeOf<NativeFunctions.FLASHWINFO>();
|
||||
flashInfo.uCount = uint.MaxValue;
|
||||
flashInfo.dwTimeout = 0;
|
||||
flashInfo.dwFlags = NativeFunctions.FlashWindow.FLASHW_ALL |
|
||||
NativeFunctions.FlashWindow.FLASHW_TIMERNOFG;
|
||||
flashInfo.hwnd = Process.GetCurrentProcess().MainWindowHandle;
|
||||
NativeFunctions.FlashWindowEx(ref flashInfo);
|
||||
|
||||
Task.Run(async () => {
|
||||
this.dalamud.Framework.Gui.Chat.Print($"Duty pop: " + contentFinderCondition.Name);
|
||||
this.dalamud.Framework.Gui.Chat.Print("Duty pop: " + contentFinderCondition.Name);
|
||||
|
||||
await this.ProcessCfPop?.Invoke(contentFinderCondition);
|
||||
|
||||
});
|
||||
|
||||
return;
|
||||
|
|
|
|||
65
Dalamud/NativeFunctions.cs
Normal file
65
Dalamud/NativeFunctions.cs
Normal file
|
|
@ -0,0 +1,65 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Dalamud
|
||||
{
|
||||
static class NativeFunctions
|
||||
{
|
||||
#region Enums and Structs
|
||||
|
||||
[StructLayout(LayoutKind.Sequential)]
|
||||
public struct FLASHWINFO
|
||||
{
|
||||
public UInt32 cbSize;
|
||||
public IntPtr hwnd;
|
||||
public FlashWindow dwFlags;
|
||||
public UInt32 uCount;
|
||||
public UInt32 dwTimeout;
|
||||
}
|
||||
|
||||
public enum FlashWindow : uint
|
||||
{
|
||||
/// <summary>
|
||||
/// Stop flashing. The system restores the window to its original state.
|
||||
/// </summary>
|
||||
FLASHW_STOP = 0,
|
||||
|
||||
/// <summary>
|
||||
/// Flash the window caption
|
||||
/// </summary>
|
||||
FLASHW_CAPTION = 1,
|
||||
|
||||
/// <summary>
|
||||
/// Flash the taskbar button.
|
||||
/// </summary>
|
||||
FLASHW_TRAY = 2,
|
||||
|
||||
/// <summary>
|
||||
/// Flash both the window caption and taskbar button.
|
||||
/// This is equivalent to setting the FLASHW_CAPTION | FLASHW_TRAY flags.
|
||||
/// </summary>
|
||||
FLASHW_ALL = 3,
|
||||
|
||||
/// <summary>
|
||||
/// Flash continuously, until the FLASHW_STOP flag is set.
|
||||
/// </summary>
|
||||
FLASHW_TIMER = 4,
|
||||
|
||||
/// <summary>
|
||||
/// Flash continuously until the window comes to the foreground.
|
||||
/// </summary>
|
||||
FLASHW_TIMERNOFG = 12
|
||||
}
|
||||
|
||||
|
||||
#endregion
|
||||
|
||||
[DllImport("user32.dll")]
|
||||
[return: MarshalAs(UnmanagedType.Bool)]
|
||||
public static extern bool FlashWindowEx(ref FLASHWINFO pwfi);
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue