PL/guiSetFont

From Multi Theft Auto: Wiki
Revision as of 15:52, 10 October 2016 by ThePiotrek (talk | contribs) (ThePiotrek moved page PL/GuiSetFont to PL/guiSetFont)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

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