NWN2Wiki
Register
Advertisement

DisplayInputBox is a new script function announced by Obsidian. It will pop up a dialog box for a player to enter text. [1] When used, the player can still interact with the game normally -- much like any other GUI panel, such as the character sheet. The value input is passed back as a string parameter. [2]

Prototype[]

[3]

//PEH-OEI 05/24/06
//This script function displays a text input box popup on the client of the
//player passed in as the first parameter.
//////
// oPC           - The player object of the player to show this message box to
// nMessageStrRef- The STRREF for the Message Box message. 
// sMessage      - The text to display in the message box. Overrides anything 
//               - indicated by the nMessageStrRef
// sOkCB         - The callback script to call if the user clicks OK, defaults
//               - to none. The script name MUST start with 'gui'
// sCancelCB     - The callback script to call if the user clicks Cancel, defaults
//               - to none. The script name MUST start with 'gui'
// bShowCancel   - If TRUE, Cancel Button will appear on the message box.
// sScreenName   - The GUI SCREEN NAME to use in place of the default message box.
//               - The default is SCREEN_STRINGINPUT_MESSAGEBOX 
// nOkStrRef     - The STRREF to display in the OK button, defaults to OK
// sOkString     - The string to show in the OK button. Overrides anything that
//               - nOkStrRef indicates if it is not an empty string
// nCancelStrRef - The STRREF to dispaly in the Cancel button, defaults to Cancel.
// sCancelString - The string to display in the Cancel button. Overrides anything
//				 - that nCancelStrRef indicates if it is anything besides empty string
// sDefaultString- The text that gets copied into the input area,
//				 - used as a default answer
void DisplayInputBox( object oPC, int nMessageStrRef,
						string sMessage, string sOkCB="", 
                        string sCancelCB="", int bShowCancel=FALSE, 
                        string sScreenName="",
                        int nOkStrRef=0, string sOkString="",
                        int nCancelStrRef=0, string sCancelString="",
                        string sDefaultString="", string sUnusedString="" );
Advertisement