private static ColorDuo GetColorDuo(ref ColorDuo cd, string c1, string c2) { if (cd == null) { cd = new ColorDuo(RuntimeHelper.HexToColor(c1), RuntimeHelper.HexToColor(c2)); } return(cd); }
private static StyleDuo GetStyleDuo(ref StyleDuo style, ColorDuo cd) { // it seems that re-creating the textures if they've been destroyed will still cause some strange leaks // so I just re-create the whole style if the textures are destroyed if (style == null || style.TexturesHaveBeenDestroyed) { style = new StyleDuo(cd); } return(style); }
private static StyleDuo GetStyleDuo(ref StyleDuo style, ColorDuo cd) { // it seems that re-creating the textures if they've been destroyed will still cause some strange leaks // so I just re-create the whole style if the textures are destroyed if (style == null || style.TexturesHaveBeenDestroyed) style = new StyleDuo(cd); return style; }
private static ColorDuo GetColorDuo(ref ColorDuo cd, string c1, string c2) { if (cd == null) cd = new ColorDuo(RuntimeHelper.HexToColor(c1), RuntimeHelper.HexToColor(c2)); return cd; }