------------------------------------ -- 提示 -- 如果使用其他Lua编辑工具编辑此文档,请将VisualTFT软件中打开的此文件编辑器视图关闭, -- 因为VisualTFT具有自动保存功能,其他软件修改时不能同步到VisualTFT编辑视图, -- VisualTFT定时保存时,其他软件修改的内容将被恢复。 -- -- Attention -- If you use other Lua Editor to edit this file, please close the file editor view -- opened in the VisualTFT, Because VisualTFT has an automatic save function, -- other Lua Editor cannot be synchronized to the VisualTFT edit view when it is modified. -- When VisualTFT saves regularly, the content modified by other Lua Editor will be restored. ------------------------------------ --下面列出了常用的回调函数 --更多功能请阅读<> --初始化函数 --function on_init() --end --定时回调函数,系统每隔1秒钟自动调用。 --function on_systick() --end --定时器超时回调函数,当设置的定时器超时时,执行此回调函数,timer_id为对应的定时器ID --function on_timer(timer_id) --end --用户通过触摸修改控件后,执行此回调函数。 --点击按钮控件,修改文本控件、修改滑动条都会触发此事件。 --function on_control_notify(screen,control,value) --end --当画面切换时,执行此回调函数,screen为目标画面。 --function on_screen_change(screen) --end