changeset 41:3fddcf72ea6a

Merge USBLib fixes for USBIO driver
author Ivo Smits <Ivo@UCIS.nl>
date Thu, 25 Apr 2013 23:40:55 +0200
parents e3329f686b95 (diff) a9c4fed19e99 (current diff)
children aedd0e4adef7
files
diffstat 3 files changed, 9 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/FBGUI/FBGUI.cs	Thu Apr 25 23:31:52 2013 +0200
+++ b/FBGUI/FBGUI.cs	Thu Apr 25 23:40:55 2013 +0200
@@ -627,6 +627,7 @@
 		public static readonly FBGCursor SizeTopRight = SizeTopLeft.RotateFlip(RotateFlipType.RotateNoneFlipX);
 		public static readonly FBGCursor SizeBottomLeft = SizeTopLeft.RotateFlip(RotateFlipType.RotateNoneFlipY);
 		public static readonly FBGCursor SizeBottomRight = SizeTopLeft.RotateFlip(RotateFlipType.RotateNoneFlipXY);
+		public static readonly FBGCursor Hand = LoadFromResource("cursor_hand", 5, 0);
 		public static FBGCursor ArrowCursor { get { return Arrow; } }
 	}
 	public class FBGRenderer : FBGContainerControl, IDisposable {
@@ -872,11 +873,10 @@
 			}
 		}
 		protected override void HandlePointingEvent(FBGPointingEvent e) {
-			e.Cursor = Cursor;
+			if (Cursor != null) e.Cursor = Cursor;
 			if (HandlePointingEventA(e)) base.HandlePointingEvent(e);
 		}
 		Boolean HandlePointingEventA(FBGPointingEvent e) {
-			e.Cursor = Cursor;
 			switch (e.Type) {
 				case FBGPointingEventType.Move: return MouseMove(e.Position, e.Buttons, e);
 				case FBGPointingEventType.ButtonDown: return MouseDown(e.Position, e.Buttons, e);
@@ -898,8 +898,10 @@
 			}
 		}
 		Boolean MouseMove(Point position, MouseButtons buttons, FBGPointingEvent e) {
-			SetCursorForNonClientOperation(moveresize == 0 ? GetNonClientOperation(position) : moveresize, e);
-			if (moveresize == 0) return true;
+			NonClientOps mr = moveresize;
+			if (mr == 0) mr = GetNonClientOperation(position);
+			if (mr == 0) return true;
+			SetCursorForNonClientOperation(mr, e);
 			if ((moveresize & NonClientOps.MoveResize) != 0) {
 				Rectangle b = Bounds;
 				int dx = position.X - prevPosition.X;
Binary file FBGUI/cursor_hand.png has changed
--- a/UCIS.Core.csproj	Thu Apr 25 23:31:52 2013 +0200
+++ b/UCIS.Core.csproj	Thu Apr 25 23:40:55 2013 +0200
@@ -187,6 +187,9 @@
     <EmbeddedResource Include="FBGUI\cursor_left.png" />
     <EmbeddedResource Include="FBGUI\cursor_arrow.png" />
   </ItemGroup>
+  <ItemGroup>
+    <EmbeddedResource Include="FBGUI\cursor_hand.png" />
+  </ItemGroup>
   <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
   <!-- To modify your build process, add your task inside one of the targets below and uncomment it. 
        Other similar extension points exist, see Microsoft.Common.targets.