Thread Tools Display Modes
07-25-15, 09:03 AM   #1
Yukyuk
A Chromatic Dragonspawn
 
Yukyuk's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2015
Posts: 179
Showing guild tabbard.

Is there a way to get the guild tabbard to show up in my addon?

I found the function GetGuildTabardFileNames().
And I can get the resulting textures into a frame.
But getting to show up as a decent guild banner is beyond me.

Allready browsed the FriendsFame, GuildBank and other xml and lua files but still no clue.

So any pointers is the right direction are very welcome.
__________________
Better to fail then never have tried at all.
  Reply With Quote
07-25-15, 11:55 AM   #2
Seerah
Fishing Trainer
 
Seerah's Avatar
WoWInterface Super Mod
Featured
Join Date: Oct 2006
Posts: 10,860
This is what I use in KeepingTabs:

Lua Code:
  1. if GetGuildTabardFileNames() then
  2.             f.ngt2:SetNormalTexture("Interface\\SpellBook\\GuildSpellbooktabBG")
  3.             f.ngt2.TabardEmblem:Show()
  4.             f.ngt2.TabardIconFrame:Show()
  5.             SetLargeGuildTabardTextures("player", f.ngt2.TabardEmblem, f.ngt2:GetNormalTexture(), f.ngt2.TabardIconFrame)
  6.         else
  7.             f.ngt2:SetNormalTexture("Interface\\GuildFrame\\GuildLogo-NoLogo")
  8.         end
__________________
"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

  Reply With Quote
07-26-15, 09:04 AM   #3
Yukyuk
A Chromatic Dragonspawn
 
Yukyuk's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2015
Posts: 179
@Seerah

Thank you for your answer.

In fact when I started with my addon I made a rough design. I wanted to incoperate the guild banner.
So I started googling to see how I could do that.
One of the first results was KeepingTabs.
So I downloaded it and studied the coding to you see how you got the guild banner.

At the time I couldn't figure it out.
Now I can see how you got the guild banner to work.

But getting the same result into my addon is not working (yet).
Keep getting to nil results for TabardEmblem and TabardIconFrame.
If fact I put a few print statements in Keeping Tabs as a way to bebug and they also print nil.
But I will keep trying

Oh, I changed my version of the the Keeping tabs toc to version 60200 to get it working.
Hope you don't mind.
__________________
Better to fail then never have tried at all.

Last edited by Yukyuk : 07-27-15 at 12:14 PM.
  Reply With Quote
07-26-15, 11:54 AM   #4
Yukyuk
A Chromatic Dragonspawn
 
Yukyuk's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2015
Posts: 179
Brainwave

Blizzard_GuildUI is only loaded on demand?
(Blizzard_GuildUI is the trigger for Keeping tabs).

Have to prepare my addon for that.

Guess this is obvious for the more experienced developers, but it is an eye opener for me
__________________
Better to fail then never have tried at all.
  Reply With Quote
07-26-15, 03:34 PM   #5
Seerah
Fishing Trainer
 
Seerah's Avatar
WoWInterface Super Mod
Featured
Join Date: Oct 2006
Posts: 10,860
Changing it to 60200 would make no difference on the code in the Lua file. (So long as you had "Load Out of Date Addons" checked.)

Since KT is adding frames to the guild UI, that's why it needs to wait for the Blizzard_GuildUI addon to load so that the guild UI has actually been created before trying to add to it. And, yes, the Blizzard_GuildUI addon is load on demand. http://wowprogramming.com/utils/xmlb...rd_GuildUI.toc
__________________
"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

  Reply With Quote
07-27-15, 12:13 PM   #6
Yukyuk
A Chromatic Dragonspawn
 
Yukyuk's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2015
Posts: 179
It worked !

Thank you again Seerah.

Took me a few more hours, but it worked.
I now have the guild banner in my addon.
Ended up using the "SpellBookSkillLineTabTemplate".



Few more things to do to make it "perfect".
The first time it displays the no_guild logo instead of the guild banner.

And at the top left of the guild banner you see the original texture.
<Texture file="Interface\SpellBook\SpellBook-SkillLineTab"> from the "SpellBookSkillLineTabTemplate".
Is there a way to remove that?

Code:
 <CheckButton name="SpellBookSkillLineTabTemplate" virtual="true" hidden="true">
        <Size>
            <AbsDimension x="32" y="32"/>
        </Size>
        <Layers>
            <Layer level="BACKGROUND">
                <Texture file="Interface\SpellBook\SpellBook-SkillLineTab">
                    <Size>
                        <AbsDimension x="64" y="64"/>
                    </Size>
                    <Anchors>
                        <Anchor point="TOPLEFT">
                            <Offset>
                                <AbsDimension x="-3" y="11"/>
                            </Offset>
                        </Anchor>
                    </Anchors>
                </Texture>
            </Layer>
__________________
Better to fail then never have tried at all.
  Reply With Quote

WoWInterface » Developer Discussions » Lua/XML Help » Showing guild tabbard.


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