- Home /
Gui label and gui button
Hi guys.I did gui button that have icon.Now I want to if mouse enter button gui label be visible.But if mouse exit button gui label be not appear.Thank you in advance.
Comment
Answer by poncho · Jan 31, 2014 at 03:28 PM
you will need to have a bool activated if the mouseposition is in the rectangle of the button
bool isAboveButton = false;
if(GUI.Button(yourRect,"your button",youicon.png))
{
}
if( inside(input.mouseposition, yourRect) ) // note inside as your function to x and y will be between x and x+width, y and y+height
{
isAboveButton = true;
}
if(isAboveButton)
{
GUI.Label(...
}
Your answer
Follow this Question
Related Questions
GUI Scripting button controls 1 Answer
GUI.Label positioning for many device resolutions 1 Answer
GUI, making main page lead into an instructions page 2 Answers
Creating a component from a button click 1 Answer
GuiMatrix ? 1 Answer