generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripters
Home Search
 

Re: Help simulating the macbook "Magnify" effect

Previous Thread :: Next Thread 
fishguy100 is not online. fishguy100
Joined: 16 Feb 2013
Total Posts: 3679
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
darkstriken is not online. darkstriken
Joined: 23 Oct 2010
Total Posts: 376
27 Sep 2015 10:34 AM
I don't really understand the question can you be more specific?
Report Abuse
fishguy100 is not online. fishguy100
Joined: 16 Feb 2013
Total Posts: 3679
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
darkstriken is not online. darkstriken
Joined: 23 Oct 2010
Total Posts: 376
27 Sep 2015 10:38 AM
the mouse size?
Report Abuse
fishguy100 is not online. fishguy100
Joined: 16 Feb 2013
Total Posts: 3679
27 Sep 2015 10:38 AM
Perhaps you dont understand. Look into the magnify effect on macs then get back to me.
Report Abuse
darkstriken is not online. darkstriken
Joined: 23 Oct 2010
Total Posts: 376
27 Sep 2015 10:39 AM
I have actually used Macs I just do not get what you mean
Report Abuse
fishguy100 is not online. fishguy100
Joined: 16 Feb 2013
Total Posts: 3679
27 Sep 2015 03:19 PM
Basically, the icons resize with respect to the mouse. Does anybody know?
Report Abuse
darkstriken is not online. darkstriken
Joined: 23 Oct 2010
Total Posts: 376
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 is not online. rayk999
Joined: 18 Feb 2011
Total Posts: 4705
27 Sep 2015 03:23 PM
lol


Red Blossoms
Report Abuse
fishguy100 is not online. fishguy100
Joined: 16 Feb 2013
Total Posts: 3679
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
darkstriken is not online. darkstriken
Joined: 23 Oct 2010
Total Posts: 376
27 Sep 2015 03:24 PM
what do you mean respect to the mouse
Report Abuse
fishguy100 is not online. fishguy100
Joined: 16 Feb 2013
Total Posts: 3679
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
darkstriken is not online. darkstriken
Joined: 23 Oct 2010
Total Posts: 376
27 Sep 2015 03:26 PM
use mouse enter
Report Abuse
membra is not online. 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
fishguy100 is not online. fishguy100
Joined: 16 Feb 2013
Total Posts: 3679
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
darkstriken is not online. darkstriken
Joined: 23 Oct 2010
Total Posts: 376
27 Sep 2015 03:27 PM
oh, so base d on the distance?
Report Abuse
rayk999 is not online. 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
fishguy100 is not online. fishguy100
Joined: 16 Feb 2013
Total Posts: 3679
27 Sep 2015 03:30 PM
@fark Yes I guess
Report Abuse
darkstriken is not online. darkstriken
Joined: 23 Oct 2010
Total Posts: 376
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
fishguy100 is not online. fishguy100
Joined: 16 Feb 2013
Total Posts: 3679
27 Sep 2015 03:31 PM
@dark that would not work well
Report Abuse
darkstriken is not online. darkstriken
Joined: 23 Oct 2010
Total Posts: 376
27 Sep 2015 03:31 PM
not mouse hunter I meant mouse enter
Report Abuse
rayk999 is not online. rayk999
Joined: 18 Feb 2011
Total Posts: 4705
27 Sep 2015 03:32 PM
easier said than done


Red Blossoms
Report Abuse
fishguy100 is not online. fishguy100
Joined: 16 Feb 2013
Total Posts: 3679
27 Sep 2015 03:32 PM
I knew what you meant but it wouldn't work well.
Report Abuse
darkstriken is not online. darkstriken
Joined: 23 Oct 2010
Total Posts: 376
27 Sep 2015 03:32 PM
Man I hate voice recognition
Report Abuse
fishguy100 is not online. fishguy100
Joined: 16 Feb 2013
Total Posts: 3679
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
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image