找回密码
 立即注册
楼主: 小米

[ugui/ngui] ngui在UITextList中实现手指滑动代码

[复制链接]
发表于 2013-3-16 15:30 | 显示全部楼层 |阅读模式
找到UITextList类
底下填上以下代码:
  1. void OnDrag(Vector2 delta)
  2.     {
  3.         float _delta = (style == Style.Chat) ? -delta.y / 2 : delta.y / 2;
  4.         mScroll = Mathf.Max(0f, mScroll + _delta);
  5.         UpdateVisibleText();
  6.     }
复制代码
发表于 2013-3-20 18:53 | 显示全部楼层
Nice code, I can use it in my project.
发表于 2017-5-23 08:35 | 显示全部楼层
楼主是超人
发表于 2017-5-23 08:46 | 显示全部楼层
顶顶多好
发表于 2017-5-23 08:53 | 显示全部楼层
真心顶
发表于 2017-5-23 08:40 | 显示全部楼层
难得一见的好帖
发表于 2017-5-23 09:02 | 显示全部楼层
说的非常好
发表于 2017-7-21 09:36 | 显示全部楼层
楼主是超人
发表于 2017-7-21 09:54 | 显示全部楼层
好帖就是要顶
发表于 2017-7-21 09:55 | 显示全部楼层
真心顶
懒得打字嘛,点击右侧快捷回复 【右侧内容,后台自定义】
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

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

GMT+8, 2024-4-29 16:18 , Processed in 0.868778 second(s), 23 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

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