夜雨网络
//功能: 悬浮窗日志
//测试分辨率 1080*1920
//功能说明:Rain自定义toast同步显示
//分辨率:通用
dim toast_time = 2000//显示2000毫秒,设置0无限显示
Dim toast_color = "00FF00"//字体颜色
toast_init()//创建
toast("测试内容测试内容测试内容测试内容\n测试内容测试内容测试内容测试")
toast_color = "0000FF"//改变颜色属性
toast ("测试内容\n多行显示11111")
Function OnScriptExit()
TracePrint "结束关闭悬浮窗"
FW.Close ("foalt")
End Function
//屏幕打印自定义showmeeage
Function toast(showText)
dim fw_data = FW.GetValue("foalt")
FW.SetTextColor "foalt_text1", toast_color //文字颜色
FW.SetTextView("foalt_text1",showText,20,4, fw_data["Width"],fw_data["Height"])
FW.Show ("foalt")
If toast_time = 0 then Exit Function//如果toast_time是0则一直显示
Delay toast_time //显示时长
FW.Hide("foalt")//隐藏
End Function
Function toast_init()
FW.NewFWindow "foalt",1, GetScreenX()/15,GetScreenX()*0.5,(GetScreenX()/22)*4//设置宽高. 最大4行显示
FW.AddTextView "foalt", "foalt_text1", "",20, 2,10, 10
FW.SetTextSize("foalt_text1",13) //文字大小
FW.Opacity "foalt", 60 //透明度
FW.SetBackColor("foalt","#000000") //背景色
FW.SetTextColor "foalt_text1", "FF0000"//文字颜色
FW.SetSmoothing "foalt", 20 //角度
FW.IsTouchMove "foalt", 1 //开启可拖动
End Function
//功能: 悬浮窗日志
//测试分辨率 1080*1920
//功能说明:Rain自定义toast同步显示
//分辨率:通用
dim toast_time = 2000//显示2000毫秒,设置0无限显示
Dim toast_color = "00FF00"//字体颜色
toast_init()//创建
toast("测试内容测试内容测试内容测试内容\n测试内容测试内容测试内容测试")
toast_color = "0000FF"//改变颜色属性
toast ("测试内容\n多行显示11111")
Function OnScriptExit()
TracePrint "结束关闭悬浮窗"
FW.Close ("foalt")
End Function
//屏幕打印自定义showmeeage
Function toast(showText)
dim fw_data = FW.GetValue("foalt")
FW.SetTextColor "foalt_text1", toast_color //文字颜色
FW.SetTextView("foalt_text1",showText,20,4, fw_data["Width"],fw_data["Height"])
FW.Show ("foalt")
If toast_time = 0 then Exit Function//如果toast_time是0则一直显示
Delay toast_time //显示时长
FW.Hide("foalt")//隐藏
End Function
Function toast_init()
FW.NewFWindow "foalt",1, GetScreenX()/15,GetScreenX()*0.5,(GetScreenX()/22)*4//设置宽高. 最大4行显示
FW.AddTextView "foalt", "foalt_text1", "",20, 2,10, 10
FW.SetTextSize("foalt_text1",13) //文字大小
FW.Opacity "foalt", 60 //透明度
FW.SetBackColor("foalt","#000000") //背景色
FW.SetTextColor "foalt_text1", "FF0000"//文字颜色
FW.SetSmoothing "foalt", 20 //角度
FW.IsTouchMove "foalt", 1 //开启可拖动
End Function