You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

46 lines
1.0 KiB

namespace EnhancedScrollerDemos.ExpandingCells
{
/// <summary>
/// Super simple data class to hold information for each cell.
/// </summary>
public class Data
{
public bool isExpanded;
public string headerText;
public string descriptionText;
public float collapsedSize;
public float expandedSize;
public EnhancedUI.EnhancedScroller.Tween.TweenType tweenType;
public float tweenTimeExpand;
public float tweenTimeCollapse;
/// <summary>
/// Calculates the size of the cell based on its expansion state
/// </summary>
public float Size
{
get
{
return isExpanded ? expandedSize : collapsedSize;
}
}
/// <summary>
/// Calculates the difference in the expanded and collapsed sizes
/// </summary>
public float SizeDifference
{
get
{
return expandedSize - collapsedSize;
}
}
}
}