public Rect GetLast() { Rect result; if (m_Cursor == 0) { Debug.LogError("You cannot call GetLast immediately after beginning a group."); result = GUILayoutEntry.kDummyRect; } else if (m_Cursor <= entries.Count) { GUILayoutEntry gUILayoutEntry = entries[m_Cursor - 1]; result = gUILayoutEntry.rect; } else { Debug.LogError(string.Concat(new object[] { "Getting control ", m_Cursor, "'s position in a group with only ", entries.Count, " controls when doing ", Event.current.type })); result = GUILayoutEntry.kDummyRect; } return(result); }
private void AddYRecursive(GUILayoutEntry e, float y) { e.rect.y = e.rect.y + y; GUILayoutGroup gUILayoutGroup = e as GUILayoutGroup; if (gUILayoutGroup != null) { for (int i = 0; i < gUILayoutGroup.entries.Count; i++) { AddYRecursive(gUILayoutGroup.entries[i], y); } } }
public Rect PeekNext() { if (m_Cursor < entries.Count) { GUILayoutEntry gUILayoutEntry = entries[m_Cursor]; return(gUILayoutEntry.rect); } throw new ArgumentException(string.Concat(new object[] { "Getting control ", m_Cursor, "'s position in a group with only ", entries.Count, " controls when doing ", Event.current.rawType, "\nAborting" })); }
public void Add(GUILayoutEntry e) { entries.Add(e); }