move Game.world onto OrderManager. use call IssueOrder on world and/or on orderManager, not on Game
This commit is contained in:
@@ -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 = "";
|
||||
|
||||
Reference in New Issue
Block a user