Thread Tools Display Modes
10-25-17, 11:44 AM   #1
CC_WOW
A Deviate Faerie Dragon
 
CC_WOW's Avatar
AddOn Author - Click to view addons
Join Date: Nov 2016
Posts: 19
Originally Posted by Resike View Post
If you still need help, give me your code, i'll pixel-perfect it, then you can see how it's done.
Thanks, I only have one small issue that I couldn't figure out myself. I'll look into it once I have time, since I managed to get the frames fixed that I created myself it shouldn't be impossible to fix those that AceGUI created...
  Reply With Quote
10-17-17, 02:26 PM   #2
myrroddin
A Pyroguard Emberseer
 
myrroddin's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2008
Posts: 1,246
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
10-17-17, 03:03 PM   #3
Resike
A Pyroguard Emberseer
AddOn Author - Click to view addons
Join Date: Mar 2010
Posts: 1,290
Originally Posted by myrroddin View Post
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.
1. It's two different table.
2. Adding math.round to the global table is not much of a risk since it should be present there. It's a good question why the hell it's not present by default?
3. I didn't use any SetHeight.
4. Yes, but if i want to access those values it better to keep this way. I personally don't use SetBackdrop at all, i use custom borders but that would be too much garbage code here.
5. Copy paste.
6. I need to get the scale every time the frames size is changed since it's get generated from the (current size / base size) formula.
  Reply With Quote
10-17-17, 06:16 PM   #4
myrroddin
A Pyroguard Emberseer
 
myrroddin's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2008
Posts: 1,246
Originally Posted by Resike View Post
1. It's two different table.
2. Adding math.round to the global table is not much of a risk since it should be present there. It's a good question why the hell it's not present by default?
3. I didn't use any SetHeight.
4. Yes, but if i want to access those values it better to keep this way. I personally don't use SetBackdrop at all, i use custom borders but that would be too much garbage code here.
5. Copy paste.
6. I need to get the scale every time the frames size is changed since it's get generated from the (current size / base size) formula.
  1. I'll have to study your code to see why. That's for later.
  2. Maybe math.round should be, but it isn't and there are way too many ways to accomplish rounding. If I use a global version that is different than yours, there could be conflicts.
  3. Oops, I misread some lines, sorry!
  4. Ah, okay.
  5. Ditto okay.
  Reply With Quote

WoWInterface » Developer Discussions » Graphics Help » What parts of an addon's GUI should be "pixel perfect"?


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off