GuiGetFont

From Multi Theft Auto: Wiki
Revision as of 12:39, 28 November 2007 by IJs (talk | contribs) (New page: {{Client function}} __NOTOC__ <!-- Describe in plain english what this function does. Don't go into details, just give an overview --> This function is used to get the current font that is...)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

This function is used to get the current font that is used to draw text in GUI elements.

Syntax

string guiGetFont ( element guiElement )

Required Arguments

  • guiElement: element you wish to get the font of.

Returns

Returns a string containing the element's current font, or false if the gui element passed to the function is invalid.

Example

This example sets and gets the font of a pre-made gui element and outputs it to chat box.

-- We create a dummy gui label to get text of
local dummyGUIElement = guiCreateLabel ( 0.45, 0.48, 0.10, 0.04, "Hello world", true )
guiSetFont ( dummyGUIElement, "sa-gothic" )
-- Output the font of the label to chat box
outputChatBox ( "Font used in the GUI label: " .. guiGetFont ( dummyGuiElement ) )

See Also

General functions

Browsers

Buttons

Checkboxes

Comboboxes

Edit Boxes

Gridlists

Memos

Progressbars

Radio Buttons

Scrollbars

Scrollpanes

Static Images

Tab Panels

Tabs

Text Labels

Windows