GuiLabelGetColor

From Multi Theft Auto: Wiki
Revision as of 20:45, 20 September 2012 by Jaysds1 (talk | contribs)
Jump to navigation Jump to search

ADDED/UPDATED IN VERSION 1.3.1 r4670:

This function gets the color of a label.

Syntax

int int int guiLabelGetColor ( gui-element theLabel )

Required Arguments

  • theLabel: The label to get color.

Returns

Returns three int values, representing the amount of red, green, blue if successful. false otherwise.

Example

This example creates a label in the center of the screen and sets the color, then outputs the color.

local label = guiCreateLabel(0,0,10,10,"LABEL COLOR!!!",false)
guiLabelSetColor ( label, math.random(0, 255), math.random(0, 255), math.random(0, 255) )
local r,g,b = guiLabelGetColor ( label )
outputChatBox("The label color is R:"..r.." G:"..g.." B:"..b.." .")
setTImer(destroyElement,10000,1,label)

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