复活优化

This commit is contained in:
xiekaidong 2023-09-20 11:16:41 +08:00
parent eeede315a6
commit 8a961ae07b
4 changed files with 16 additions and 1 deletions

View File

@ -531,7 +531,22 @@ namespace BFEditor
int row = posId / 10; int row = posId / 10;
int col = posId % 10; int col = posId % 10;
img = imgDict[icon]; img = imgDict[icon];
GUI.DrawTexture(new Rect(startOffset + (col - 1) * textureWidth, startOffset + (row - 1) * textureWidth, 92, 32), img); if (dir == 1)
{
GUI.DrawTexture(new Rect(startOffset + (col - 1) * textureWidth, startOffset + (row - 1) * textureWidth - 16, 92, 32), img);
}
else if (dir == 2)
{
GUI.DrawTexture(new Rect(startOffset + (col - 1) * textureWidth, startOffset + (row - 1) * textureWidth - 16 + textureWidth, 92, 32), img);
}
else if (dir == 3)
{
GUI.DrawTexture(new Rect(startOffset + (col - 1) * textureWidth - 16, startOffset + (row - 1) * textureWidth - 16, 32, 92), img);
}
else if (dir == 4)
{
GUI.DrawTexture(new Rect(startOffset + (col - 1) * textureWidth - 16 + textureWidth, startOffset + (row - 1) * textureWidth - 16, 32, 92), img);
}
} }
} }
} }