Hide Elements When Player is Active
Learn to use a logic block to hide elements when the player is active. You use a timer that has a logic block by default.
-
Open the Skin Editor.
-
Add an element. A Text Box, for example.
-
Select the Timer element in the Toolbar.
-
In the Canvas, drag around the Text Box. The Text Box will become a child of the Timer.
-
In the Timer properties, open the Timer panel and select Player inactive for Type.
-
In the Appearance panel, notice that the arrows next to Visible are orange. This means there is already a Logic Block applied. Click on the orange arrows.
The Logic Block Settings opens and describes that if the timer is not (Value is false) active (Trigger is Active), the timer (and all of its child elements) won’t be visible. This is an expression with one condition.
We just need to make one adjustment to the expression. Change the value from false to True. Now it expresses, if the player is inactive (meaning, no user interaction) and therefore the active trigger of the Timer is true, then the Timer and all its children are invisible. Then, after 5 seconds (the timeout set in the Timer properties) the Timer becomes inactive and the Logic Block falls back to the default value of Visible = true.
Click OK to close the settings.
-
Use Live View to see it in action. When you spin or interact within the player, the text box will hide and when you stop interacting, the text box will appear again.
-
Save the skin.