User Tools

Site Tools


script:ui_event:setsize

setSize

  • Parameters & Types:
    • playerid: number player ID
    • uiid: string the UIID of the custom UI
    • elementid: the UIID of the string element
    • width: the width of the number component
    • height: the height of the number component
  • Return value and type:
    • ErrorCode. OK
  • The main purpose of this method is to set the component size
  • Specific use cases are as follows:
--This function is executed when the player clicks on the block
local function clickblock(event)
    local playerid=event.eventobjid--Click on the player's mini number of the block
    local uiid="6986982063319417057"--Interface ID
    local elementid="6986982063319417057_3"--Component ID
    local width,height=500,200--Set the width and height of the component
    --Sets the size of the player's component
    Customui:setSize(playerid, uiid, elementid, width, height)
end
ScriptSupportEvent:registerEvent([=[Player.ClickBlock]=], clickblock)
script/ui_event/setsize.txt · Last modified: 2024/06/11 02:24 by don