Merge pull request #5972 from pchote/new-ra-ui

Closes #2394
Closes #2385
Closes #4980
Closes #5108
This commit is contained in:
Matthias Mailänder
2014-07-26 10:22:03 +02:00
80 changed files with 2032 additions and 608 deletions

View File

@@ -30,7 +30,7 @@ namespace OpenRA.Widgets
public override bool HandleMouseInput(MouseInput mi)
{
if (ClickThrough || !Bounds.Contains(mi.Location))
if (ClickThrough || !RenderBounds.Contains(mi.Location))
return false;
if (!Draggable || moving && (!TakeMouseFocus(mi) || mi.Button != MouseButton.Left))

View File

@@ -17,6 +17,7 @@ namespace OpenRA.Widgets
{
public string ImageCollection = "";
public string ImageName = "";
public bool ClickThrough = true;
public Func<string> GetImageName;
public Func<string> GetImageCollection;
@@ -29,6 +30,7 @@ namespace OpenRA.Widgets
protected ImageWidget(ImageWidget other)
: base(other)
{
ClickThrough = other.ClickThrough;
ImageName = other.ImageName;
GetImageName = other.GetImageName;
ImageCollection = other.ImageCollection;
@@ -48,5 +50,10 @@ namespace OpenRA.Widgets
WidgetUtils.DrawRGBA(sprite, RenderOrigin);
}
public override bool HandleMouseInput(MouseInput mi)
{
return !ClickThrough && RenderBounds.Contains(mi.Location);
}
}
}

View File

@@ -162,6 +162,7 @@ namespace OpenRA.Widgets
IsVisible = widget.IsVisible;
IgnoreChildMouseOver = widget.IgnoreChildMouseOver;
IgnoreMouseOver = widget.IgnoreMouseOver;
foreach (var child in widget.Children)
AddChild(child.Clone());