Use DisplayColor in lobby
This commit is contained in:
@@ -411,10 +411,6 @@ namespace OpenRa
|
|||||||
DrawDialogBackground(paletteRect, "panel");
|
DrawDialogBackground(paletteRect, "panel");
|
||||||
AddButton(paletteRect, CyclePalette);
|
AddButton(paletteRect, CyclePalette);
|
||||||
|
|
||||||
// TODO: Render using the System.Drawing.Color (Player.PlayerColors[client.PaletteIndex].c)
|
|
||||||
shpRenderer.DrawSprite(colorBlock, new float2(paletteRect.Left + 4, paletteRect.Top + 4),
|
|
||||||
Player.PlayerColors[client.PaletteIndex].a);
|
|
||||||
|
|
||||||
var raceRect = new Rectangle(r.Left + 290, y - 2, 65, 22);
|
var raceRect = new Rectangle(r.Left + 290, y - 2, 65, 22);
|
||||||
DrawDialogBackground(raceRect, "panel");
|
DrawDialogBackground(raceRect, "panel");
|
||||||
AddButton(raceRect, CycleRace);
|
AddButton(raceRect, CycleRace);
|
||||||
@@ -427,11 +423,12 @@ namespace OpenRa
|
|||||||
shpRenderer.Flush();
|
shpRenderer.Flush();
|
||||||
|
|
||||||
renderer.DrawText(client.Name, new int2(r.Left + 40, y), Color.White);
|
renderer.DrawText(client.Name, new int2(r.Left + 40, y), Color.White);
|
||||||
|
lineRenderer.FillRect(RectangleF.FromLTRB(paletteRect.Left + Game.viewport.Location.X + 5,
|
||||||
// TODO: Render using Player.PlayerColors[client.PaletteIndex].c
|
paletteRect.Top + Game.viewport.Location.Y + 5,
|
||||||
shpRenderer.DrawSprite(colorBlock, new float2(paletteRect.Left + 4, paletteRect.Top + 4),
|
paletteRect.Right + Game.viewport.Location.X - 5,
|
||||||
Player.PlayerColors[client.PaletteIndex].a);
|
paletteRect.Bottom+Game.viewport.Location.Y - 5),
|
||||||
|
Player.PlayerColors[client.PaletteIndex].c);
|
||||||
|
lineRenderer.Flush();
|
||||||
renderer.DrawText(((Race)client.Race).ToString(), new int2(r.Left + 300, y), Color.White);
|
renderer.DrawText(((Race)client.Race).ToString(), new int2(r.Left + 300, y), Color.White);
|
||||||
renderer.DrawText(client.State.ToString(), new int2(r.Left + 370, y), Color.White);
|
renderer.DrawText(client.State.ToString(), new int2(r.Left + 370, y), Color.White);
|
||||||
y += 30;
|
y += 30;
|
||||||
|
|||||||
@@ -57,5 +57,13 @@ namespace OpenRa.Graphics
|
|||||||
if( ++lines >= linesPerBatch )
|
if( ++lines >= linesPerBatch )
|
||||||
Flush();
|
Flush();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void FillRect( RectangleF r, Color color )
|
||||||
|
{
|
||||||
|
for (float y = r.Top; y < r.Bottom; y++)
|
||||||
|
{
|
||||||
|
DrawLine(new float2(r.Left, y), new float2(r.Right, y), color, color);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user