move Game.world onto OrderManager. use call IssueOrder on world and/or on orderManager, not on Game

This commit is contained in:
Bob
2010-10-12 17:19:09 +13:00
parent 34fc207a6c
commit 20276291ce
19 changed files with 116 additions and 121 deletions

View File

@@ -10,6 +10,7 @@
using System.Drawing;
using OpenRA.Graphics;
using OpenRA.Network;
namespace OpenRA.Widgets
{
@@ -25,6 +26,13 @@ namespace OpenRA.Widgets
bool composing = false;
bool teamChat = false;
readonly OrderManager orderManager;
[ObjectCreator.UseCtor]
internal ChatEntryWidget( [ObjectCreator.Param] OrderManager orderManager )
{
this.orderManager = orderManager;
}
public override void DrawInner( WorldRenderer wr )
{
if (composing)
@@ -61,7 +69,7 @@ namespace OpenRA.Widgets
composing = false;
if (content != "")
Game.IssueOrder(teamChat
orderManager.IssueOrder(teamChat
? Order.TeamChat(content)
: Order.Chat(content));
content = "";