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

@@ -124,8 +124,8 @@ namespace OpenRA.Widgets
// Scissor when the text overflows
if (textSize.X > Bounds.Width - LeftMargin - RightMargin)
{
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;