Difference between revisions of "EVENT TYPE POPUP RESULT"

From Dragon Age Toolset Wiki
Jump to: navigation, search
(split off of event)
 
m (Adding a category)
 
(8 intermediate revisions by 3 users not shown)
Line 1: Line 1:
*<b>Sent When:</b> player responds to area transition prompt.
+
{{event
*<b>Sent From:</b>
+
|sourcefile  = script.ldf
*<b>Sent To:</b> module
+
|when        = player responds to popup message box
 
+
|from        = engine
Parameters:
+
|to          = module
 
+
|tocategory1 = GUI
*object oOwner = GetEventObject(ev, 0);      // owner of popup
+
|tocategory2 = module
*int nPopupID = GetEventInteger(ev, 0);    // popup ID
+
|sortkey    = POPUP_RESULT
*int nButton   = GetEventInteger(ev, 1);    // button result (1 - 4)
+
|object0name = oOwner
*string sInput = GetEventString(ev,0);      // string entered into optional text field
+
|object0desc = owner of popup
 
+
|int0name    = nPopupID
Calling the "[[ShowPopup]]" script function causes a popup window to be displayed to the user, with up to four buttons whose text is defined in the "popups" 2DA and up to one text input field (with a filter on the input the player can type there that's the same as the filter on player names - up to 20 characters, no spaces, limited punctuation, no empty strings). This event is generated and sent to the module script with the popup's result.
+
|int0desc    = popup ID (references a row in [[popups 2da]])
 
+
|int1name    = nButton
[[Category:Event types|POPUP_RESULT]]
+
|int1desc    = button result (1 - 4)
 +
|string0name = sInput
 +
|string0desc = string entered into optional text field
 +
|creatorname = oPlayer
 +
|creatordesc = the player
 +
}}
 +
== Remarks ==
 +
Calling the [[ShowPopup]] script function causes a popup message box to be displayed to the user. The message box can have up four buttons (defined in the [[popups 2da]]) and a text input field. This event is generated when the Player clicks on one of the buttons and is sent to the module script with the popup's result.

Latest revision as of 00:30, 11 February 2013

Source:
script.ldf
Sent when:
player responds to popup message box
Sent from:
engine
Sent to:
module
Parameters:
  • Creator: the player
  • Integer 0: popup ID (references a row in popups 2da)
  • Integer 1: button result (1 - 4)
  • String 0: string entered into optional text field
  • Object 0: owner of popup

Usage

case EVENT_TYPE_POPUP_RESULT:
{
object oPlayer = GetEventCreator(ev); // the player
int nPopupID = GetEventInteger(ev, 0); // popup ID (references a row in popups 2da)
int nButton = GetEventInteger(ev, 1); // button result (1 - 4)
string sInput = GetEventString(ev, 0); // string entered into optional text field
object oOwner = GetEventObject(ev, 0); // owner of popup

// insert event-handling code here

break;
}

Remarks

Calling the ShowPopup script function causes a popup message box to be displayed to the user. The message box can have up four buttons (defined in the popups 2da) and a text input field. This event is generated when the Player clicks on one of the buttons and is sent to the module script with the popup's result.