ScriptSupportEvent:registerEvent([[EventName]],callbackFunctionName)
local function Button_Click (event) local playerid,ElementID = e.eventobjid,e.uielement end ScriptSupportEvent:registerEvent([[UI.Button.Click]],Button_Click)
| EventName | Parameters | Descriptionn |
|---|---|---|
| UI.Button.Click | eventobjid,CustomUI,uielement | Any UI buttons release |
| UI.Button.TouchBegin | eventobjid,CustomUI,uielement | Any UI buttons start to press |
| UI.Hide | eventobjid,CustomUI | Any UI closed |
| UI.LostFocus | eventobjid,CustomUI,uielement,content | Any input area loses focus |
| UI.Show | eventobjid,CustomUI | Any UI opened |
This API can be called from a global script.
| Class:apiName | Return | Descriptionn |
|---|---|---|
| Player:openUIView | ErrorCode.OK | Open the specified UI for the player. |
| Player:hideUIView | ErrorCode.OK | Hide the UI for the player. |
This API can be called from a local script within the CustomUI page.(All APIs below need to call from customui script, it won't work on global script.)
| Class:apiName | Return | Descriptionn |
|---|---|---|
| Customui:setText | ErrorCode.OK | Set the display content of the player's text component |
| Customui:setTexture | ErrorCode.OK | Sets the pattern of the player's image component |
| Customui:setSize | ErrorCode.OK | Sets the size of the player's component |
| Customui:setFontSize | ErrorCode.OK | Sets the font size of the player's text component |
| Customui:setColor | ErrorCode.OK | Set the player's component color |
| Customui:showElement | ErrorCode.OK | Show component to player |
| Customui:hideElement | ErrorCode.OK | Hide component to player |
| Customui:rotateElement | ErrorCode.OK | Rotate the component against the player |
| Customui:setState | ErrorCode.OK | Toggle the player's page status |
| Customui:setAlpha | ErrorCode.OK | Set component opacity |
| Customui:setPosition | ErrorCode.OK | Set component position |
| Customui:getItemIcon | ErrorCode.OK, iconid:number(props) | Get the iconID of the prop type icon |
| Customui:getMonsterObjIcon | ErrorCode.OK, iconid:Creature iconID | Get creature icon iconID |
| Customui:getMonsterIcon | ErrorCode.OK, iconid:Creature type iconID | Get the creature type iconID |
| Customui:getStatusIcon | ErrorCode.OK, iconid:Buff iconID | Get the status type iconID |
| Customui:getBlockIcon | ErrorCode.OK, iconid:Block iconID | Get the block type iconID |
| Customui:getRoleIcon | ErrorCode.OK, iconid:Role iconID | Get the character type iconID |
| Customui:getShuctIcon | ErrorCode.OK, iconid:Role iconID | Get the shortcut bar(ix) prop iconID |
| Customui:SmoothMoveTo | ErrorCode.OK | Smoothly move the component to the specified position |
| Customui:SmoothMoveBy | ErrorCode.OK | Smooth movement of components relative to distance |
| Customui:SmoothScaleTo | ErrorCode.OK | Smoothly change the component to the specified width and height |
| Customui:SmoothScaleBy | ErrorCode.OK | Smoothly change the relative width and height of the component |
| Customui:SmoothRotateTo | ErrorCode.OK | Smoothly rotate the component to a specified angle |
| Customui:SmoothRotateBy | ErrorCode.OK | Smooth rotation of components to relative angles |
| Customui:PlayElementAnim | ErrorCode.OK | Start component animation(animid) |
| Customui:StopAnim | ErrorCode.OK | Stop animation of the component |