- Timestamp:
- Dec 24, 2015, 1:15:17 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
binary-improvements/MapRendering/Web/Handlers/ItemIconHandler.cs
r253 r254 94 94 if (tintedIcons.ContainsKey (name)) { 95 95 foreach (Color c in tintedIcons [name]) { 96 Texture2D tintedTex = new Texture2D (data.width, data.height, TextureFormat.ARGB32, false); 96 string tintedName = name + "__" + AllocsUtils.ColorToHex (c); 97 if (!icons.ContainsKey (tintedName)) { 98 Texture2D tintedTex = new Texture2D (data.width, data.height, TextureFormat.ARGB32, false); 97 99 98 for (int x = 0; x < data.width; x++) { 99 for (int y = 0; y < data.height; y++) { 100 tintedTex.SetPixel (x, y, tex.GetPixel (x, y) * c); 100 for (int x = 0; x < data.width; x++) { 101 for (int y = 0; y < data.height; y++) { 102 tintedTex.SetPixel (x, y, tex.GetPixel (x, y) * c); 103 } 101 104 } 105 106 icons.Add (tintedName, tintedTex.EncodeToPNG ()); 107 108 UnityEngine.Object.Destroy (tintedTex); 102 109 } 103 104 icons.Add (name + "__" + AllocsUtils.ColorToHex (c), tintedTex.EncodeToPNG ());105 106 UnityEngine.Object.Destroy (tintedTex);107 110 } 108 111 }
Note:
See TracChangeset
for help on using the changeset viewer.