Thread Tools Display Modes
12-19-17, 12:27 PM   #1
gempir
A Black Drake
 
gempir's Avatar
AddOn Author - Click to view addons
Join Date: Jun 2015
Posts: 84
Upgrading oUF Layout

Hey guys.

I'm trying to update an older oUF layout from Skaarj for my personal UI. And honestly didn't expect
to come this far, the upgrade progress wasn't too hard except for one thing. (I used this guide http://www.wowinterface.com/forums/s...ad.php?t=55422)

I can't get the party frames working correctly. They throw an error everytime you hover them, except for the powerbar for some reason. The frame is interactive either except when you click the powerbar. I've looked the past 6h at the code but I'm not very familar with oUF and can't figure out what exactly is broken here.
The style doesn't seem to be the problem because even in normal Party Style they have the same issue like in Raid Style how they are now.

Here is a screenshot of the error:
https://i.imgur.com/eE0UjAf.png

And here is a look at the code:
https://github.com/gempir/gempUI/blo...ore/layout.lua

I'm assuming it's something in layout.lua, because that seems to be the "main file" auras etc. have some impact but not on the issue I'm currently facing.

Anyone ideas?
  Reply With Quote
12-19-17, 06:18 PM   #2
p3lim
A Pyroguard Emberseer
 
p3lim's Avatar
AddOn Author - Click to view addons
Join Date: Feb 2007
Posts: 1,710
Remove lines 29-70 and 573, menus are handled securely by oUF now.
In each of the UnitSpecific entries, remove "..." and add "unit", and remove the manual setting of the unit attribute (like on lines 608, 929, 1000, 1057, 1185, 1237)

Last edited by p3lim : 12-19-17 at 06:20 PM.
  Reply With Quote
12-20-17, 12:44 AM   #3
gempir
A Black Drake
 
gempir's Avatar
AddOn Author - Click to view addons
Join Date: Jun 2015
Posts: 84
Thanks removing useless code is always good, but sadly it did not fix my issue with the Party frames.

Edit:

This line seems to be of some kind of relevance
https://github.com/gempir/gempUI/blo...ayout.lua#L578
self:RegisterForClicks('AnyUp')
Removing it makes the Unit Frames (all) not right-clickable (makes sense)

But the party frames completly break, this doesn't make sense to me. Why would frames break when you remove a click handler?

Broken Frames:



I have also noticed that the first party member (very left) is really broken showing the invalid Spec and Powerbarcolor sometimes. Also the powerbar is not clickable at all on this frame.

Edit 2:
Same Issue with Tank frames it seems. Weird.

Last edited by gempir : 12-21-17 at 05:29 AM.
  Reply With Quote
12-21-17, 11:49 AM   #4
gempir
A Black Drake
 
gempir's Avatar
AddOn Author - Click to view addons
Join Date: Jun 2015
Posts: 84
Okay I think i found the issue.

This is code for spawning tank frames. Now the overriden name (first arugment of SpawnHeader) is oUF_MainTank. Changing this to nil will force oUF to make decision based on the other passed arguments and it correctly spawns the tank frame with hover and click features.


Lua Code:
  1. local maintank = self:SpawnHeader('oUF_MainTank', nil, 'raid',
  2.         'showRaid', true,'showSolo',false, 'groupFilter', 'MAINTANK', 'yOffset', -23,
  3.         'oUF-initialConfigFunction', ([[
  4.             self:SetHeight(%d)
  5.             self:SetWidth(%d)
  6.         ]]):format(cfg.party.health+cfg.party.power+1,cfg.party.width)
  7.         )

What I don't understand is why oUF_MainTank would be incorrect. I can't find a good reference doc where the override names are listed. oUF_Tank doesn't work either.

Anyone maybe a clue to whats going on?
  Reply With Quote
12-22-17, 12:49 PM   #5
haste
Featured Artist
 
haste's Avatar
Premium Member
Featured
Join Date: Dec 2005
Posts: 1,027
Are you spawning multiple frames with the same global name? The internal generate frame name function in oUF handles that for you if so.

It shouldn't really be an issue, but it might be.
__________________
「貴方は1人じゃないよ」
  Reply With Quote
12-22-17, 01:44 PM   #6
gempir
A Black Drake
 
gempir's Avatar
AddOn Author - Click to view addons
Join Date: Jun 2015
Posts: 84
Originally Posted by haste View Post
Are you spawning multiple frames with the same global name? The internal generate frame name function in oUF handles that for you if so.

It shouldn't really be an issue, but it might be.
Hmm yes. Yeah I am. In Raids when there are 2 tanks there would 2 frames with the name "oUF_MainTank"

Oh well. My solution with leaving it nil is fine and everything works now. Thanks for the help guys.

Last edited by gempir : 12-22-17 at 05:22 PM.
  Reply With Quote

WoWInterface » Featured Projects » oUF (Otravi Unit Frames) » Upgrading oUF Layout

Thread Tools
Display Modes

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