Listbox content shouldn't steal clicks if they're clipped

This commit is contained in:
Paul Chote
2010-08-15 00:42:39 +12:00
parent 1f54ad3238
commit 727a88d82a
2 changed files with 7 additions and 2 deletions

View File

@@ -84,6 +84,11 @@ namespace OpenRA.Widgets
public override int2 ChildOrigin { get { return RenderOrigin + new int2(0, (int)ListOffset); } }
public override Rectangle GetEventBounds()
{
return EventBounds;
}
public override void Tick (World world)
{
if (UpPressed && ListOffset <= 0) ListOffset += ScrollVelocity;

View File

@@ -149,7 +149,7 @@ namespace OpenRA.Widgets
}
public virtual Rectangle EventBounds { get { return RenderBounds; } }
public Rectangle GetEventBounds()
public virtual Rectangle GetEventBounds()
{
return Children
.Where(c => c.IsVisible())