ui.createPanel

Section: UI (HUD)

Ce que fait ce membre

ui.createPanel crée un Panel dans ui. Il prend id et un objet d'options.

Signature

ui.createPanel(id, { x, y, width, height, bgColor, borderRadius })

Arguments

  • id
  • { x, y, width, height, bgColor, borderRadius }

    Clés:xywidthheightbgColorborderRadius

Exemple · engendré

function start() {  ui.createPanel('panel', { x: 100, y: 120, width: 2 });}

ui.createPanel est appelé avec des valeurs de la forme que sa signature réclame. Le code est dans start(), que l'engine appelle une fois, à l'apparition de l'entité.

13 membres dans ui