@@ -31,15 +31,16 @@ A modal form contains a title, a text display, and two buttons.
3131 - If the return value is ` Null ` , it means the sending failed.
3232
3333Parameter ` callback ` The callback function prototype: ` function(player,result,reason) `
34+
3435- player : ` Player `
35- The player object that interacts with the form.
36+ The player object that interacts with the form.
3637- result : ` Boolean `
37- Player clicks ** Confirm** button is ` true ` , ** Cancel** button is ` false ` .
38- If the id is ` Null ` , the player cancels the form.
39- - reason : ` Integer `
40- The reason why the form is closed.
41- 0 = UserClosed, 1 = UserBusy
42- The reason may be ` null ` .
38+ Player clicks ** Confirm** button is ` true ` , ** Cancel** button is ` false ` .
39+ If the id is ` Null ` , the player cancels the form.
40+ - reason : ` Integer ` (Added in 0.9.0)
41+ The reason why the form is closed.
42+ 0 = UserClosed, 1 = UserBusy
43+ The reason may be ` null ` .
4344
4445### Send a Normal Form to the Player
4546
@@ -51,7 +52,6 @@ section to better accomplish this task.
5152` pl.sendSimpleForm(title,content,buttons,images,callback) `
5253
5354- Parameters:
54-
5555 - title : ` String `
5656 Form title.
5757 - content : ` String `
@@ -67,15 +67,16 @@ section to better accomplish this task.
6767 - If the return value is ` Null ` , it means the sending failed.
6868
6969Parameter ` callback ` The callback function prototype: ` function(player,id,reason) `
70+
7071- player : ` Player `
71- The player object that interacts with the form.
72+ The player object that interacts with the form.
7273- id : ` Integer `
73- The serial number of the form button that the player clicked, starting from 0.
74- If the id is ` Null ` , the player cancels the form.
75- - reason : ` Integer `
76- The reason why the form is closed.
77- 0 = UserClosed, 1 = UserBusy
78- The reason may be ` null ` .
74+ The serial number of the form button that the player clicked, starting from 0.
75+ If the id is ` Null ` , the player cancels the form.
76+ - reason : ` Integer ` (Added in 0.9.0)
77+ The reason why the form is closed.
78+ 0 = UserClosed, 1 = UserBusy
79+ The reason may be ` null ` .
7980
8081Use the texture pack path or URL ` images ` to identify the icon corresponding to the button.
8182For each button on the form, set the corresponding icon as follows:
@@ -102,15 +103,16 @@ next section to better accomplish this task.
102103 - If the return value is Null, it means the sending failed.
103104
104105Parameter ` callback ` The callback function prototype: ` function(player,data) `
106+
105107- player : ` Player `
106- The player object that interacts with the form.
108+ The player object that interacts with the form.
107109- data : ` Array<...> `
108- The returned form content array.
109- In the array, the first item must be ` Null ` , starting from the second item, the content of each control is stored
110- in
111- the order of the controls on the form.
112- If data is only ` Null ` , the player cancels the form.
113- - reason : ` Integer `
114- The reason why the form is closed.
115- 0 = UserClosed, 1 = UserBusy
116- The reason may be ` null ` .
110+ The returned form content array.
111+ In the array, the first item must be ` Null ` , starting from the second item, the content of each control is stored
112+ in
113+ the order of the controls on the form.
114+ If data is only ` Null ` , the player cancels the form.
115+ - reason : ` Integer ` (Added in 0.9.0)
116+ The reason why the form is closed.
117+ 0 = UserClosed, 1 = UserBusy
118+ The reason may be ` null ` .
0 commit comments