mini window 现在最大问题就是不能移动,不能关闭,只能创建。所以使用起来还是比较麻烦的
为啥不能移动跟关闭? 准确说是不支持拖拉,和直接点击关闭操作,必须通过命令行方式移动关闭窗口
面向对象myStatusWindow
使用面对对象方式对myStatusWindow重新封装了下, 把mini_window控件化,更加方便大家使用使用方法
require "sj_mini_win"
local win=window.new() --监控窗体
win.name="status_window"
win.font_height=8 --实例的字体高度设置
win:addGauge ("jingsheng","精神: ", 100, "darkgreen", "mediumblue", "darkred", "50".."/".."100", 0)
win:addGauge ("qixue","气血: ", 50, "darkgreen", "mediumblue", "darkred", "50".."/".."100", 0)
win:addGauge ("jingli","精力: ", 50, "darkgreen", "mediumblue", "darkred", "50".."/".."70", 0)
win:addGauge("neili","内力: ", 100, "darkgreen", "mediumblue", "darkred", "200".."/".."100", 0)
win:addGauge("food","食物: ", 400, "darkgreen", "mediumblue", "darkred", "80".."/".."100", 0)
win:addGauge("drink","饮水: ", 500, "darkgreen", "mediumblue", "darkred", "100".."/".."100", 0)
win:addGauge("pot","潜能: ", 100, "darkgreen", "mediumblue", "darkred", "100", 1)
win:refresh()
实现了和楼主相同功能
页:
1
[2]