Click or drag to resize

CExpandCollapseOnClick Class

Utility to expand an item when it's clicked, dispatching the size change request via CExpandCollapseOnClickISizeChangesHandler for increased flexibility. This is a duplicate of ExpandCollapseOnClick from the Optimized ScrollView Adapter package
Inheritance Hierarchy
SystemObject
  Object
    Component
      Behaviour
        MonoBehaviour
          Com.ForbiddenByte.OSA.Classic.UtilCExpandCollapseOnClick

Namespace:  Com.ForbiddenByte.OSA.Classic.Util
Assembly:  Assembly-CSharp (in Assembly-CSharp.dll) Version: 0.0.0.0
Syntax
C#
public class CExpandCollapseOnClick : MonoBehaviour

The CExpandCollapseOnClick type exposes the following members.

Constructors
  NameDescription
Public methodCExpandCollapseOnClick
Top
Methods
  NameDescription
Public methodOnClicked
Top
Fields
  NameDescription
Public fieldanimDuration
The duration of the expand(or collapse) animation
Public fieldbutton
The button to whose onClock to subscribe. If not specified, will try to GetComponent<Button> from the GO containing this script
Public fieldexpanded
This keeps track of the 'expanded' state. If true, on click the animation will set nonExpandedSize as the target size; else, nonExpandedSize x expandFactor
Public fieldexpandFactor
When expanding, the initial size will be nonExpandedSize and the target size will be nonExpandedSize x expandFactor; opposite is true when collapsing
Public fieldnonExpandedSize
This is the size from which the item will start expanding
Public fieldonExpandAmounChanged
Public fieldsizeChangesHandler
Top
Version Information

Optimized ScrollView Adapter

Supported in: 4.1
See Also