WoWInterface

WoWInterface (https://www.wowinterface.com/forums/index.php)
-   oUF (Otravi Unit Frames) (https://www.wowinterface.com/forums/forumdisplay.php?f=87)
-   -   Hide frames in Raid (https://www.wowinterface.com/forums/showthread.php?t=57004)

GreyFox777 02-01-19 02:56 AM

Hide frames in Raid
 
Can someone tell how to prevent spawner from load if player are in raid?

have this block of code at the end of my lua file

Code:

oUF:RegisterStyle("Party 1 Frame", create)
oUF:SetActiveStyle("Party 1 Frame")
oUF:Spawn("party1", "MyFrames_Party1Frame")


Lolzen 02-07-19 07:56 AM

You could use UnitInRaid, however oUF can handle this for you.

here's an example of party
Lua Code:
  1. local party = self:SpawnHeader(
  2.     nil, nil, 'party,solo',
  3.     'showParty', true,
  4.     'showPlayer', true,
  5.     'showSolo', false,
  6.     'xOffset', 0,
  7.     'yoffset', 0,
  8.     'oUF-initialConfigFunction', [[
  9.         self:SetHeight(19)
  10.         self:SetWidth(70)
  11.     ]],
  12.     'maxColumns', 5,
  13.     'unitsperColumn', 1,
  14.     'columnSpacing', 5,
  15.     'columnAnchorPoint', "TOP"
  16. )
  17. party:SetPoint("BOTTOM", UIParent, 0, 140)

where this is an example for a raidgroup
Lua Code:
  1. local raid = self:SpawnHeader(
  2.     nil, nil, 'raid,party,solo',
  3.     'showPlayer', true,
  4.     'showSolo', false,
  5.     'showParty', false,
  6.     'showRaid', true,
  7.     'xoffset', 7,
  8.     'yOffset', -5,
  9.     'oUF-initialConfigFunction', [[
  10.         self:SetHeight(19)
  11.         self:SetWidth(50)
  12.     ]],
  13.     'groupFilter', '1,2,3,4,5,6,7,8',
  14.     'groupingOrder', '8,7,6,5,4,3,2,1',
  15.     'sortMethod', 'NAME',
  16.     'groupBy', 'GROUP',
  17.     'maxColumns', 8,
  18.     'unitsPerColumn', 5,
  19.     'columnSpacing', 7,
  20.     'columnAnchorPoint', "RIGHT"
  21. )
  22. raid:SetPoint("LEFT", UIParent, 20, 0)

notice 'showRaid' in particular.
I'd suggest to look into other people's layouts to see how they handle party/raid. oUF is VERY flexible.

GreyFox777 02-07-19 12:29 PM

so i did it like so but it just doesen't spawn...

Lua Code:
  1. local create = function(self)
  2.     self.unitType = "party"
  3.     self:SetSize(300, 81)
  4.     self:SetPoint("RIGHT", 0, 0)
  5.     self.colors = ns.colors
  6.     self:RegisterForClicks('AnyUp')
  7.  
  8.  
  9.  
  10. -- -----------------------------------
  11. -- > SPAWN UNIT
  12. -- -----------------------------------
  13. oUF:RegisterStyle("Party Frame", create)
  14. oUF:SetActiveStyle("Party Frame")
  15. local party = self:SpawnHeader(
  16.     nil, nil, 'party,solo',
  17.     'showParty', true,
  18.     'showPlayer', true,
  19.     'showSolo', false,
  20.     'xOffset', 0,
  21.     'yoffset', 0,
  22.     'oUF-initialConfigFunction', [[
  23.         self:SetHeight(19)
  24.         self:SetWidth(70)
  25.     ]],
  26.     'maxColumns', 5,
  27.     'unitsperColumn', 1,
  28.     'columnSpacing', 5,
  29.     'columnAnchorPoint', "TOP"
  30. )
  31. party:SetPoint("BOTTOM", UIParent, 0, 140)
  32.  
  33. end

what im douing wrong?

And is there a way to make it just for party1, party2 etc?


All times are GMT -6. The time now is 10:25 PM.

vBulletin © 2020, Jelsoft Enterprises Ltd
© 2004 - 2020 MMOUI