Support nested scissor rectangles.

This commit is contained in:
Paul Chote
2013-10-23 18:40:04 +13:00
parent b31daf23ca
commit 94554d7678
8 changed files with 28 additions and 12 deletions

View File

@@ -216,8 +216,8 @@ namespace OpenRA.Widgets
if (HasKeyboardFocus)
textPos += new int2(Bounds.Width - LeftMargin - RightMargin - textSize.X, 0);
Game.Renderer.EnableScissor(pos.X + LeftMargin, pos.Y,
Bounds.Width - LeftMargin - RightMargin, Bounds.Bottom);
Game.Renderer.EnableScissor(new Rectangle(pos.X + LeftMargin, pos.Y,
Bounds.Width - LeftMargin - RightMargin, Bounds.Bottom));
}
var color = disabled ? DisabledColor : TextColor;