(Formerly known as SetGUIObjectEnabled, which is now obsolete)
bool GUIControl.Enabled
Enables or disables a GUI control.
Normally, all your GUI controls (such as buttons, sliders, etc) are enabled at all times
except during a cutscene, when they are disabled. This command allows you to explicitly
disable a control at your script's discretion.
If you set this to true, the control will be enabled; set to false to disable it.
Whether you set it as enabled or not, it will always be disabled during a blocking
cutscene, along with all the other controls.
While a control is disabled, it will not respond to mouse clicks. If it is a button, its
mouseover and pushed pictures will not be shown. The control will be drawn according to
the game "When GUI Disabled" settings, as usual.
Applies To
Inherited by the Button, InvWindow, Label, ListBox, Slider and TextBox.
Example:
btnSaveGame.Enabled = false;
will disable the btnSaveGame button.
See Also: GUIControl.Clickable,
GUIControl.Visible
|