world.WindowShow
Shows or hides a miniwindow
Prototype
long WindowShow(BSTR WindowName, BOOL Show);
Description
This shows or hides the designated window.
WindowName - the name of an existing miniwindow.
Show - true to display the window at its designated place, false to hide it.
Creating and showing windows are separate operations. This is because you may want to maintain something like an inventory list, or quest objectives, but not necessarily have space on the screen for them at a particular moment. By creating the window early on, you can draw to it (offscreen), add or remove items, and generally keep it up-to-date as events occur on the game. However when the player actually wants to see the window s/he may hit a hotkey or type an alias, which simply causes the window to be shown (or hidden).
Calling WindowShow forces a window refresh, so the screen will be updated with the new miniwindow (or absence, as the case may be).
If you have changed the miniwindow, you may not want to call WindowShow (in case they currently want it hidden). In this case you can call Redraw () instead, to cause the main output window to be redrawn, without changing the status of any miniwindows.
For more information, see:
http://www.gammon.com.au/mushclient/mw_creation.htm
Lua example
WindowShow (win, true) -- show window, refresh screen
WindowShow (win, false) -- hide window, refresh screen
Return value
eNoSuchWindow - no such miniwindow
eOK - success
Related topic
See also
| Function | Description |
|---|---|
| WindowCreate | Creates a miniwindow |
| WindowInfo | Returns information about a miniwindow |
| WindowList | Lists all miniwindows |