mirror of
https://git.alee14.me/shiftos-archive/ShiftOS_TheReturn.git
synced 2025-01-22 18:02:16 +00:00
Sorta-working custom cursors.
This commit is contained in:
parent
50971ea04e
commit
9a9ec274d3
6 changed files with 31 additions and 1 deletions
10
ShiftOS.WinForms/Properties/Resources.Designer.cs
generated
10
ShiftOS.WinForms/Properties/Resources.Designer.cs
generated
|
@ -250,6 +250,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>
|
||||
|
|
|
@ -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>
|
BIN
ShiftOS.WinForms/Resources/DefaultMouse.bmp
Normal file
BIN
ShiftOS.WinForms/Resources/DefaultMouse.bmp
Normal file
Binary file not shown.
After Width: | Height: | Size: 3.3 KiB |
|
@ -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" />
|
||||
|
|
|
@ -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 = "";
|
||||
|
|
|
@ -152,6 +152,14 @@ namespace ShiftOS.Engine {
|
|||
[ShifterName("System Font")]
|
||||
[ShifterDescription("The font style used by the system.")]
|
||||
public Font MainFont = SysFont;
|
||||
|
||||
[Image("mouse")]
|
||||
[ShifterMeta("System")]
|
||||
[ShifterCategory("General")]
|
||||
[ShifterName("Mouse image")]
|
||||
[ShifterDescription("Select an image to be displayed as the system mouse cursor.")]
|
||||
[RequiresUpgrade("skinning")]
|
||||
public byte[] MouseCursorImage = null;
|
||||
|
||||
[ShifterEnumMask(new[] { "Right", "Left"})]
|
||||
[ShifterMeta("Windows")]
|
||||
|
|
Loading…
Reference in a new issue