|
楼主 |
发表于 2011-1-7 20:33:47
|
显示全部楼层
其实我基本从你的hyd那个辅助工具和ddid的fullme插件拷贝过来,在miniwindow旁边点击一下鼠标,miniwindow就自动不见了。
function draw_window()
local _hyd_n,_hyd_v
_hyd_n={}
_hyd_v={}
_hyd_n[1] = "盗宝人位数: "
_hyd_n[2] = "盗宝人位数: "
_hyd_n[3] = "盗宝人位数: "
_hyd_n[4] = "盗宝人位数: "
_hyd_n[5] = "盗宝人位数: "
_hyd_n[6] = "盗宝人位数: "
_hyd_n[7] = "盗宝人位数: "
_hyd_n[8] = "盗宝人位数: "
_hyd_n[9] = "盗宝人位数: "
_hyd_v[1] = "盗宝人位数: "
_hyd_v[2] = "盗宝人位数: "
_hyd_v[3] = "盗宝人位数: "
_hyd_v[4] = "盗宝人位数: "
_hyd_v[5] = "盗宝人位数: "
_hyd_v[6] = "盗宝人位数: "
_hyd_v[7] = "盗宝人位数: "
_hyd_v[8] = "盗宝人位数: "
_hyd_v[9] = "盗宝人位数: "
-- window size in pixels
-- window size in pixels
WINDOW_WIDTH = 220
WINDOW_HEIGHT = (#_hyd_n + 1)*20+10
-- Create the window
WindowCreate (win, 0, 0, WINDOW_WIDTH, WINDOW_HEIGHT, WINDOW_POSITION, 0, WINDOW_BACKGROUND_COLOUR) -- create window
-- define the fonts
WindowFont (win, "f1", FONT_NAME1, FONT_SIZE_12)
WindowFont (win, "f2", FONT_NAME2, FONT_SIZE_11)
WindowFont (win, "f3", FONT_NAME1, FONT_SIZE_12, true)
WindowFont (win, "f4", FONT_NAME3, FONT_SIZE_11, true)
-- work out how high the font is
font_height = WindowFontInfo (win, "f1", 1) -- height of the font
-- draw the border of the whole box
WindowCircleOp (win, 2, 0, 0, 0, 0, BOX_COLOUR, 6, EDGE_WIDTH, 0x000000, 1)
-- ensure window visible
local head_width = (WINDOW_WIDTH - WindowTextWidth (win, "f1", "胡一刀任务情况表"))/2
WindowText (win, "f1",
"胡一刀任务情况表", -- text
head_width, 5, 0, 0, -- rectangle
ColourNameToRGB ("red"), -- colour
false) -- not Unicode
for i = 1,#_hyd_n do
local txt = _hyd_n .. _hyd_v
local _high = i*20+5
WindowText (win, "f1",
txt, -- text
5, _high, 0, 0, -- rectangle
ColourNameToRGB ("blue"), -- colour
false) -- not Unicode
end
--for i = 1,#_basic do
-- local txt = _skills_ch.."(".._basic.."):".._skills_lev
-- local _high = i*20+5
-- WindowText (win, "f1",
-- txt, -- text
-- 5, _high, 0, 0, -- rectangle
-- ColourNameToRGB ("blue"), -- colour
-- false) -- not Unicode
--end
WindowShow (win, true)
end -- draw_window() |
|