Wrap pips when there are too many, with included render bug.
This commit is contained in:
@@ -190,10 +190,18 @@ namespace OpenRa.Game.Graphics
|
|||||||
pipImages.PlayRepeating(pipStrings[(int)pip]);
|
pipImages.PlayRepeating(pipStrings[(int)pip]);
|
||||||
spriteRenderer.DrawSprite(pipImages.Image, pipxyBase + pipxyOffset, 0);
|
spriteRenderer.DrawSprite(pipImages.Image, pipxyBase + pipxyOffset, 0);
|
||||||
pipxyOffset += new float2(4, 0);
|
pipxyOffset += new float2(4, 0);
|
||||||
|
|
||||||
|
if (pipxyOffset.X+5 > selectedUnit.SelectedSize.X)
|
||||||
|
{
|
||||||
|
//spriteRenderer.Flush();
|
||||||
|
pipxyOffset.X = 0;
|
||||||
|
pipxyOffset.Y -= 4;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
// Increment row
|
// Increment row
|
||||||
pipxyOffset.X = 0;
|
pipxyOffset.X = 0;
|
||||||
pipxyOffset.Y -= 5;
|
pipxyOffset.Y -= 5;
|
||||||
|
//spriteRenderer.Flush();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -57,7 +57,7 @@ namespace OpenRa.Game.Traits
|
|||||||
|
|
||||||
public IEnumerable<PipType> GetPips()
|
public IEnumerable<PipType> GetPips()
|
||||||
{
|
{
|
||||||
const int numPips = 7;
|
const int numPips = 20;
|
||||||
for (int i = 0; i < numPips; i++)
|
for (int i = 0; i < numPips; i++)
|
||||||
{
|
{
|
||||||
if (gemsCarried * 1.0f / Rules.General.BailCount > i * 1.0f / numPips)
|
if (gemsCarried * 1.0f / Rules.General.BailCount > i * 1.0f / numPips)
|
||||||
|
|||||||
Reference in New Issue
Block a user