-
Notifications
You must be signed in to change notification settings - Fork 0
Label
Label is a subclass of GUIControl and therefore inherits all GUIControl's functions and properties in addition to its own, which are listed below.
(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 = eFontForeign;
}
will change label 'lblStatus' to use font "Foreign" if a game translation is in use.
See Also: IsTranslationAvailable, Label.Text, TextBox.Font
(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
HorizontalAlignment Label.TextAlignment;
Gets/sets how the text is aligned relative to the label's rectangle. Note that currently label supports only horizontal alignment which could be eAlignLeft, eAlignRight and eAlignCenter.
See Also: Standard Enumerated Types, Label.Font, Label.Text
Compatibility: Supported by AGS 3.5.0 and later versions.
(Formerly known as SetLabelColor, which is now obsolete)
int Label.TextColor;
Gets/sets the text color 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
Getting Started in AGS
Editor Reference
- Music and sound
- Distributing your game
- Backing up your game
- The text parser
- Translations
- Global variables
- Custom Properties
- Plugins
- Lip sync
- New Game templates
- Debugging features
- Auto-number speech files
- Integration with Windows
- Source Control integration
Engine
Scripting
- Scripting tutorial part 1
- Scripting tutorial part 2
- Pointers in AGS
- Calling global functions from local scripts
- The script header
- String formatting
- Multiple Scripts
- Understanding blocking scripts
- Dynamic Arrays
- Extender functions
- Game variables
- Predefined global script functions
- repeatedly_execute (_always)
- Custom dialog options rendering
- Built-in enumerated types
- Script language keywords
- AudioChannel functions and properties
- AudioClip functions and properties
- Character functions and properties
- DateTime functions and properties
- Dialog functions and properties
- DialogOptionsRenderingInfo functions and properties
- DrawingSurface functions and properties
- DynamicSprite functions and properties
- File functions and properties
- Game / Global functions
- GUI functions and properties
- GUI control functions and properties
- GUI Button functions and properties
- GUI InvWindow functions and properties
- GUI Label functions and properties
- GUI List Box functions and properties
- GUI Slider properties
- GUI Text Box functions and properties
- Hotspot functions and properties
- Inventory item functions and properties
- Maths functions and properties
- Mouse functions and properties
- Multimedia functions
- Object functions and properties
- Overlay functions and properties
- Palette functions
- Parser functions
- Region functions and properties
- Room functions
- Screen functions
- Speech functions and properties
- String functions
- System functions and properties
- Text display / Speech functions
- ViewFrame functions and properties
Working on Legacy games
Upgrading from a previous version
- Upgrading to AGS 2.7
- Upgrading to AGS 2.71
- Upgrading to AGS 3.0
- Upgrading to AGS 3.1
- Upgrading to AGS 3.2
- Upgrading to AGS 3.3
- Upgrading to AGS 3.3.5
- Upgrading to AGS 3.4
- Upgrading to AGS 3.4.1
Legal Notice
Getting in touch