Missing Information in WindowResize Helpfile?

Posted by Slick2175 on Sat 22 Nov 2014 01:02 AM — 5 posts, 21,711 views.

USA #0
Just curious if this is a bug in the WindowResize helpfile.

the prototype is:

long WindowResize(BSTR WindowName, long Width, long Height, long BackgroundColour);


but in your example on there you have 6 arguments and there is no explanation as to what the other 2 arguments stand for


WindowResize ("inventory", 0, 0, 300, 300, ColourNameToRGB ("red"))  -- resize window



So in your example the 2nd and 3rd parameter is width, height, whats the 4th, 5th?

the 4th seems to affect the colour brightness. I cant figure out the 5th.

And it also states

BackgroundColour - this is the RGB code for the colour is used to replace any pixels which are now visible, which were not previously (if the new size is larger than the old one).


So from that unless I misunderstand it, it should only color in the new pixles that are made. For me its fills the whole window even when i make it smaller.

example making window 1 pixel smaller on width and height


win_size = WindowInfo(eq, 4) --  height
win_width = WindowInfo(eq, 3) -- width
WindowResize (eq, win_width - 1, win_size - 1, ColourNameToRGB ("red"))  -- resize window



Am I missing something? Or is this info wrong?
Australia Forum Administrator #1
Looks like a bug in the help file. I probably copied and pasted the example from somewhere else. The function prototype would be right.
Australia Forum Administrator #2
I fixed the online documentation. As for the colour fill, that looks like a bug.
USA #3
Alright, just for a fyi

WindowResize ("inventory", 0, 0, 400, 300, ColourNameToRGB ("red"))  -- resize window


Where the 400 is there, it affects the color. adjusting it changes the color quite a bit. Its like some type of hue/sat effect. 0 makes it black around 300 the color is bright then once u start going above that starts to change the color it seemed.
Australia Forum Administrator #4
Fixed the bug:

https://github.com/nickgammon/mushclient/commit/431942f

These are the correct arguments:


WindowResize ("inventory", 400, 300, ColourNameToRGB ("red"))  -- resize window