Reply
Thread Tools Display Modes
Unread 04-13-11, 01:17 AM   #1
frohanss
An Aku'mai Servant
AddOn Author - Click to view addons
Join Date: Mar 2011
Posts: 31
Guild Tabard Icon

Hello,

does anyone know how to get the guild tabard into frames?

Basicly whant to overlay the icon on top of another frame.

Thx in advance
frohanss is offline   Reply With Quote
Unread 04-13-11, 01:25 AM   #2
Nibelheim
local roygbi-
 
Nibelheim's Avatar
Featured
Join Date: Jan 2010
Posts: 1,599
Originally Posted by frohanss View Post
Hello,

does anyone know how to get the guild tabard into frames?

Basicly whant to overlay the icon on top of another frame.

Thx in advance
To get all texture info relating to the guild tabard, try this function:

Code:
local tabardBackgroundUpper, tabardBackgroundLower, tabardEmblemUpper, tabardEmblemLower, tabardBorderUpper, tabardBorderLower = GetGuildTabardFileNames()
The "no guild" texture is: "Interface\\GuildFrame\\GuildLogo-NoLogo"

The normal textures can be quickly reference from: GuildFrameTabardEmblem, GuildFrameTabardBackground, GuildFrameTabardBorder


Now, I haven't done any work at all in relation to this, this is just the info I could find quickly.

Last edited by Nibelheim : 04-13-11 at 01:31 AM.
Nibelheim is offline   Reply With Quote
Unread 04-13-11, 02:59 AM   #3
frohanss
An Aku'mai Servant
AddOn Author - Click to view addons
Join Date: Mar 2011
Posts: 31
Thx Nibelheim.
That is about all i also have found.
Atm im a expert nab, so starting to fish around that code will be painfull work. So hope some real expert can help more around this.
frohanss is offline   Reply With Quote
Unread 04-13-11, 11:07 AM   #4
Ketho
A Molten Giant
 
Ketho's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2010
Posts: 570
Originally Posted by frohanss View Post
Basicly whant to overlay the icon on top of another frame.
I worked a bit with it, for one of my (Ace3) addons. As to "to overlaying the icon on top of another frame", I don't have any experience with anything other than UI escape sequences (which I used in Ace3 options tables)
  • This example function returns the (UI escape sequence) icon for the current Guild Emblem with a size of 32px, or "Interface\\GuildFrame\\GuildLogo-NoLogo" if not in a guild.
  • It only returns the no-background/uncolored/unbordered texture.
  • I've looked into the FrameXML, and I want to say that Blizzard uses the Guild Emblem in a lot of different places (e.g. Guild Invites/Guild Bank/Guild Achievements/Micro Menu), both in Lua and XML
Code:
function MyAddOn:GuildEmblem()
	-- table lookup shortcut*
	local char = self.db.char
	-- check if Blizzard_GuildUI is loaded
	if GuildFrameTabardEmblem then
		char.guildTexCoord = {GuildFrameTabardEmblem:GetTexCoord()}
	end
	if IsInGuild() and char.guildTexCoord then
		return "|TInterface\\GuildFrame\\GuildEmblemsLG_01:32:32:0:0:32:32:"..(char.guildTexCoord[1]*32)..":"..(char.guildTexCoord[7]*32)..":"..(char.guildTexCoord[2]*32)..":"..(char.guildTexCoord[8]*32).."|t"
	else
		return "|TInterface\\GuildFrame\\GuildLogo-NoLogo:32:32|t"
	end
end
*The example's table lookup shortcut should get "refreshed" in some other (Ace3) code on "Ace3 Profile changes", but that is unrelated with the thread

"Interface\\GuildFrame\\GuildEmblemsLG_01" is the .BLP used for in the Guild frame



In addition to Nibelheim I've found another function that might help:
Code:
local bkgR, bkgG, bkgB, borderR, borderG, borderB, emblemR, emblemG, emblemB, emblemFilename = GetGuildLogoInfo()
Originally Posted by frohanss View Post
Thx Nibelheim.
That is about all i also have found.
Atm im a expert nab, so starting to fish around that code will be painfull work. So hope some real expert can help more around this.
Myself I would really just suggest to start digging in there and see for yourself how Blizzard is implementing the Guild Emblem. What I posted is really just some ugly way to get the text coords straight from the GuildFrameTabardEmblem. But someone else will definitely know how it works, complete with background, borders, and colors =)

Last edited by Ketho : 04-13-11 at 11:29 AM.
Ketho is offline   Reply With Quote
Unread 04-13-11, 12:06 PM   #5
Seerah
Fishing Trainer
 
Seerah's Avatar
WoWInterface Super Mod
Featured
Join Date: Oct 2006
Posts: 9,709
In my KeepingTabs addon, I just use the icon/method used for the guild tab in the spellbook.
__________________
"You'd be surprised how many people violate this simple principle every day of their lives and try to fit square pegs into round holes, ignoring the clear reality that Things Are As They Are." -Benjamin Hoff, The Tao of Pooh

Seerah is online now   Reply With Quote
Reply

Go BackWoWInterface » Developer Discussions » Graphics Help » Guild Tabard Icon

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