RMB to cancel orders

This commit is contained in:
Chris Forbes
2009-10-06 22:21:15 +13:00
parent 108d799b29
commit 9eb03e3839
3 changed files with 5 additions and 2 deletions

View File

@@ -27,6 +27,9 @@ namespace OpenRa.Game
orderGenerator.Order(game, new int2((int)xy.X, (int)xy.Y)).Apply(game); orderGenerator.Order(game, new int2((int)xy.X, (int)xy.Y)).Apply(game);
// todo: route all orders through netcode // todo: route all orders through netcode
} }
if (mi.Button == MouseButtons.Right && mi.Event == MouseInputEvent.Down)
orderGenerator = null;
} }
} }
} }

View File

@@ -67,7 +67,7 @@ namespace OpenRa.Game
var stuffFromOtherPlayers = network.Tick(); // todo: actually use the orders! var stuffFromOtherPlayers = network.Tick(); // todo: actually use the orders!
world.Update(); world.Update();
viewport.DrawRegions(this); viewport.DrawRegions();
} }
} }
} }

View File

@@ -33,7 +33,7 @@ namespace OpenRa.Game.Graphics
public void AddRegion(Region r) { regions.Add(r); } public void AddRegion(Region r) { regions.Add(r); }
public void DrawRegions(Game game) public void DrawRegions()
{ {
float2 r1 = new float2(2, -2) / Size; float2 r1 = new float2(2, -2) / Size;
float2 r2 = new float2(-1, 1); float2 r2 = new float2(-1, 1);