Mini Windows
MUSHclient from version 4.34 onwards now has "floating miniwindows" which appear on top of, or to the side of, the main output window. As these are part of the main window, if you move or resize the main window, the extra windows automatically move with it.


  • Miniwindows are created and manipulated purely by script commands, generally intended to be inside plugins.

  • You can have any number of miniwindows at once. Each one has a name which is used by the script to refer to it. Your only limitation would be available screen space, and your imagination. Names are case-sensitive.

  • Miniwindows do not necessarily have to be visible. Thus you could be adding to a miniwindow (such as your inventory) during combat, when you might not want to see it. Later, you can show it, and its most recent contents will be displayed.

  • Each miniwindow is rectangular in shape, and can be any size you like. They start off with a background colour you specify, however you can change that partly or completely by drawing in the window.

  • You can position the miniwindows whereever you want to, however there are various auto-positioning options, such as top left corner, middle of top of window, top right corner, and so on.

  • Miniwindows are drawn in an off-screen buffer (bitmap), and then automatically copied to the main output window, whenever the output window is redrawn. This provides fast, flicker-free operation.

  • Miniwindows can be drawn either above or below the normal output window text. Normally for a floating-style window you would want it above (and thus the text scrolls underneath it), however for some background information you can choose to have the text scroll over the miniwindow.

  • Miniwindows can capture mouse-down, mouse-move, and mouse-up events, in order to react to the player clicking on them. This can be used to implement hyperlinks, buttons, and "mouse-over" help.

  • Miniwindows can be resized and moved as desired.

  • Miniwindows can be drawn transparently, so that they can have holes in them, wherever the transparent colour appears.

  • Miniwindows can have any number of "hotspots" which are rectangular areas which react to mouse-over, mouse-down, and mouse-up events. Each hotspot has a "hotspot ID" which identifies it. Hotspot IDs are case-sensitive. Hotspots can optionally show "hover-over" text (eg. hints) to show what they are used for.




See Also ...

Functions

FNC_GetDeviceCaps GetDeviceCaps (Gets screen device capabilities)
FNC_SetCursor SetCursor (Changes the shape of the mouse cursor)
FNC_TextRectangle TextRectangle (Specifies the size of the rectangle in which text is displayed in the output window.)
FNC_WindowAddHotspot WindowAddHotspot (Adds a hotspot to a miniwindow)
FNC_WindowArc WindowArc (Draws an arc in a miniwindow)
FNC_WindowBezier WindowBezier (Draws a Bézier curve in a miniwindow)
FNC_WindowBlendImage WindowBlendImage (Blends an image into a miniwindow, using a specified blending mode)
FNC_WindowCircleOp WindowCircleOp (Draws ellipses, filled rectangles, round rectangles, chords, pies in a miniwindow)
FNC_WindowCreate WindowCreate (Creates a miniwindow)
FNC_WindowCreateImage WindowCreateImage (Creates an image in a miniwindow)
FNC_WindowDelete WindowDelete (Deletes a miniwindow)
FNC_WindowDeleteAllHotspots WindowDeleteAllHotspots (Deletes all hotspots from a miniwindow)
FNC_WindowDeleteHotspot WindowDeleteHotspot (Deletes a hotspot from a miniwindow)
FNC_WindowDragHandler WindowDragHandler (Adds a drag handler to a miniwindow hotspot)
FNC_WindowDrawImage WindowDrawImage (Draws an image into a miniwindow)
FNC_WindowDrawImageAlpha WindowDrawImageAlpha (Draws an image into a miniwindow respecting the alpha channel)
FNC_WindowFilter WindowFilter (Performs a filtering operation over part of the miniwindow.)
FNC_WindowFont WindowFont (Loads a font into a miniwindow)
FNC_WindowFontInfo WindowFontInfo (Returns information about a font)
FNC_WindowFontList WindowFontList (Lists all fonts loaded into a miniwindow)
FNC_WindowGetPixel WindowGetPixel (Gets the colour of a single pixel in a miniwindow)
FNC_WindowGradient WindowGradient (Draws a gradient in a rectangle)
FNC_WindowHotspotInfo WindowHotspotInfo (Returns information about a hotspot)
FNC_WindowHotspotList WindowHotspotList (Lists all hotspots installed into a miniwindow)
FNC_WindowHotspotTooltip WindowHotspotTooltip (Changes the tooltip text for a hotspot in a miniwindow)
FNC_WindowImageFromWindow WindowImageFromWindow (Creates an image from another miniwindow)
FNC_WindowImageInfo WindowImageInfo (Returns information about an image)
FNC_WindowImageList WindowImageList (Lists all images installed into a miniwindow)
FNC_WindowImageOp WindowImageOp (Draws an ellipse, rectangle or round rectangle, filled with an image)
FNC_WindowInfo WindowInfo (Returns information about a miniwindow)
FNC_WindowLine WindowLine (Draws a line in a miniwindow)
FNC_WindowList WindowList (Lists all miniwindows)
FNC_WindowLoadImage WindowLoadImage (Loads an image into a miniwindow from a disk file)
FNC_WindowMenu WindowMenu (Creates a pop-up menu inside a miniwindow)
FNC_WindowMergeImageAlpha WindowMergeImageAlpha (Merges an image into a miniwindow based on an alpha mask)
FNC_WindowPolygon WindowPolygon (Draws a polygon in a miniwindow)
FNC_WindowPosition WindowPosition (Moves a miniwindow)
FNC_WindowRectOp WindowRectOp (Draws a rectangle in a miniwindow)
FNC_WindowSetPixel WindowSetPixel (Sets a single pixel in a miniwindow to the specified colour)
FNC_WindowShow WindowShow (Shows or hides a miniwindow)
FNC_WindowText WindowText (Draws text into a miniwindow)
FNC_WindowTextWidth WindowTextWidth (Calculates the width of text in a miniwindow)
FNC_WindowWrite WindowWrite (Writes the contents of a miniwindow to disk as a graphics file)

(Help topic: general=miniwindows)

DOC_contents Documentation contents page