|
| 15 Nov 2014 10:07 PM |
| If you click anywhere besides on the Button, a function executes? |
|
|
| Report Abuse |
|
|
ash877
|
  |
| Joined: 18 Feb 2008 |
| Total Posts: 5142 |
|
|
| 15 Nov 2014 10:07 PM |
| Using the GetMouse() method? |
|
|
| Report Abuse |
|
|
ash877
|
  |
| Joined: 18 Feb 2008 |
| Total Posts: 5142 |
|
|
| 15 Nov 2014 10:08 PM |
| like checking if the target is a gui element or a frame? I only tested it on parts tho. |
|
|
| Report Abuse |
|
|
| |
|
|
| 15 Nov 2014 10:21 PM |
| Perhaps target only includes parts and not GUI elements. |
|
|
| Report Abuse |
|
|
|
| 15 Nov 2014 10:37 PM |
| Is there a more efficient method available? |
|
|
| Report Abuse |
|
|
| |
|
eLunate
|
  |
| Joined: 29 Jul 2014 |
| Total Posts: 13268 |
|
|
| 16 Nov 2014 08:29 AM |
What do you mean? If you use GetMouse, you can track entry/exit of buttons. This means, fortunately, that you can get the Mouse1Down event, and check if the mouse is still in any buttons hehe |
|
|
| Report Abuse |
|
|
|
| 16 Nov 2014 08:45 AM |
I tried it with target and it works except for when I click another button. Then it doesn't do anything.
|
|
|
| Report Abuse |
|
|
eLunate
|
  |
| Joined: 29 Jul 2014 |
| Total Posts: 13268 |
|
|
| 16 Nov 2014 08:49 AM |
| I never suggested to use Terget, so you know my solution is still avaliable :3 |
|
|
| Report Abuse |
|
|
|
| 16 Nov 2014 09:01 AM |
| Sorry. What is the event or property name? I cannot find it in object browser. |
|
|
| Report Abuse |
|
|
eLunate
|
  |
| Joined: 29 Jul 2014 |
| Total Posts: 13268 |
|
|
| 16 Nov 2014 09:09 AM |
| http://wiki.roblox.com/index.php?title=API:Class/Mouse/Button1Down |
|
|
| Report Abuse |
|
|
|
| 16 Nov 2014 09:15 AM |
| I know that much; I don't know how you'd find if the mouse is in a GUI. Is it a parameter? |
|
|
| Report Abuse |
|
|
eLunate
|
  |
| Joined: 29 Jul 2014 |
| Total Posts: 13268 |
|
|
| 16 Nov 2014 09:21 AM |
Nah. When the mouse goes inside a button, track it. When it goes out, stop tracking. If the mouse is being tracked by a button when Mouse1 is down, then you can suppose that it's on the button. Otherwise, it's not on the button.
|
|
|
| Report Abuse |
|
|
|
| 16 Nov 2014 10:10 AM |
"When the mouse goes inside a button, track it." But how do I know when the mouse is inside a GUI? |
|
|
| Report Abuse |
|
|
eLunate
|
  |
| Joined: 29 Jul 2014 |
| Total Posts: 13268 |
|
|
| 16 Nov 2014 10:17 AM |
| It's an event for the GUI element, I'm sure. |
|
|
| Report Abuse |
|
|
|
| 16 Nov 2014 10:18 AM |
Gah, MouseEnter. You're right; I was looking under mouse. thx |
|
|
| Report Abuse |
|
|