using UnityEngine;
using System.Collections.Generic;
[ExecuteInEditMode]
[AddComponentMenu("NGUI/Interaction/NGUI Scroll Bar Fixed Size")]
public class UIScrollBarFixSize : UIScrollBar
{
public float mFixedSize = 0.1f;
/// <summary>
/// The size of the foreground bar in percent (0-1 range).
/// </summary>
public override float barSize
{
get
{
return mSize;
}
set
{
if (mFixedSize != 0)
mSize = mFixedSize;
float val = Mathf.Clamp01(value);
if (mSize != val)
{
mSize = mFixedSize != 0 ? mFixedSize : val;
mIsDirty = true;
if (NGUITools.GetActive(this))
{
if (current == null && onChange != null)
{
current = this;
固定大小的滚动条UIScrollBar复写
最新推荐文章于 2021-08-30 15:19:07 发布