Split keyboard and mouse focus.

Fixes #3304.
Fixes #2075.
Fixes C&C chat focus bug.
This commit is contained in:
Paul Chote
2013-07-27 20:38:05 +12:00
parent ea36d05fc5
commit 7c91d6976d
16 changed files with 93 additions and 87 deletions

View File

@@ -33,7 +33,7 @@ namespace OpenRA.Widgets
if (ClickThrough || !Bounds.Contains(mi.Location))
return false;
if (!Draggable || moving && (!TakeFocus(mi) || mi.Button != MouseButton.Left))
if (!Draggable || moving && (!TakeMouseFocus(mi) || mi.Button != MouseButton.Left))
return true;
if (prevMouseLocation == null)
@@ -44,7 +44,7 @@ namespace OpenRA.Widgets
{
case MouseInputEvent.Up:
moving = false;
LoseFocus(mi);
YieldMouseFocus(mi);
break;
case MouseInputEvent.Down:
moving = true;