我又下了一个443的来作对比测试,确实是461的改进导致我的miniwindows不能工作了,同样的一段代码模块,同样的环境配置,443下跑得正常,而461出不来miniwindow且没报错信息。
我已经精简了代码,去掉了所有的变量和汉字,依然是出不来。是什么原因呢?ddid帮看看吧。
我的代码():
---------miniwindows 模块------------
--字体
FONT_NAME1 = "Arial"
FONT_NAME2 = "Webdings"
FONT_NAME3 = "Lucida Console"
FONT_SIZE_11 = 11
FONT_SIZE_12 = 12
--尺寸
EDGE_WIDTH = 3
--位置
WINDOW_POSITION = 6 -- see below (6 is top right)
--[[
常用的位置:
4 = top left
5 = center left-right at top
6 = top right
7 = on right, center top-bottom
8 = on right, at bottom
9 = center left-right at bottom
--]]
-- colours
WINDOW_BACKGROUND_COLOUR = ColourNameToRGB ("white")
BOX_COLOUR = ColourNameToRGB ("royalblue") -- Box boarder's colour
WINDOW_TEXT_COLOUR = ColourNameToRGB ("black")
-- offset of text from edge
TEXT_INSET = 5
-- get a unique name
win = GetPluginID () -- get a unique name
-- end configuration
function draw_window()
-- window size in pixels
WINDOW_WIDTH = 250
WINDOW_HEIGHT = 220
-- 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", "Test List"))/2
for i = 1,10 do
local txt2 = i
local _high = i*20 + 25
WindowText (win, "f1",
txt2, -- text
5, _high, 0, 0, -- rectangle
ColourNameToRGB ("blue"), -- colour
false) -- not Unicode
end
WindowShow (win, true)
end |