public static void ReplaceAtlas(global::UIAtlas before, global::UIAtlas after) { global::UISprite[] array = global::NGUITools.FindActive <global::UISprite>(); int i = 0; int num = array.Length; while (i < num) { global::UISprite uisprite = array[i]; if (uisprite.atlas == before) { uisprite.atlas = after; } i++; } global::UILabel[] array2 = global::NGUITools.FindActive <global::UILabel>(); int j = 0; int num2 = array2.Length; while (j < num2) { global::UILabel uilabel = array2[j]; if (uilabel.font != null && uilabel.font.atlas == before) { uilabel.font.atlas = after; } j++; } }
// Token: 0x06004A92 RID: 19090 RVA: 0x00120878 File Offset: 0x0011EA78 public static global::UISprite AddSprite(GameObject go, global::UIAtlas atlas, string spriteName) { global::UIAtlas.Sprite sprite = (!(atlas != null)) ? null : atlas.GetSprite(spriteName); global::UISprite uisprite = (sprite != null && !(sprite.inner == sprite.outer)) ? global::NGUITools.AddWidget <global::UISlicedSprite>(go) : global::NGUITools.AddWidget <global::UISprite>(go); uisprite.atlas = atlas; uisprite.spriteName = spriteName; return(uisprite); }
// Token: 0x06004C0F RID: 19471 RVA: 0x00129890 File Offset: 0x00127A90 public void MarkAsDirty() { global::UISprite[] array = global::NGUITools.FindActive <global::UISprite>(); int i = 0; int num = array.Length; while (i < num) { global::UISprite uisprite = array[i]; if (global::UIAtlas.CheckIfRelated(this, uisprite.atlas)) { global::UIAtlas atlas = uisprite.atlas; uisprite.atlas = null; uisprite.atlas = atlas; } i++; } global::UIFont[] array2 = global::Resources.FindObjectsOfTypeAll(typeof(global::UIFont)) as global::UIFont[]; int j = 0; int num2 = array2.Length; while (j < num2) { global::UIFont uifont = array2[j]; if (global::UIAtlas.CheckIfRelated(this, uifont.atlas)) { global::UIAtlas atlas2 = uifont.atlas; uifont.atlas = null; uifont.atlas = atlas2; } j++; } global::UILabel[] array3 = global::NGUITools.FindActive <global::UILabel>(); int k = 0; int num3 = array3.Length; while (k < num3) { global::UILabel uilabel = array3[k]; if (uilabel.font != null && global::UIAtlas.CheckIfRelated(this, uilabel.font.atlas)) { global::UIFont font = uilabel.font; uilabel.font = null; uilabel.font = font; } k++; } }
static StackObject *set_atlas_2(ILIntepreter __intp, StackObject *__esp, IList <object> __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject *ptr_of_this_method; StackObject *__ret = ILIntepreter.Minus(__esp, 2); ptr_of_this_method = ILIntepreter.Minus(__esp, 1); global::UIAtlas @value = (global::UIAtlas)typeof(global::UIAtlas).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack)); __intp.Free(ptr_of_this_method); ptr_of_this_method = ILIntepreter.Minus(__esp, 2); global::UISprite instance_of_this_method = (global::UISprite)typeof(global::UISprite).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack)); __intp.Free(ptr_of_this_method); instance_of_this_method.atlas = value; return(__ret); }
// Token: 0x06004C0E RID: 19470 RVA: 0x00129844 File Offset: 0x00127A44 public static bool CheckIfRelated(global::UIAtlas a, global::UIAtlas b) { return(!(a == null) && !(b == null) && (a == b || a.References(b) || b.References(a))); }
// Token: 0x06004C0D RID: 19469 RVA: 0x001297F8 File Offset: 0x001279F8 private bool References(global::UIAtlas atlas) { return(!(atlas == null) && (atlas == this || (this.mReplacement != null && this.mReplacement.References(atlas)))); }