// Token: 0x0600103A RID: 4154 RVA: 0x0006B058 File Offset: 0x00069458 public void OnDrag(PointerEventData eventData) { if (!this.isDragging) { return; } RectTransform rectTransform = base.transform.parent as RectTransform; if (rectTransform == null) { return; } Vector2 vector; if (!RectTransformUtility.ScreenPointToLocalPointInRectangle(rectTransform, eventData.position, eventData.pressEventCamera, out vector)) { return; } Separator.EDirection edirection = this.direction; if (edirection != Separator.EDirection.HORIZONTAL) { if (edirection == Separator.EDirection.VERTICAL) { this.value = (vector.y - this.offset.y + rectTransform.rect.size.y * rectTransform.pivot.y) / rectTransform.rect.size.y; } } else { this.value = (vector.x - this.offset.x + rectTransform.rect.size.x * rectTransform.pivot.x) / rectTransform.rect.size.x; } this.updateVisuals(); }
// Token: 0x060015EA RID: 5610 RVA: 0x000835A8 File Offset: 0x000819A8 public virtual void read(IFormattedFileReader reader) { reader = reader.readObject(); if (reader.containsKey("Windows")) { reader.readKey("Windows"); int num = reader.readArrayLength(); for (int i = 0; i < num; i++) { reader.readArrayIndex(i); IFormattedFileReader formattedFileReader = reader.readObject(); if (formattedFileReader != null) { Type type = formattedFileReader.readValue <Type>("Type"); if (type != null) { Sleek2Window sleek2Window = Activator.CreateInstance(type) as Sleek2Window; if (sleek2Window != null) { this.addWindow(sleek2Window); formattedFileReader.readKey("Window"); sleek2Window.read(formattedFileReader); } } } } } else { reader.readKey("Direction"); Separator.EDirection edirection = reader.readValue <Separator.EDirection>(); reader.readKey("Split"); float value = reader.readValue <float>(); Sleek2WindowPartition sleek2WindowPartition; Sleek2WindowPartition sleek2WindowPartition2; this.split((edirection != Separator.EDirection.HORIZONTAL) ? ESleek2PartitionDirection.UP : ESleek2PartitionDirection.RIGHT, out sleek2WindowPartition, out sleek2WindowPartition2); this.separator.handle.value = value; reader.readKey("First"); sleek2WindowPartition.read(reader); reader.readKey("Second"); sleek2WindowPartition2.read(reader); } }
// Token: 0x06001035 RID: 4149 RVA: 0x0006AB60 File Offset: 0x00068F60 private void updateVisuals() { if (this.a == null || this.b == null) { return; } RectTransform rectTransform = base.transform as RectTransform; if (this.aActive != this.a.gameObject.activeSelf) { this.a.gameObject.SetActive(this.aActive); } if (this.bActive != this.b.gameObject.activeSelf) { this.b.gameObject.SetActive(this.bActive); } Image component = rectTransform.GetComponent <Image>(); if (component != null && component.enabled != (this.aActive && this.bActive)) { component.enabled = (this.aActive && this.bActive); } this.value = Mathf.Clamp(this.value, this.min, this.max); float num = this.value; float num2 = this.padding; if (!this.aActive) { num = 0f; num2 = 0f; } else if (!this.bActive) { num = 1f; num2 = 0f; } this.tracker.Clear(); Separator.EDirection edirection = this.direction; if (edirection != Separator.EDirection.HORIZONTAL) { if (edirection == Separator.EDirection.VERTICAL) { this.tracker.Add(this, rectTransform, DrivenTransformProperties.AnchorMinX | DrivenTransformProperties.AnchorMinY | DrivenTransformProperties.AnchorMaxX | DrivenTransformProperties.AnchorMaxY | DrivenTransformProperties.SizeDeltaX | DrivenTransformProperties.SizeDeltaY); this.tracker.Add(this, this.a, DrivenTransformProperties.AnchoredPositionX | DrivenTransformProperties.AnchoredPositionY | DrivenTransformProperties.AnchorMinX | DrivenTransformProperties.AnchorMinY | DrivenTransformProperties.AnchorMaxX | DrivenTransformProperties.AnchorMaxY | DrivenTransformProperties.SizeDeltaX | DrivenTransformProperties.SizeDeltaY | DrivenTransformProperties.PivotX | DrivenTransformProperties.PivotY); this.tracker.Add(this, this.b, DrivenTransformProperties.AnchoredPositionX | DrivenTransformProperties.AnchoredPositionY | DrivenTransformProperties.AnchorMinX | DrivenTransformProperties.AnchorMinY | DrivenTransformProperties.AnchorMaxX | DrivenTransformProperties.AnchorMaxY | DrivenTransformProperties.SizeDeltaX | DrivenTransformProperties.SizeDeltaY | DrivenTransformProperties.PivotX | DrivenTransformProperties.PivotY); rectTransform.anchorMin = new Vector2(0f, num); rectTransform.anchorMax = new Vector2(1f, num); rectTransform.sizeDelta = new Vector2(0f, this.width); this.a.anchorMin = Vector2.zero; this.a.anchorMax = new Vector2(1f, num); this.a.sizeDelta = new Vector2(0f, -num2); this.a.anchoredPosition = Vector2.zero; this.a.pivot = new Vector2(0.5f, 0f); this.b.anchorMin = new Vector2(0f, num); this.b.anchorMax = Vector2.one; this.b.sizeDelta = new Vector2(0f, -num2); this.b.anchoredPosition = new Vector2(0f, num2); this.b.pivot = new Vector2(0.5f, 0f); } } else { this.tracker.Add(this, rectTransform, DrivenTransformProperties.AnchorMinX | DrivenTransformProperties.AnchorMinY | DrivenTransformProperties.AnchorMaxX | DrivenTransformProperties.AnchorMaxY | DrivenTransformProperties.SizeDeltaX | DrivenTransformProperties.SizeDeltaY); this.tracker.Add(this, this.a, DrivenTransformProperties.AnchoredPositionX | DrivenTransformProperties.AnchoredPositionY | DrivenTransformProperties.AnchorMinX | DrivenTransformProperties.AnchorMinY | DrivenTransformProperties.AnchorMaxX | DrivenTransformProperties.AnchorMaxY | DrivenTransformProperties.SizeDeltaX | DrivenTransformProperties.SizeDeltaY | DrivenTransformProperties.PivotX | DrivenTransformProperties.PivotY); this.tracker.Add(this, this.b, DrivenTransformProperties.AnchoredPositionX | DrivenTransformProperties.AnchoredPositionY | DrivenTransformProperties.AnchorMinX | DrivenTransformProperties.AnchorMinY | DrivenTransformProperties.AnchorMaxX | DrivenTransformProperties.AnchorMaxY | DrivenTransformProperties.SizeDeltaX | DrivenTransformProperties.SizeDeltaY | DrivenTransformProperties.PivotX | DrivenTransformProperties.PivotY); rectTransform.anchorMin = new Vector2(num, 0f); rectTransform.anchorMax = new Vector2(num, 1f); rectTransform.sizeDelta = new Vector2(this.width, 0f); this.a.anchorMin = Vector2.zero; this.a.anchorMax = new Vector2(num, 1f); this.a.sizeDelta = new Vector2(-num2, 0f); this.a.anchoredPosition = Vector2.zero; this.a.pivot = new Vector2(0f, 0.5f); this.b.anchorMin = new Vector2(num, 0f); this.b.anchorMax = Vector2.one; this.b.sizeDelta = new Vector2(-num2, 0f); this.b.anchoredPosition = new Vector2(num2, 0f); this.b.pivot = new Vector2(0f, 0.5f); } }