Thread Tools Display Modes
07-17-14, 04:17 PM   #1
Uitat
A Chromatic Dragonspawn
 
Uitat's Avatar
AddOn Author - Click to view addons
Join Date: May 2011
Posts: 162
oUF

anyone know how to force raid frames 1-40 to show in oUF so i can set the placement corectly?
__________________
  Reply With Quote
07-18-14, 02:28 AM   #2
zork
A Pyroguard Emberseer
 
zork's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2008
Posts: 1,740
Lua Code:
  1. local namelist = UnitName("player")
  2. for i = 2,40 do -- or whatever your desired group size is
  3.   namelist = namelist..","..UnitName("player")
  4. end
  5.  
  6. local raid = oUF:SpawnHeader(
  7.   -- The rest of your attributes
  8.   "nameList", namelist
  9. )
__________________
| Simple is beautiful.
| WoWI AddOns | GitHub | Zork (WoW)

"I wonder what the non-pathetic people are doing tonight?" - Rajesh Koothrappali (The Big Bang Theory)
  Reply With Quote
07-19-14, 04:38 AM   #3
Rainrider
A Firelord
AddOn Author - Click to view addons
Join Date: Nov 2008
Posts: 454
zork that wasn't working the last time I tried. The first child in the header is set, the rest is not.
  Reply With Quote
07-19-14, 08:41 AM   #4
p3lim
A Pyroguard Emberseer
 
p3lim's Avatar
AddOn Author - Click to view addons
Join Date: Feb 2007
Posts: 1,710
Lua Code:
  1. local namelist = UnitName('player')
  2. for index = 2,40 do -- or whatever your desired group size is
  3.   namelist = namelist .. ',' .. UnitName('player') .. index
  4. end
  5.  
  6. local raid = oUF:SpawnHeader(
  7.   -- The rest of your attributes
  8.   'nameList', namelist
  9. )

What about this one?
  Reply With Quote
07-19-14, 12:55 PM   #5
zork
A Pyroguard Emberseer
 
zork's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2008
Posts: 1,740
Yeah does not work aswell. Even namelist "A,B" does only return the player.
Just enter Alterac Valley. Is my best bet.
__________________
| Simple is beautiful.
| WoWI AddOns | GitHub | Zork (WoW)

"I wonder what the non-pathetic people are doing tonight?" - Rajesh Koothrappali (The Big Bang Theory)
  Reply With Quote
07-19-14, 10:05 PM   #6
Phanx
Cat.
 
Phanx's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2006
Posts: 5,617
If all you care about is the placement, just manually create 39 textures with the same size and anchors as your raid frames, and attach them to the first raid frame (the one showing yourself). Even if you're working on other details, this should be sufficient... as long as you can see one frame, I don't see why you'd actually need to see 40 identical frames.
__________________
Retired author of too many addons.
Message me if you're interested in taking over one of my addons.
Don’t message me about addon bugs or programming questions.
  Reply With Quote
07-20-14, 05:22 AM   #7
Uitat
A Chromatic Dragonspawn
 
Uitat's Avatar
AddOn Author - Click to view addons
Join Date: May 2011
Posts: 162
Originally Posted by Phanx View Post
If all you care about is the placement, just manually create 39 textures with the same size and anchors as your raid frames, and attach them to the first raid frame (the one showing yourself). Even if you're working on other details, this should be sufficient... as long as you can see one frame, I don't see why you'd actually need to see 40 identical frames.
great idea, this worked for me, just made my own temporary grid to see location then got in a party to make sure frame 2 lined up right, voila!! i have the location set right. you so smart!, i would give you a cookie if i had one... one thing i gotta say is, well, your advice has been priceless, thanks again Phanx.
__________________
  Reply With Quote
10-12-14, 07:45 AM   #8
sticklord
A Wyrmkin Dreamwalker
AddOn Author - Click to view addons
Join Date: Aug 2014
Posts: 57
Bit of a necro, but i finally found out how to force show header units!
Bear in mind this is only for party, probably need some extra work for raid frames.

Lua Code:
  1. -- self.header is the header that's spawned using oUF:SpawnHeader
  2.  
  3. -- script forcing the frames to show
  4. frame:SetScript("OnShow", function(self)
  5.     SecureStateDriverManager:SetAttribute("setframe", self.header) -- This is just a "hack" to get the old visibility attribute
  6.     self.oldstate_driver = SecureStateDriverManager:GetAttribute("setstate"):gsub("state%-visibility%s", "") -- ^
  7.     self.header:SetAttribute("startingIndex", -2) -- Setting the starting index to -2, so we have three frames: -2, -1, 0
  8.     self.header:SetAttribute("showSolo", true)    -- This is the forth frame
  9.     RegisterAttributeDriver(self.header, 'state-visibility', 'show') -- Setting it to show
  10.     for i = 1, self.header:GetNumChildren() do -- We can now get all the 4 children
  11.         local obj = select(i, self.header:GetChildren())
  12.         ToggleUnitFrame(obj, true) -- This function just sets the obj.unit = "player" etc. And showing it
  13.     end
  14. end)
  15.  
  16. -- Script to reset the header
  17. frame:SetScript("OnHide", function(self)
  18.     RegisterAttributeDriver(self.header, "state-visibility", self.oldstate_driver) -- Reset the visibility
  19.     self.oldstate_driver = nil
  20.     self.header:SetAttribute("startingIndex", nil) -- Setting it to default (1)
  21.     self.header:SetAttribute("showSolo", nil)
  22.     for i = 1, self.header:GetNumChildren() do
  23.         local obj = select(i, self.header:GetChildren())
  24.         ToggleUnitFrame(obj) -- Same as above,
  25.         obj:UpdateAllElements("OnShow")
  26.     end
  27. end)

Edit: Looks like you don't need showsolo, not sure why i added that. Just reduce the startingindex by 1 instead. And also, you need to check how many of your frames that are actually shown and increment the startingIndex by one for each frame shown, so you don't create 4 extra frames if you're in a party of 4 (giving a total of 8 partyframes!)

Last edited by sticklord : 10-13-14 at 02:44 PM.
  Reply With Quote

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


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