Esempio n. 1
0
        private static void DrawTerrainTileNames(int topX, int topY, Graphics gfx, TerrainLayer t, Font f, int scale, byte transparency)
        {
            var pen = transparency != byte.MaxValue ? new SolidBrush(Color.FromArgb(transparency, Color.Black)) : Tile;

            for (int y = 0; y < 16; y++)
            {
                var yi = y + topY;
                int cy = (y * scale) + (scale / 2);
                for (int x = 0; x < 16; x++)
                {
                    var xi   = x + topX;
                    var tile = t.GetTile(xi, yi);

                    int cx   = (x * scale) + (scale / 2);
                    var name = TerrainTileColor.GetTileName(tile);
                    gfx.DrawString(name, f, pen, new PointF(cx, cy), BuildingTextFormat);
                }
            }
        }