示例#1
0
 public AxisAlignedBox PeekNext()
 {
     if (this.cursor < this.entries.Count)
     {
         GUILayoutEntry gUILayoutEntry = this.entries[this.cursor];
         return(gUILayoutEntry.rect);
     }
     throw new ArgumentOutOfRangeException("cursor");
     //throw new ArgumentException(string.Concat(new object[]
     //{
     //    "Getting control ",
     //    this.cursor,
     //    "'s position in a group with only ",
     //    this.entries.Count,
     //    " controls when doing ",
     //    Event.current.rawType,
     //    "\nAborting"
     //}));
 }
示例#2
0
 public GUILayoutEntry GetNext()
 {
     if (this.cursor < this.entries.Count)
     {
         GUILayoutEntry result = (GUILayoutEntry)this.entries[this.cursor];
         this.cursor++;
         return(result);
     }
     throw new ArgumentOutOfRangeException("cursor");
     //throw new ArgumentException(string.Concat(new object[]
     //{
     //    "Getting control ",
     //    this.cursor,
     //    "'s position in a group with only ",
     //    this.entries.Count,
     //    " controls when doing ",
     //    Event.current.rawType,
     //    "\nAborting"
     //}));
 }
示例#3
0
 public AxisAlignedBox GetLast()
 {
     if (this.cursor == 0)
     {
         //Debug.LogError("You cannot call GetLast immediately after beginning a group.");
         return(GUILayoutEntry.kDummyRect);
     }
     if (this.cursor <= this.entries.Count)
     {
         GUILayoutEntry gUILayoutEntry = (GUILayoutEntry)this.entries[this.cursor - 1];
         return(gUILayoutEntry.rect);
     }
     //Debug.LogError(string.Concat(new object[]
     //{
     //    "Getting control ",
     //    this.cursor,
     //    "'s position in a group with only ",
     //    this.entries.Count,
     //    " controls when doing ",
     //    Event.current.type
     //}));
     return(GUILayoutEntry.kDummyRect);
 }
示例#4
0
 public void Add(GUILayoutEntry e)
 {
     this.entries.Add(e);
 }