Example #1
0
 // Token: 0x06004999 RID: 18841 RVA: 0x00119EF0 File Offset: 0x001180F0
 private void OnVerticalBar(global::UIScrollBar sb)
 {
     if (!this.mIgnoreCallbacks)
     {
         float x = (!(this.horizontalScrollBar != null)) ? 0f : this.horizontalScrollBar.scrollValue;
         float y = (!(this.verticalScrollBar != null)) ? 0f : this.verticalScrollBar.scrollValue;
         this.SetDragAmount(x, y, false);
     }
 }
Example #2
0
 // Token: 0x06004991 RID: 18833 RVA: 0x00119724 File Offset: 0x00117924
 private void Start()
 {
     if (this.mStartedManually)
     {
         return;
     }
     this.UpdateScrollbars(true);
     if (this.horizontalScrollBar != null)
     {
         global::UIScrollBar uiscrollBar = this.horizontalScrollBar;
         uiscrollBar.onChange           = (global::UIScrollBar.OnScrollBarChange)Delegate.Combine(uiscrollBar.onChange, new global::UIScrollBar.OnScrollBarChange(this.OnHorizontalBar));
         this.horizontalScrollBar.alpha = ((this.showScrollBars != global::UIDraggablePanel.ShowCondition.Always && !this.shouldMoveHorizontally) ? 0f : 1f);
     }
     if (this.verticalScrollBar != null)
     {
         global::UIScrollBar uiscrollBar2 = this.verticalScrollBar;
         uiscrollBar2.onChange        = (global::UIScrollBar.OnScrollBarChange)Delegate.Combine(uiscrollBar2.onChange, new global::UIScrollBar.OnScrollBarChange(this.OnVerticalBar));
         this.verticalScrollBar.alpha = ((this.showScrollBars != global::UIDraggablePanel.ShowCondition.Always && !this.shouldMoveVertically) ? 0f : 1f);
     }
     this.mStartedAutomatically = true;
 }
Example #3
0
    // Token: 0x06002ADC RID: 10972 RVA: 0x0009F190 File Offset: 0x0009D390
    protected virtual void ResetScrolling(bool retainCurrentValue)
    {
        global::UIScrollBar uiscrollBar  = null;
        global::UIScrollBar uiscrollBar2 = null;

        if (this.myDraggablePanel)
        {
            if (!retainCurrentValue)
            {
                uiscrollBar  = ((!this.vertical) ? null : this.myDraggablePanel.verticalScrollBar);
                uiscrollBar2 = ((!this.horizontal) ? null : this.myDraggablePanel.horizontalScrollBar);
            }
            if (!this.didManualStart)
            {
                this.myDraggablePanel.ManualStart();
                this.didManualStart = true;
            }
            this.myDraggablePanel.calculateBoundsEveryChange = false;
            this.NextFrameRecalculateBounds();
        }
        else if (!retainCurrentValue)
        {
            uiscrollBar  = ((!this.vertical || this.horizontal) ? null : base.GetComponentInChildren <global::UIScrollBar>());
            uiscrollBar2 = ((!this.horizontal || this.vertical) ? null : base.GetComponentInChildren <global::UIScrollBar>());
        }
        if (!retainCurrentValue)
        {
            if (this.vertical && uiscrollBar)
            {
                uiscrollBar.scrollValue = this.initialScrollValue.y;
                uiscrollBar.ForceUpdate();
            }
            if (this.horizontal && uiscrollBar2)
            {
                uiscrollBar2.scrollValue = this.initialScrollValue.x;
                uiscrollBar2.ForceUpdate();
            }
        }
    }