函数:getFloatButtonPos 获取悬浮窗位置

函数功能: 获取悬浮窗位置

引擎版本:仅 Androidv3.2.0、iOSv3.1.5 及其以上版本支持

函数方法

dir,per = getFloatButtonPos()

返回值 类型 说明
dir string 悬浮窗所在屏幕的位置,t - 上边;b - 下边;l - 左边;r - 右边
per string 悬浮窗位置所占的百分比,0 - 1

函数用例

dir,per = getFloatButtonPos()
dialog("获取方向:" .. dir .. "\n百分比:" .. per,5)

注意事项

  • 由于企业版无悬浮窗,故企业版不支持此函数,企业版使用此函数会报错。
Copyright 北京帮你玩科技有限公司 2023 all right reserved,powered by Gitbook该文章修订时间: 2024-03-06 17:50:18

results matching ""

    No results matching ""