Merge pull request #2818 from Mailaender/diplomacy-renovation

Bring the Diplomacy menu back to life...
This commit is contained in:
Chris Forbes
2013-03-24 01:07:20 -07:00
8 changed files with 48 additions and 7 deletions

View File

@@ -82,7 +82,7 @@ namespace OpenRA.Network
public string[] Mods = { "ra" }; // mod names
public int OrderLatency = 3;
public int RandomSeed = 0;
public bool LockTeams = true; // don't allow team changes after game start.
public bool FragileAlliances = false; // Allow diplomatic stance changes after game start.
public bool AllowCheats = false;
public bool Dedicated;
public string Difficulty;

View File

@@ -163,7 +163,7 @@ namespace OpenRA.Network
case "SetStance":
{
if (Game.orderManager.LobbyInfo.GlobalSettings.LockTeams)
if (!Game.orderManager.LobbyInfo.GlobalSettings.FragileAlliances)
return;
var targetPlayer = order.Player.World.Players.FirstOrDefault(p => p.InternalName == order.TargetString);

View File

@@ -56,7 +56,8 @@ namespace OpenRA.Widgets
var textSize = font.Measure(Text);
font.DrawText(Text,
new float2(rect.Left + rect.Height * 1.5f, RenderOrigin.Y - BaseLine + (Bounds.Height - textSize.Y)/2), Color.White);
new float2(rect.Left + rect.Height * 1.5f, RenderOrigin.Y - BaseLine + (Bounds.Height - textSize.Y)/2),
disabled ? Color.Gray : Color.White);
if (IsChecked() || (Depressed && HasPressedState && !disabled))
{