aboutsummaryrefslogtreecommitdiff
path: root/ShiftOS.WinForms
diff options
context:
space:
mode:
authorMichael <[email protected]>2017-02-04 13:59:31 -0500
committerMichael <[email protected]>2017-02-04 13:59:31 -0500
commit9a9ec274d32b78291c9ca489a0cc7ce45e85907e (patch)
tree89e2c59096a6392813c5bef86ce47e710203f5ef /ShiftOS.WinForms
parent50971ea04e7ad7a7ae9dcbbe911b7b8bcf5dd7d3 (diff)
downloadshiftos_thereturn-9a9ec274d32b78291c9ca489a0cc7ce45e85907e.tar.gz
shiftos_thereturn-9a9ec274d32b78291c9ca489a0cc7ce45e85907e.tar.bz2
shiftos_thereturn-9a9ec274d32b78291c9ca489a0cc7ce45e85907e.zip
Sorta-working custom cursors.
Diffstat (limited to 'ShiftOS.WinForms')
-rw-r--r--ShiftOS.WinForms/Properties/Resources.Designer.cs10
-rw-r--r--ShiftOS.WinForms/Properties/Resources.resx3
-rw-r--r--ShiftOS.WinForms/Resources/DefaultMouse.bmpbin0 -> 3382 bytes
-rw-r--r--ShiftOS.WinForms/ShiftOS.WinForms.csproj1
-rw-r--r--ShiftOS.WinForms/Tools/ControlManager.cs10
5 files changed, 23 insertions, 1 deletions
diff --git a/ShiftOS.WinForms/Properties/Resources.Designer.cs b/ShiftOS.WinForms/Properties/Resources.Designer.cs
index 1d949f8..7fc4cd7 100644
--- a/ShiftOS.WinForms/Properties/Resources.Designer.cs
+++ b/ShiftOS.WinForms/Properties/Resources.Designer.cs
@@ -253,6 +253,16 @@ namespace ShiftOS.WinForms.Properties {
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
+ internal static System.Drawing.Bitmap DefaultMouse {
+ get {
+ object obj = ResourceManager.GetObject("DefaultMouse", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ /// <summary>
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ /// </summary>
internal static System.Drawing.Bitmap fileicon0 {
get {
object obj = ResourceManager.GetObject("fileicon0", resourceCulture);
diff --git a/ShiftOS.WinForms/Properties/Resources.resx b/ShiftOS.WinForms/Properties/Resources.resx
index 72532bb..8efe1d1 100644
--- a/ShiftOS.WinForms/Properties/Resources.resx
+++ b/ShiftOS.WinForms/Properties/Resources.resx
@@ -265,4 +265,7 @@
<data name="ShiftOS" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\ShiftOS.rtf;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
+ <data name="DefaultMouse" type="System.Resources.ResXFileRef, System.Windows.Forms">
+ <value>..\Resources\DefaultMouse.bmp;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
+ </data>
</root> \ No newline at end of file
diff --git a/ShiftOS.WinForms/Resources/DefaultMouse.bmp b/ShiftOS.WinForms/Resources/DefaultMouse.bmp
new file mode 100644
index 0000000..9ae6143
--- /dev/null
+++ b/ShiftOS.WinForms/Resources/DefaultMouse.bmp
Binary files differ
diff --git a/ShiftOS.WinForms/ShiftOS.WinForms.csproj b/ShiftOS.WinForms/ShiftOS.WinForms.csproj
index adfabe9..d86e502 100644
--- a/ShiftOS.WinForms/ShiftOS.WinForms.csproj
+++ b/ShiftOS.WinForms/ShiftOS.WinForms.csproj
@@ -464,6 +464,7 @@
</ItemGroup>
<ItemGroup>
<None Include="Resources\sys_shiftoriumstory.txt" />
+ <None Include="Resources\DefaultMouse.bmp" />
<Content Include="Resources\hello.txt" />
<None Include="Resources\secretlang.txt" />
<None Include="Resources\strings_ver.txt" />
diff --git a/ShiftOS.WinForms/Tools/ControlManager.cs b/ShiftOS.WinForms/Tools/ControlManager.cs
index 78d3534..8eba773 100644
--- a/ShiftOS.WinForms/Tools/ControlManager.cs
+++ b/ShiftOS.WinForms/Tools/ControlManager.cs
@@ -138,8 +138,16 @@ namespace ShiftOS.WinForms.Tools
public static void SetupControl(Control ctrl)
{
-
+ var mouse = SkinEngine.GetImage("mouse");
+ if (mouse == null)
+ mouse = Properties.Resources.DefaultMouse;
+
+ var mBmp = new Bitmap(mouse);
+ var gfx = Graphics.FromImage(mBmp);
+ var handle = mBmp.GetHicon();
+
+ ctrl.Cursor = new Cursor(handle);
if (!(ctrl is MenuStrip) && !(ctrl is ToolStrip) && !(ctrl is StatusStrip) && !(ctrl is ContextMenuStrip))
{
string tag = "";