GuiAction_SetTag

Kategorie: GUI
Ab Engineversion: 7.0 OC

Beschreibung

Action for a GUI window event such as OnClick.

Syntax

array GuiAction_SetTag(string tag, int subwindow_id, object target);

Parameter

tag:
The new tag that will be set.
subwindow_id:
ID of the subwindow of which the tag will be changed. If 0, the window containing this action will be affected.
target:
Target of the subwindow of which the tag will be changed.

Anmerkungen

Changing the tag of a window is not synchronized over network. This means that other players will not see when one player for example hovers over a menu window; if you need the tag to be set for all players, use GuiAction_Call() with GuiUpdateTag().
See the GUI documentation for further explanations.

Beispiel

var menu =
{
	BackgroundColor = 
	{
		Std = RGB(255, 0, 0),
		Hover = RGB(0, 255, 0)
	},
	OnMouseIn = GuiAction_SetTag("Hover"),
	OnMouseOut = GuiAction_SetTag("Std")
};
var menuID = GuiOpen(menu);
Defines a new GUI window that changes color when you hover over it.
Siehe auch: GUI Documentation, GuiAction_Call, GuiClose, GuiOpen, GuiUpdate, GuiUpdateTag
Zapper, 2014-10