static public int destroy_s(IntPtr l) { try { #if DEBUG var method = System.Reflection.MethodBase.GetCurrentMethod(); string methodName = GetMethodName(method); #if UNITY_5_5_OR_NEWER UnityEngine.Profiling.Profiler.BeginSample(methodName); #else Profiler.BeginSample(methodName); #endif #endif System.Int32 a1; checkType(l, 1, out a1); LTGUI.destroy(a1); pushValue(l, true); return(1); } catch (Exception e) { return(error(l, e)); } #if DEBUG finally { #if UNITY_5_5_OR_NEWER UnityEngine.Profiling.Profiler.EndSample(); #else Profiler.EndSample(); #endif } #endif }
static public int destroy_s(IntPtr l) { try { System.Int32 a1; checkType(l, 1, out a1); LTGUI.destroy(a1); pushValue(l, true); return(1); } catch (Exception e) { return(error(l, e)); } }
public static LTRect element(LTRect rect, int depth) { LTGUI.isGUIEnabled = true; LTGUI.init(); int num = depth * LTGUI.RECTS_PER_LEVEL + LTGUI.RECTS_PER_LEVEL; int num2 = 0; if (rect != null) { LTGUI.destroy(rect.id); } if (rect != null && rect.type == LTGUI.Element_Type.Label && rect.style != null && rect.style.normal.textColor.a <= 0f) { Debug.LogWarning("Your GUI normal color has an alpha of zero, and will not be rendered."); } if (rect != null && rect.relativeRect.width == float.PositiveInfinity) { rect.relativeRect = new Rect(0f, 0f, (float)Screen.width, (float)Screen.height); } for (int i = depth * LTGUI.RECTS_PER_LEVEL; i < num; i++) { LTGUI.r = LTGUI.levels[i]; if (LTGUI.r == null) { LTGUI.r = rect; if (LTGUI.r != null) { LTGUI.r.rotateEnabled = true; LTGUI.r.alphaEnabled = true; LTGUI.r.setId(i, LTGUI.global_counter); } LTGUI.levels[i] = LTGUI.r; if (num2 >= LTGUI.levelDepths[depth]) { LTGUI.levelDepths[depth] = num2 + 1; } LTGUI.global_counter++; return(LTGUI.r); } num2++; } Debug.LogError("You ran out of GUI Element spaces"); return(null); }