WoWInterface

WoWInterface (https://www.wowinterface.com/forums/index.php)
-   Graphics Help (https://www.wowinterface.com/forums/forumdisplay.php?f=14)
-   -   Guild Tabard Icon (https://www.wowinterface.com/forums/showthread.php?t=39613)

frohanss 04-13-11 01:17 AM

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

Nibelheim 04-13-11 01:25 AM

Quote:

Originally Posted by frohanss (Post 234459)
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.

frohanss 04-13-11 02:59 AM

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.;)

Ketho 04-13-11 11:07 AM

Quote:

Originally Posted by frohanss (Post 234459)
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()
Quote:

Originally Posted by frohanss (Post 234463)
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 =)

Seerah 04-13-11 12:06 PM

In my KeepingTabs addon, I just use the icon/method used for the guild tab in the spellbook.


All times are GMT -6. The time now is 03:59 PM.

vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI