GUI Label functions and properties

From AGS wiki

Jump to: navigation, search
This article is an entry in the AGS Manual.
Please do not edit this entry except to wikify it, or keep it up-to-date with the manual or current AGS version. Instead you can discuss this article here.
This page was last modified 29 January 2008, and could be out of date with the current AGS version. If you see a page is out of date, please update it!

Owning entry: Scripting

 

Contents

Label.BringToFront

Label.BringToFront is inherited from GUIControl.BringToFront.

Label.Clickable

Label.Clickable is inherited from GUIControl.Clickable.

Label.Enabled

Label.Enabled is inherited from GUIControl.Enabled.

Label.Font

(Formerly known as SetLabelFont, which is now obsolete)

FontType Label.Font;

Gets/sets the font used to display the label's text. This is useful if you have a standard SCI font for your English version, but want to change to a TTF font for foreign language versions.

Example:

 if (IsTranslationAvailable()) {
   lblStatus.Font = 2;
 }

will change label 'lblStatus' to use font 2 if a game translation is in use.

See Also: IsTranslationAvailable, Label.Text, TextBox.Font

Label.Height

Label.Height is inherited from GUIControl.Height.

Label.ID

Label.ID is inherited from GUIControl.ID.

Label.OwningGUI

Label.OwningGUI is inherited from GUIControl.OwningGUI.

Label.SendToBack

Label.SendToBack is inherited from GUIControl.SendToBack.

Label.SetPosition

Label.SetPosition is inherited from GUIControl.SetPosition.

Label.SetSize

Label.SetSize is inherited from GUIControl.SetSize.

Label.Text

(Formerly known as SetLabelText, which is now obsolete)

(Formerly known as Label.GetText, which is now obsolete)

(Formerly known as Label.SetText, which is now obsolete)

String Label.Text;

Gets/sets the text displayed in the specified label. This allows you to change the text during the game, for example to create a Lucasarts-style status line.

Example:

 lblStatus.Text = Game.GetLocationName(mouse.x, mouse.y);

will display the name of the location the cursor is over on label 'lblStatus'

See Also: Button.NormalGraphic, Button.Text, Label.TextColor, Label.Font

Label.TextColor

(Formerly known as SetLabelColor, which is now obsolete)

int Label.TextColor;

Gets/sets the text colour used to display the label's text.

Example:

 lblStatus.TextColor = 14;

will change label 'lblStatus' to have yellow text.

See Also: Label.Font, Label.Text

Label.Visible

Label.Visible is inherited from GUIControl.Visible.

Label.Width

Label.Width is inherited from GUIControl.Width.

Label.X

Label.X is inherited from GUIControl.X.

Label.Y

Label.Y is inherited from GUIControl.Y.

Personal tools
Advertisement