PixelCrushers.UIScrollbarEnabler Class Reference

Enables a scrollbar only if the content is larger than the scroll rect. More...

Inheritance diagram for PixelCrushers.UIScrollbarEnabler:
Collaboration diagram for PixelCrushers.UIScrollbarEnabler:

Public Member Functions

virtual void OnEnable ()
 
virtual void OnDisable ()
 
virtual void CheckScrollbar ()
 
virtual void CheckScrollbarWithResetValue (float value)
 

Public Attributes

UnityEngine.UI.ScrollRect scrollRect = null
 
RectTransform scrollContent = null
 
UnityEngine.UI.Scrollbar scrollbar = null
 
bool smoothScroll = false
 
float smoothScrollSpeed = 5
 

Protected Member Functions

virtual void Start ()
 
virtual IEnumerator CheckScrollbarAfterUIUpdate (bool useResetValue, float resetValue)
 

Protected Attributes

bool m_started = false
 
bool m_checking = false
 
RectTransform m_scrollRectTransform = null
 

Detailed Description

Enables a scrollbar only if the content is larger than the scroll rect.

This component only only shows or hides the scrollbar when the component is enabled or when CheckScrollbar is invoked.

Member Function Documentation

◆ CheckScrollbar()

virtual void PixelCrushers.UIScrollbarEnabler.CheckScrollbar ( )
inlinevirtual

◆ CheckScrollbarAfterUIUpdate()

virtual IEnumerator PixelCrushers.UIScrollbarEnabler.CheckScrollbarAfterUIUpdate ( bool  useResetValue,
float  resetValue 
)
inlineprotectedvirtual

◆ CheckScrollbarWithResetValue()

virtual void PixelCrushers.UIScrollbarEnabler.CheckScrollbarWithResetValue ( float  value)
inlinevirtual

◆ OnDisable()

virtual void PixelCrushers.UIScrollbarEnabler.OnDisable ( )
inlinevirtual

◆ OnEnable()

virtual void PixelCrushers.UIScrollbarEnabler.OnEnable ( )
inlinevirtual

◆ Start()

virtual void PixelCrushers.UIScrollbarEnabler.Start ( )
inlineprotectedvirtual

Member Data Documentation

◆ m_checking

bool PixelCrushers.UIScrollbarEnabler.m_checking = false
protected

◆ m_scrollRectTransform

RectTransform PixelCrushers.UIScrollbarEnabler.m_scrollRectTransform = null
protected

◆ m_started

bool PixelCrushers.UIScrollbarEnabler.m_started = false
protected

◆ scrollbar

UnityEngine.UI.Scrollbar PixelCrushers.UIScrollbarEnabler.scrollbar = null

◆ scrollContent

RectTransform PixelCrushers.UIScrollbarEnabler.scrollContent = null

◆ scrollRect

UnityEngine.UI.ScrollRect PixelCrushers.UIScrollbarEnabler.scrollRect = null

◆ smoothScroll

bool PixelCrushers.UIScrollbarEnabler.smoothScroll = false

◆ smoothScrollSpeed

float PixelCrushers.UIScrollbarEnabler.smoothScrollSpeed = 5

The documentation for this class was generated from the following file: