internal static Material GetMaterial(GUIMaterial matDef) { if (!MaterialCache.ContainsKey(matDef.ID)) { Material mat = new Material(); mat.DefaultDiffuseFormat = TextureInfo.TextureFormats.Sprite; mat.DiffuseColor = matDef.Color; mat.DiffuseName = matDef.Texture; MaterialCache.Add(matDef.ID, mat); } return(MaterialCache[matDef.ID]); }
protected SingleDrawGUIItem(RelativeRect rect, Color color, string textureName) : base(rect) { DefaultMaterial = new GUIMaterial(textureName, color); }