ScrollView的scrollToPercentHorizontal滚动距离相关笔记

烁灵 posted @ 2015年5月19日 14:23 in 未分类 with tags Cocos2dx , 4624 阅读

手册:

scrollToPercentHorizontal(float percent, float time, bool attenuated);//水平滚动容器内容到滚动视图宽度百分比位置上

然而这并没有什么卵用。

 

笔记:

第一个参数percent将使内部容器向左滚动(内部容器宽度 - 滚动层宽度) * percent 像素的距离

第二个参数time为滚动时间,单位为秒

第三个参数attenuated为true时使滚动过程拥有减速效果

 

所以想要使内部容器0.5s内减速向左滚动x像素可以调用

float percent = 100.0f * x / (scroll->getInnerContainerSize().width - scroll->getContentSize().width)

scroll->scrollToPercentHorizontal(percent, 0.5f, true);

 

Avatar_small
f88tw 说:
2021年4月25日 18:23

敬启者:个人小网站希望大家多多支持 感谢您对我们热心的支持 f88tw┃华歌尔┃I appreciate your kind assistance. f88tw粗工粗工内容 粗工粗工内容 |墓园|捡骨流程|捡骨费用|捡骨时间|禁忌|捡骨颜色|捡骨师|新竹|时间|台北|桃园|苗栗|头份|https://mypaper.m.pchome.com.tw/f88tw

Avatar_small
192.168.1.1 说:
2023年2月02日 22:12

Do you own a router or modem, then you might have heard about the term Internal configuration and router configuration which are very important to do when you first buy a new router or when you have just reset a router. 192.168.1.1 Frankly speaking, there are hundreds of router brands across the world and every one of them has high end router models that have a different configuration process.

Avatar_small
comment voir les lik 说:
2023年7月15日 21:59

En utilisant cette plateforme Instagram, vous pouvez consulter le nombre de likes de la publication ainsi que les commentaires. D’autre part, vous pouvez également observer les goûts de vos propres publications en vous rendant sur votre profil. comment voir les like sur instagram En consultant votre profil, vous pouvez vérifier les avis des messages qui sont valides ou non pour vos photos ou vidéos partagées. Et vous pouvez également supprimer le message inutile que vous n’aimez pas.

Avatar_small
UBSE 10th Class Syl 说:
2023年7月16日 20:38

Uttarakhand Board High School Parents can use the Syllabus to Understand the Concepts and Prepare their Children for the Exam, Accordingly, The Uttarakhand 10th Class Syllabus 2024 All Subject Chapter UBSE 10th Class Syllabus 2024 Wise Students Prepare for the Upcoming Class Exam, it is quite Essential that they have the Complete Knowledge of the Uttarakhand 10th Class Latest Syllabus 2024 of All Relevant Subjects, Knowing the Details of Prescribed Topics and the weight age Allotted to Them Makes it easy to plan your Studies Meticulously so that you can make Effective Preparations for your Exam and obtain desired marks.

Avatar_small
pavzi.com 说:
2024年1月25日 23:45

Pavzi.com is a startup by passionate webmasters and bloggers who have a passion for providing engaging content that is accurate, interesting, and worthy to read. pavzi.com We are more like a web community where you can find different information, resources, and topics on day-to-day incidents or news. We provide you with the finest web content on every topic possible with the help of the editorial and content team.


登录 *


loading captcha image...
(输入验证码)
or Ctrl+Enter