Skip to content

Commit

Permalink
Updated Rampastring.XNAUI, the client now uses the hardware cursor ra…
Browse files Browse the repository at this point in the history
…ther than a sprite cursor when possible, dealing with cursor image output lag
  • Loading branch information
Rampastring committed Dec 20, 2016
1 parent 8a6bbb9 commit a1dc10f
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 2 deletions.
9 changes: 9 additions & 0 deletions DXMainClient/DXGUI/GameClass.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
using Microsoft.Xna.Framework.Graphics;
using Rampastring.XNAUI;
using System;
using System.IO;
using System.Security.Principal;
using System.Windows.Forms;

Expand All @@ -31,6 +32,9 @@ protected override void Initialize()
{
base.Initialize();

string primaryNativeCursorPath = ProgramConstants.GetResourcePath() + "cursor.cur";
string alternativeNativeCursorPath = ProgramConstants.GetBaseResourcePath() + "cursor.cur";

AssetLoader.Initialize(GraphicsDevice, content);
AssetLoader.AssetSearchPaths.Add(ProgramConstants.GetResourcePath());
AssetLoader.AssetSearchPaths.Add(ProgramConstants.GetBaseResourcePath());
Expand Down Expand Up @@ -76,6 +80,11 @@ protected override void Initialize()
AssetLoader.LoadTexture("waitCursor.png")
};

if (File.Exists(primaryNativeCursorPath))
wm.Cursor.LoadNativeCursor(primaryNativeCursorPath);
else if (File.Exists(alternativeNativeCursorPath))
wm.Cursor.LoadNativeCursor(alternativeNativeCursorPath);

Components.Add(wm);

string playerName = UserINISettings.Instance.PlayerName.Value.Trim();
Expand Down
4 changes: 2 additions & 2 deletions DXMainClient/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,5 +31,5 @@
// 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("2.0.3.1")]
[assembly: AssemblyFileVersion("2.0.3.1")]
[assembly: AssemblyVersion("2.0.3.2")]
[assembly: AssemblyFileVersion("2.0.3.2")]
Binary file modified References/Windows/Rampastring.XNAUI.dll
Binary file not shown.
Binary file modified References/WindowsGL/Rampastring.XNAUI.dll
Binary file not shown.
Binary file modified References/XNA/Rampastring.XNAUI.dll
Binary file not shown.

0 comments on commit a1dc10f

Please sign in to comment.