using System; using UnityEngine.Scripting; namespace UnityEngine { // Token: 0x0200026A RID: 618 internal sealed class GUIScrollGroup : GUILayoutGroup { // Token: 0x06002A50 RID: 10832 RVA: 0x00035FEC File Offset: 0x000341EC [RequiredByNativeCode] public GUIScrollGroup() { } // Token: 0x06002A51 RID: 10833 RVA: 0x00036004 File Offset: 0x00034204 public override void CalcWidth() { float minWidth = this.minWidth; float maxWidth = this.maxWidth; if (this.allowHorizontalScroll) { this.minWidth = 0f; this.maxWidth = 0f; } base.CalcWidth(); this.calcMinWidth = this.minWidth; this.calcMaxWidth = this.maxWidth; if (this.allowHorizontalScroll) { if (this.minWidth > 32f) { this.minWidth = 32f; } if (minWidth != 0f) { this.minWidth = minWidth; } if (maxWidth != 0f) { this.maxWidth = maxWidth; this.stretchWidth = 0; } } } // Token: 0x06002A52 RID: 10834 RVA: 0x000360B8 File Offset: 0x000342B8 public override void SetHorizontal(float x, float width) { float num = ((!this.needsVerticalScrollbar) ? width : (width - this.verticalScrollbar.fixedWidth - (float)this.verticalScrollbar.margin.left)); if (this.allowHorizontalScroll && num < this.calcMinWidth) { this.needsHorizontalScrollbar = true; this.minWidth = this.calcMinWidth; this.maxWidth = this.calcMaxWidth; base.SetHorizontal(x, this.calcMinWidth); this.rect.width = width; this.clientWidth = this.calcMinWidth; } else { this.needsHorizontalScrollbar = false; if (this.allowHorizontalScroll) { this.minWidth = this.calcMinWidth; this.maxWidth = this.calcMaxWidth; } base.SetHorizontal(x, num); this.rect.width = width; this.clientWidth = num; } } // Token: 0x06002A53 RID: 10835 RVA: 0x000361A4 File Offset: 0x000343A4 public override void CalcHeight() { float minHeight = this.minHeight; float maxHeight = this.maxHeight; if (this.allowVerticalScroll) { this.minHeight = 0f; this.maxHeight = 0f; } base.CalcHeight(); this.calcMinHeight = this.minHeight; this.calcMaxHeight = this.maxHeight; if (this.needsHorizontalScrollbar) { float num = this.horizontalScrollbar.fixedHeight + (float)this.horizontalScrollbar.margin.top; this.minHeight += num; this.maxHeight += num; } if (this.allowVerticalScroll) { if (this.minHeight > 32f) { this.minHeight = 32f; } if (minHeight != 0f) { this.minHeight = minHeight; } if (maxHeight != 0f) { this.maxHeight = maxHeight; this.stretchHeight = 0; } } } // Token: 0x06002A54 RID: 10836 RVA: 0x000362A0 File Offset: 0x000344A0 public override void SetVertical(float y, float height) { float num = height; if (this.needsHorizontalScrollbar) { num -= this.horizontalScrollbar.fixedHeight + (float)this.horizontalScrollbar.margin.top; } if (this.allowVerticalScroll && num < this.calcMinHeight) { if (!this.needsHorizontalScrollbar && !this.needsVerticalScrollbar) { this.clientWidth = this.rect.width - this.verticalScrollbar.fixedWidth - (float)this.verticalScrollbar.margin.left; if (this.clientWidth < this.calcMinWidth) { this.clientWidth = this.calcMinWidth; } float width = this.rect.width; this.SetHorizontal(this.rect.x, this.clientWidth); this.CalcHeight(); this.rect.width = width; } float minHeight = this.minHeight; float maxHeight = this.maxHeight; this.minHeight = this.calcMinHeight; this.maxHeight = this.calcMaxHeight; base.SetVertical(y, this.calcMinHeight); this.minHeight = minHeight; this.maxHeight = maxHeight; this.rect.height = height; this.clientHeight = this.calcMinHeight; } else { if (this.allowVerticalScroll) { this.minHeight = this.calcMinHeight; this.maxHeight = this.calcMaxHeight; } base.SetVertical(y, num); this.rect.height = height; this.clientHeight = num; } } // Token: 0x04000774 RID: 1908 public float calcMinWidth; // Token: 0x04000775 RID: 1909 public float calcMaxWidth; // Token: 0x04000776 RID: 1910 public float calcMinHeight; // Token: 0x04000777 RID: 1911 public float calcMaxHeight; // Token: 0x04000778 RID: 1912 public float clientWidth; // Token: 0x04000779 RID: 1913 public float clientHeight; // Token: 0x0400077A RID: 1914 public bool allowHorizontalScroll = true; // Token: 0x0400077B RID: 1915 public bool allowVerticalScroll = true; // Token: 0x0400077C RID: 1916 public bool needsHorizontalScrollbar; // Token: 0x0400077D RID: 1917 public bool needsVerticalScrollbar; // Token: 0x0400077E RID: 1918 public GUIStyle horizontalScrollbar; // Token: 0x0400077F RID: 1919 public GUIStyle verticalScrollbar; } }