git-svn-id: svn://svn.ijw.co.nz/svn/OpenRa@1237 993157c7-ee19-0410-b2c4-bb4e9862e678
This commit is contained in:
@@ -2,6 +2,7 @@ using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using System.Drawing;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace OpenRa.Game
|
||||
{
|
||||
@@ -9,9 +10,9 @@ namespace OpenRa.Game
|
||||
{
|
||||
Point location;
|
||||
Size size;
|
||||
Renderable drawFunction;
|
||||
MethodInvoker drawFunction;
|
||||
|
||||
public Region(Point location, Size size, Renderable drawFunction)
|
||||
public Region(Point location, Size size, MethodInvoker drawFunction)
|
||||
{
|
||||
this.location = location;
|
||||
this.size = size;
|
||||
@@ -21,7 +22,7 @@ namespace OpenRa.Game
|
||||
public void Draw(Renderer renderer, Viewport viewport)
|
||||
{
|
||||
renderer.Device.EnableScissor(location.X, location.Y, size.Width, size.Height);
|
||||
drawFunction(renderer, viewport);
|
||||
drawFunction();
|
||||
renderer.Device.DisableScissor();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user