HideGUIText

Definition

HideGUIText(string GUIName, string textName)

Description

This function hides the text textName that belongs to the GUI GUIName.

Parameters

GUIName
Specifies the GUI name. You can also use the name “this” for this parameter. In this case, the name “this” refers to the GUI to which the text textName belongs.

textName
Specifies the text name that belongs to the GUI GUIName.

Example 1

function OnTriggerEnter(otherActorName)
    HideGUIText("gui_SampleGUI17_MainMenuAbout""text1")
end

function OnTriggerStay(otherActorName)

end

function OnTriggerExit(otherActorName)

end
Assume that the above script is attached to a trigger named “trigger1”. Whenever the main character or a prefab instance that has dynamic physics is entered into this trigger, the text “text1” that belongs to GUI “gui_SampleGUI17_MainMenuAbout” will be hidden.

Example 2

--Name of script is HideGUIText2.lua

function OnSelectMouseLButtonDown()
    HideGUIText("this""text1")
end

function OnSelectMouseRButtonDown()

end

function OnSelectMouseEnter()

end
Assume that the above script named HideGUIText2.lua is attached to a button named “PlayGame” that belongs to the GUI “gui_1”. Also assume that GUI “gui_1” has a text named “text1”.  In this case, “this” string in the HideGUIText function refers to the name “gui_1”. Whenever the user left clicks the “PlayGame” button, the HideGUIText function will hide the “text1” text belonging to GUI “gui_1”.
adminHideGUIText