View Single Post
10-17-17, 02:26 PM   #18
myrroddin
A Pyroguard Emberseer
 
myrroddin's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2008
Posts: 1,240
I will look more in depth later, but I can tell you that line 3 is not needed, as you already have the table as the second return from line 1.

Also since math.round does not exist normally, that should be a local variable; otherwise you run the risk of someone else doing something similar and cross-polluting each other.

Next you use SetSize, but you also use SetHeight and SetWidth. Use either SetSize or both SetHeight/SetWdith, not both.

frame.backdrop can be just local backdrop = blah.

Why are you securely hooking StopMovingOrSizing? I'm pretty certain you can use a normal hook for that, although you will have to exit out on InCombatLockdown().

Getting the scale on line 154 is all right, but you do not need to get the return every time the frame is resized. The scale will always be the scale. Move that line into your main chunk. You can apply the scale when the frame is resized, however.

There are possibly other things but that is at a glance.

Last edited by myrroddin : 10-17-17 at 02:30 PM. Reason: wrong API, oops.
  Reply With Quote