PL/guiSetFont

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

Ta funkcja ustawia czcionkę elementu GUI która zostanie użyta podczas rysowania tekstu.

Składnia

bool guiSetFont ( element guiElement, mixed font )

Wymagane argumenty

  • guiElement: Element GUI którego czcionkę chcesz zmienić
  • font: Element niestandardowej [GUI font|czcionki]] lub nazwa wbudowanej czcionki. Zajrzyj na Standard GUI Font Names.

Zwracane wartości

Zwraca true jeśli poprawnie ustawiono czcionkę, w innym przypadku false

Przykład

Ten przykład ustawia i pobiera czcionkę po czym wyświetla jej nazwę na czacie.

-- tworzymy etykietę z tekstem
local dummyGUIElement = guiCreateLabel ( 0.45, 0.48, 0.10, 0.04, "Hello world", true )
guiSetFont ( dummyGUIElement, "sa-gothic" )
-- Wyświetlamy nazwę czcionki na czacie
outputChatBox ( "Czcionka użyta w etykiecie: " .. guiGetFont ( dummyGuiElement ) )

Zobacz także

General functions

Browsers

Buttons

Checkboxes

Comboboxes

Edit Boxes

Gridlists

Memos

Progressbars

Radio Buttons

Scrollbars

Scrollpanes

Static Images

Tab Panels

Tabs

Text Labels

Windows