滚动屏幕(screen.scroll)

声明 (待完善,增加滚动距离,随机曲线)

是否已到底/顶部 = screen.scroll(是否向下滚动)

参数及返回值

  • 是否向下滚动
    • 布尔型,默认为True,默认向下滚动,如果是Flase,那么向上滚动
  • 是否已到底/顶部
    • 布尔型,屏幕可往上/下滚动则返回 true,否则返回 false

说明

屏幕滚动

  • 返回布尔型
    • true 表示屏幕可以继续往上/下滚动
    • false 表示屏幕无法继续滚动,已至底部

示例

local c = screen.scroll(true)
if c then 
    print('可继续向下滚动')
 else
    print('已到底部')
 end



local c = screen.scroll(false)
if c then 
    print('可继续向上滚动')
 else
    print('已到顶部')
 end
powered by GitbookFile Modify: 2021-03-27 23:14:19

results matching ""

    No results matching ""