pass WorldRenderer to Widget.Draw, DrawInner

This commit is contained in:
Bob
2010-10-12 01:29:07 +13:00
parent 597dba8584
commit 6ea2a06e4b
33 changed files with 159 additions and 137 deletions

View File

@@ -100,7 +100,7 @@ namespace OpenRA.Graphics
renderer.BeginFrame(scrollPosition);
wr.Draw();
Widget.DoDraw();
Widget.DoDraw( wr );
var cursorName = Widget.RootWidget.GetCursorOuter(Viewport.LastMousePos) ?? "default";
var c = new Cursor(cursorName);
@@ -109,16 +109,9 @@ namespace OpenRA.Graphics
renderer.EndFrame();
}
public void RefreshPalette()
{
Game.worldRenderer.palette.Update(
Game.world.WorldActor.TraitsImplementing<IPaletteModifier>());
}
public void Tick()
{
cursorFrame += 0.5f;
RefreshPalette();
}
public float2 ViewToWorld(int2 loc)