SerweryWłasny serwerDla twórcówForumFAQDokumentacjaBezpieczeństwo
Pobierz launcher
  1. Dokumentacja
  2. Funkcje klienta
  3. guiCreateRadioButton

Funkcja

guiCreateRadioButton

Tworzy przycisk wyboru jednej opcji z grupy. Grupę tworzą przyciski z tym samym rodzicem.

Składnia

gui-radiobutton guiCreateRadioButton(float x, float y, float width, float height, string text, bool relative [, element parent = nil])

Argumenty

xfloat
Pozycja X.
yfloat
Pozycja Y.
widthfloat
Szerokość.
heightfloat
Wysokość.
textstring
Napis.
relativebool
Wartości względne.W MTA:SA opcjonalny: bool relative = false
parentelement, opcjonalny = nil
Rodzic.

Różnice względem MTA:SA

  • Argumenty zaznaczone innym kolorem różnią się od MTA:SA.

W MTA:SA

guiCreateRadioButton(float x, float y, float width, float height, string text, bool relative = false, gui-element parent = nil)

Zwraca

Przycisk wyboru.

Przykład

local win = guiCreateWindow(100, 100, 240, 150, "Pora dnia", false)
local day = guiCreateRadioButton(20, 40, 200, 24, "Dzień", false, win)
local night = guiCreateRadioButton(20, 70, 200, 24, "Noc", false, win)
guiRadioButtonSetSelected(day, true)

Zobacz też