Mercurial > hg > ucis.core
comparison FBGUI/FBGUI.cs @ 42:aedd0e4adef7
FBGUI: Small cleanup
author | Ivo Smits <Ivo@UCIS.nl> |
---|---|
date | Wed, 01 May 2013 23:44:43 +0200 |
parents | e3329f686b95 |
children | 82290dc1403c |
comparison
equal
deleted
inserted
replaced
41:3fddcf72ea6a | 42:aedd0e4adef7 |
---|---|
754 } | 754 } |
755 } | 755 } |
756 public virtual new void Paint(Graphics g) { | 756 public virtual new void Paint(Graphics g) { |
757 HandleEvent(new FBGPaintEvent(g)); | 757 HandleEvent(new FBGPaintEvent(g)); |
758 if (cursor != null) { | 758 if (cursor != null) { |
759 Point r = CursorPosition; | 759 Rectangle r = cursor.Area; |
760 r.Offset(-cursor.Hotspot.X, -cursor.Hotspot.Y); | 760 r.Offset(cursorposition); |
761 g.DrawImage(cursor.Image, new Rectangle(r, cursor.Size)); | 761 g.DrawImage(cursor.Image, r); |
762 } | 762 } |
763 } | 763 } |
764 protected override void HandlePointingCaptureMessage(IFBGControl sender, FBGPointingCaptureMessage e) { | 764 protected override void HandlePointingCaptureMessage(IFBGControl sender, FBGPointingCaptureMessage e) { |
765 if (e.Capture && !(ReferenceEquals(mouseCaptureControl, null) || ReferenceEquals(mouseCaptureControl, sender))) e.Capture = false; | 765 if (e.Capture && !(ReferenceEquals(mouseCaptureControl, null) || ReferenceEquals(mouseCaptureControl, sender))) e.Capture = false; |
766 else if (!e.Capture && !ReferenceEquals(mouseCaptureControl, sender)) e.Capture = false; | 766 else if (!e.Capture && !ReferenceEquals(mouseCaptureControl, sender)) e.Capture = false; |