mush的miniwindow问题
为什么miniwindow闪一下就自动关闭了?我测试用的,mini窗口没有任何东西,只是尺寸设置大点,300 * 600。怎么会这样呢? 楼主把代码贴出来,再把当时的情况尽可能说的清楚一点,大家才好帮你.
象你这么说,别人很难猜的 其实我基本从你的hyd那个辅助工具和ddid的fullme插件拷贝过来,在miniwindow旁边点击一下鼠标,miniwindow就自动不见了。
function draw_window()
local _hyd_n,_hyd_v
_hyd_n={}
_hyd_v={}
_hyd_n = "盗宝人位数: "
_hyd_n = "盗宝人位数: "
_hyd_n = "盗宝人位数: "
_hyd_n = "盗宝人位数: "
_hyd_n = "盗宝人位数: "
_hyd_n = "盗宝人位数: "
_hyd_n = "盗宝人位数: "
_hyd_n = "盗宝人位数: "
_hyd_n = "盗宝人位数: "
_hyd_v = "盗宝人位数: "
_hyd_v = "盗宝人位数: "
_hyd_v = "盗宝人位数: "
_hyd_v = "盗宝人位数: "
_hyd_v = "盗宝人位数: "
_hyd_v = "盗宝人位数: "
_hyd_v = "盗宝人位数: "
_hyd_v = "盗宝人位数: "
_hyd_v = "盗宝人位数: "
-- 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() 有时显示一下,就自动消失了 楼主不应该这么做测试的.
抱歉,我现在无法给出代码,但可以提供思路.
按我个人的经验,测试自己不熟的代码的时候,应该找出最纯粹的功能函数,加以测试.
象这个,楼主应该先测试用最简单的代码画一个窗口才是,而不是直接修改代码
我开始就是测试空miniwindow,也自动消失……
我开始也这么测试过,如下:function draw_window()
win = "win1"
WindowCreate (win, 0, 0, 100, 100, 7, 0, ColourNameToRGB("white"))-- create window
WindowShow (win, 1)
Note("加载个人辅助工具栏完毕!.")
end--draw_window()
可是也出现miniwindow自动消失的情况,本以为是不是没有内容导致自动消失或缩小的原因? 所以才按照上面的来测试。 原帖由 <i>glider</i> 于 2011-1-7 09:40 PM 发表 <a href="http://www.pkuxkx.net/forum/redirect.php?goto=findpost&pid=219561&ptid=18301" target="_blank"><img src="http://www.pkuxkx.net/forum/images/common/back.gif" border="0" onclick="zoom(this)" onload="attachimg(this, 'load')" alt="" /></a><br />
我开始也这么测试过,如下:<br />
function draw_window()<br />
win = "win1" <br />
WindowCreate (win, 0, 0, 100, 100, 7, 0, ColourNameToRGB("white"<img src="images/smilies/default/wink.gif" smilieid="4" border="0" alt="" />) -- create window<br />
<br />
WindowShow (win, 1) <br />
Note("加载个人辅助 ... <br /> 奇怪,内容丢失
------
以前和killunix测试的时候,遇见类似问题,最终结论是mush版本问题,请用最新版本或者4.43 我现在用的就是4.43版本,我看你的hyd辅助工具也是用4.43版本,没敢换别的版本 另外,我也参考了ddid的fullme插件,在4.43版本里面,倒没有出现自动消失情况,可我已修改mimiwindow的尺寸时,就不显示miniwindow了……
页:
[1]
2