|
| 27 Sep 2015 10:31 AM |
I am making icons and I want it to use the magnify effect that macbooks have.
This is what I have so far:
--Children[I]:TweenSizeAndPosition(Children[I].Size + UDim2.new(0,5,0,5),Children[I].Position - UDim2.new(0,0,0,10),"Out","Linear",TweenTime);
--\\ Tables local Icon_List = {}
--\\ Variables local self = script.Parent; local Taskbar = self:WaitForChild("Taskbar"); local Icons = Taskbar:WaitForChild("Icons"); local Zoomed = false; --\\ Constants local GUIY = Icons:WaitForChild("CashButton").AbsolutePosition.Y
--\\ Configurable Variables local TweenTime = .05
--\\ PlayerMouse local Mouse = game:GetService("Players").LocalPlayer:GetMouse()
--\\ Main Code
local Children = Icons:GetChildren();
for I = 1,#Children do table.insert(Icon_List,{ Children[I], Children[I].AbsolutePosition.X, Children[I].Size, Children[I].Position }); end;
Mouse.Move:connect(function() local Y = Mouse.Y local X = Mouse.X if math.abs(GUIY - Mouse.Y) < 36 then if not Zoomed then end; end; end);
How would I do the math to re-size the icons according to the mouse? |
|
|
| Report Abuse |
|
|
|
| 27 Sep 2015 10:34 AM |
| I don't really understand the question can you be more specific? |
|
|
| Report Abuse |
|
|
|
| 27 Sep 2015 10:37 AM |
| Basically, the magnify effect is where the icons re-size with respect to the mouse. The magnify effect is an effect that is optional in all macs. I am not looking for it to re-size when the mouse hovers over it. I am looking for it to re-size with respect to the mouse. |
|
|
| Report Abuse |
|
|
| |
|
|
| 27 Sep 2015 10:38 AM |
| Perhaps you dont understand. Look into the magnify effect on macs then get back to me. |
|
|
| Report Abuse |
|
|
|
| 27 Sep 2015 10:39 AM |
| I have actually used Macs I just do not get what you mean |
|
|
| Report Abuse |
|
|
|
| 27 Sep 2015 03:19 PM |
| Basically, the icons resize with respect to the mouse. Does anybody know? |
|
|
| Report Abuse |
|
|
|
| 27 Sep 2015 03:21 PM |
| I do not think you can get the size of the mouse. if you could I would help you after you get the size of their mouse. |
|
|
| Report Abuse |
|
|
rayk999
|
  |
| Joined: 18 Feb 2011 |
| Total Posts: 4705 |
|
| |
|
|
| 27 Sep 2015 03:23 PM |
| I am not trying to get the size of the mouse! I am trying to re-size the icons with respect TO the mouse. |
|
|
| Report Abuse |
|
|
|
| 27 Sep 2015 03:24 PM |
| what do you mean respect to the mouse |
|
|
| Report Abuse |
|
|
|
| 27 Sep 2015 03:25 PM |
| According to the mouse. Move your mouse on icons on a mac and you'll see what I want. |
|
|
| Report Abuse |
|
|
| |
|
membra
|
  |
| Joined: 14 Oct 2008 |
| Total Posts: 6313 |
|
|
| 27 Sep 2015 03:26 PM |
The icon magnification on the MacBooks dock?
[As edgy as a rhombicosidodecahedron] |
|
|
| Report Abuse |
|
|
|
| 27 Sep 2015 03:27 PM |
@membra Yes
@Dark But I don't want it to re-size JUST when my mouse touches it. I want it to re-size with respect to the mouse. |
|
|
| Report Abuse |
|
|
|
| 27 Sep 2015 03:27 PM |
| oh, so base d on the distance? |
|
|
| Report Abuse |
|
|
rayk999
|
  |
| Joined: 18 Feb 2011 |
| Total Posts: 4705 |
|
|
| 27 Sep 2015 03:29 PM |
The degree of magnification would be based on how close the X position of the mouse relative to the icon's center. If it were precisely on the center, the icon would be magnified to the fullest, as it grows further away, it'll magnify it less. This also has to affect the surrounding icons, not as much, but still enough
Red Blossoms |
|
|
| Report Abuse |
|
|
| |
|
|
| 27 Sep 2015 03:30 PM |
| oh I see now just use mouse hunter and I'll sleeve and while the mouse is in there making a loop and based off how far away the position of the mouses is resize the icon using tween size |
|
|
| Report Abuse |
|
|
|
| 27 Sep 2015 03:31 PM |
| @dark that would not work well |
|
|
| Report Abuse |
|
|
|
| 27 Sep 2015 03:31 PM |
| not mouse hunter I meant mouse enter |
|
|
| Report Abuse |
|
|
rayk999
|
  |
| Joined: 18 Feb 2011 |
| Total Posts: 4705 |
|
|
| 27 Sep 2015 03:32 PM |
easier said than done
Red Blossoms |
|
|
| Report Abuse |
|
|
|
| 27 Sep 2015 03:32 PM |
| I knew what you meant but it wouldn't work well. |
|
|
| Report Abuse |
|
|
|
| 27 Sep 2015 03:32 PM |
| Man I hate voice recognition |
|
|
| Report Abuse |
|
|
|
| 27 Sep 2015 03:34 PM |
| Please don't post unless you know how to re-size them with respect to the mouse. |
|
|
| Report Abuse |
|
|