world.WindowResize

MUSHclient script function (Method) — introduced in version 4.58

Resizes a miniwindow

Prototype

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

Data type meanings

Description

This resizes an existing miniwindow of the given name.

If the new size is larger than the existing size the BackgroundColour is used to fill any newly exposed area.

Any existing contents of the miniwindow are copied to the top-left corner of the new window.

The output window is not automatically redrawn. Call Redraw or WindowShow to cause the new size to become visible.

Any existing hotspots, images, and fonts are preserved. All other window parameters for this miniwindow are unchanged.

PARAMETERS:

WindowName - the name of an existing miniwindow. The name may not be the empty string.

NOTE: Window names are case-sensitive.

Width, Height - the width and height of the window, in pixels. The minimum size is 0, 0.

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).

Lua example

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

Return value

eNoNameSpecified - miniwindow name must be specified
eBadParameter - width or height less than zero
eOK - success

Return code meanings

Related topic

MiniWindows

See also

FunctionDescription
WindowCreateCreates a miniwindow
WindowDeleteDeletes a miniwindow
WindowInfoReturns information about a miniwindow
WindowListLists all miniwindows
WindowShowShows or hides a miniwindow