unfail slightly player color handling
This commit is contained in:
@@ -70,7 +70,7 @@ namespace OpenRA.Widgets.Delegates
|
||||
color.OnMouseUp = CyclePalette;
|
||||
|
||||
var colorBlock = color.GetWidget<ColorBlockWidget>("COLORBLOCK");
|
||||
colorBlock.GetColor = () => Player.PlayerColors(Game.world)[c.PaletteIndex % Player.PlayerColors(Game.world).Count].c;
|
||||
colorBlock.GetColor = () => Player.PlayerColors(Game.world)[c.PaletteIndex % Player.PlayerColors(Game.world).Count].Color;
|
||||
|
||||
var faction = template.GetWidget<ButtonWidget>("FACTION");
|
||||
faction.OnMouseUp = CycleRace;
|
||||
@@ -91,7 +91,7 @@ namespace OpenRA.Widgets.Delegates
|
||||
else
|
||||
{
|
||||
var color = template.GetWidget<ColorBlockWidget>("COLOR");
|
||||
color.GetColor = () => Player.PlayerColors(Game.world)[c.PaletteIndex % Player.PlayerColors(Game.world).Count].c;
|
||||
color.GetColor = () => Player.PlayerColors(Game.world)[c.PaletteIndex % Player.PlayerColors(Game.world).Count].Color;
|
||||
|
||||
var faction = template.GetWidget<LabelWidget>("FACTION");
|
||||
faction.GetText = () => c.Country;
|
||||
|
||||
@@ -78,7 +78,7 @@ namespace OpenRA.Widgets
|
||||
Game.chrome.lineRenderer.FillRect(new RectangleF(
|
||||
Game.viewport.Location.X + pos.X + 2,
|
||||
Game.viewport.Location.Y + pos.Y + 2,
|
||||
12, 12), playerColors[p.Second.PaletteIndex % playerColors.Count()].c);
|
||||
12, 12), playerColors[p.Second.PaletteIndex % playerColors.Count()].Color);
|
||||
|
||||
Game.chrome.renderer.RgbaSpriteRenderer.DrawSprite(
|
||||
ChromeProvider.GetImage(Game.chrome.renderer, "spawnpoints", "owned"), pos, "chrome");
|
||||
|
||||
Reference in New Issue
Block a user