correctly construct crosshair texture

This commit is contained in:
in0finite 2020-04-22 22:59:23 +02:00
parent cac960800f
commit 587354248d

View file

@ -84,7 +84,7 @@ namespace SanAndreasUnity.UI {
{
for (int j = 0; j < originalHeight; j++)
{
tex.SetPixel(originalWidth - i + originalWidth, j, originalTex.GetPixel(i, j));
tex.SetPixel(originalWidth - i - 1 + originalWidth, j, originalTex.GetPixel(i, j));
}
}
@ -93,7 +93,7 @@ namespace SanAndreasUnity.UI {
{
for (int j = 0; j < originalHeight; j++)
{
tex.SetPixel(i, originalHeight - j + originalHeight, originalTex.GetPixel(i, j));
tex.SetPixel(i, originalHeight - j - 1 + originalHeight, originalTex.GetPixel(i, j));
}
}
@ -102,7 +102,7 @@ namespace SanAndreasUnity.UI {
{
for (int j = 0; j < originalHeight; j++)
{
tex.SetPixel(originalWidth - i + originalWidth, originalHeight - j + originalHeight, originalTex.GetPixel(i, j));
tex.SetPixel(originalWidth - i - 1 + originalWidth, originalHeight - j - 1 + originalHeight, originalTex.GetPixel(i, j));
}
}