找回密码
 立即注册
查看: 9443|回复: 90

[ugui/ngui] ngui scroll view UIDraggablePanel当grid移动时 判断方法

[复制链接]
发表于 2013-3-25 11:20 | 显示全部楼层 |阅读模式
[code=csharp]    /// <summary>
    /// Move the panel by the specified amount.
    /// </summary>

    public void MoveRelative (Vector3 relative)
    {
        if (GameObject.Find("Panel-SelectWindows")!=null)
        {
            GameObject.Find("Panel-SelectWindows").GetComponent<UIPanel>().enabled = false;
        }
       //上面的是我自己加的
        mTrans.localPosition += relative;
        Vector4 cr = mPanel.clipRange;
        cr.x -= relative.x;
        cr.y -= relative.y;
        mPanel.clipRange = cr;
        UpdateScrollbars(false);
    }[/code]
发表于 2017-2-12 14:12 | 显示全部楼层
好帖就是要顶
发表于 2017-2-12 14:56 | 显示全部楼层
顶顶多好
发表于 2017-2-12 14:56 | 显示全部楼层
难得一见的好帖
发表于 2017-2-12 14:21 | 显示全部楼层
很好哦
发表于 2017-2-12 14:56 | 显示全部楼层
LZ真是人才
发表于 2017-2-21 10:53 | 显示全部楼层
好帖就是要顶
发表于 2017-2-21 11:16 | 显示全部楼层
顶顶多好
发表于 2017-2-21 11:13 | 显示全部楼层
真心顶
发表于 2017-2-21 11:35 | 显示全部楼层
难得一见的好帖
懒得打字嘛,点击右侧快捷回复 【右侧内容,后台自定义】
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

小黑屋|手机版|Unity开发者联盟 ( 粤ICP备20003399号 )

GMT+8, 2024-5-9 02:11 , Processed in 0.189327 second(s), 26 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表