Posted by
| Nick Gammon
Australia (23,133 posts) Bio
Forum Administrator |
Message
| Ah OK, I found it! :-)
Your code was:
WindowCreate ("WinDef",
660, 0, 584, 100,
1, -----> problem is here
2,
0x000000)
WindowFont ("WinDef", "cour", "Courier New", 10, false, false, false, false, 0, 0)
WindowShow ("WinDef", true)
local line = 0
WindowText ("WinDef", "cour",
"-- Defences -------------------------------------------------------------",
0, line, 0, 0,
0xFFFFFF,
false)
local line = line + 18
WindowText ("WinDef", "cour",
"¬ NO Lightshield ¬ NO Mindnet · NO Blind £ NO Frost ¤ NO Sileris",
0, line, 0, 0, -- rectangle
0xFFFFFF, -- colour
false) -- not Unicode
local line = line + 18
WindowText ("WinDef", "cour",
"¬ NO Discharge ¬ NO Deatheye · Deaf £ NO Speed ¤ NO Caloric",
0, line, 0, 0, -- rectangle
0xFFFFFF, -- colour
false) -- not Unicode
local line = line + 18
WindowText ("WinDef", "cour",
"¬ NO Cloak ¬ NO Thirdeye · NO Kola £ NO Levitation ¤ NO Mass",
0, line, 0, 0, -- rectangle
0xFFFFFF, -- colour
false) -- not Unicode
local line = line + 18
font_height = WindowFontInfo ("WinDef", "cour", 1)
font_width1 = WindowTextWidth ("WinDef", "cour", "H:100% M: 98% E:100% W: 99% S: 88% X:82.25% <eb lr> PRONE")
font_width2 = WindowTextWidth ("WinDef", "cour", "ppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppp")
world.Note ("Font Height = "..font_height)
world.Note ("Font Width1 = "..font_width1)
world.Note ("Font Width2 = "..font_width2)
Your position code for WindowCreate is 1:
Position - a number indicating where you want the window positioned on the screen. Whenever the screen is resized or redrawn the contents of the window are drawn in the requested position:
0 = strech to output view size
1 = stretch with aspect ratio
2 = strech to owner size
This caused MUSHclient to copy the miniwindow to the output window in such a way that it created the artifact you see. Since you are using absolute positioning anyway, the problem goes away if you use another position flag (that doesn't stretch), like 4.
|
- Nick Gammon
www.gammon.com.au, www.mushclient.com | Top |
|