Thread Tools Display Modes
03-06-10, 09:31 AM   #1
Segore
A Murloc Raider
Join Date: Aug 2008
Posts: 5
"Custom-Backdrops"? - Need Help

Hello,

atm I'am creating a little addon that should show a Frame on READY_CHECK.
That part of my little addon is working as expected, but there is one part which is not working - here is the code of my Frame:

Code:
BFC_Frame = CreateFrame("Frame", "BFC_Frame", UIParent)
BFC_Frame:EnableMouse(true)
BFC_Frame:SetMovable(true)
BFC_Frame:SetUserPlaced(true)
BFC_Frame:RegisterForDrag("LeftButton")
BFC_Frame:SetScript("OnDragStart", function() this:StartMoving() end)
BFC_Frame:SetScript("OnDragStop", function() this:StopMovingOrSizing() end)
BFC_Frame:SetWidth(112)
BFC_Frame:SetHeight(56)
BFC_Frame:SetPoint("CENTER", 0, 0)

BFC_Frame:SetBackdrop({
  bgFile="Interface\\DialogFrame\\UI-DialogBox-Background", 
  edgeFile="Interface\\DialogFrame\\UI-DialogBox-Border", 
  tile=1, tileSize=10, edgeSize=10, 
  insets={left=3, right=3, top=3, bottom=3}
});


BFC_Frame:Hide()

-- Frames für Buff/Flask-Icon
BFC_B_Frame = CreateFrame("Frame", "BFC_Frame", BFC_Frame)
BFC_B_Frame:SetWidth(56)
BFC_B_Frame:SetHeight(56)
BFC_B_Frame:SetPoint("LEFT", 0, 0)
BFC_B_Frame:Hide()
BFC_B_Frame:SetBackdrop({
bgFile="Interface\\AddOns\\BuffoodFlaskCheck\\UI-BuffoodFlaskCheck-Backdrop-Food",
edgeFile="Interface\\DialogFrame\\UI-DialogBox-Border",
tile=0, tileSize=10, edgeSize=10,
insets={left=3, right=3, top=3, bottom=3}
});
It seems that the Frames are created correctly, but the backdrop of the BFC_B_Frame Frame doesn't show the bgFile as you can see here:
http://img341.imageshack.us/img341/5...odflaskche.png

The file is saved in the tga-Format.

Any ideas why it is not working?
  Reply With Quote
03-06-10, 09:32 AM   #2
nightcracker
A Molten Giant
 
nightcracker's Avatar
AddOn Author - Click to view addons
Join Date: Sep 2009
Posts: 716
The sizes of WoW textures must be a power of 2. So 128*64 or 256*256, etc.
__________________
Three things are certain,
Death, taxes and site not found,
You, victim of one.
  Reply With Quote
03-06-10, 10:03 AM   #3
Segore
A Murloc Raider
Join Date: Aug 2008
Posts: 5
Thats the point!
Thank you for your help.
  Reply With Quote
03-06-10, 10:12 AM   #4
Segore
A Murloc Raider
Join Date: Aug 2008
Posts: 5
Okay... another question.

I set my main-frame to the following:
BFC_Frame:RegisterEvent("READY_CHECK_CONFIRM")

If my charackter is a assistant the Event is "thrown" - respectively my frame is registering it and I can do something in my OnEvent-Function.

But if the character is not a raid-assistant it seems like that there is no event.

And ideas about it?
  Reply With Quote
03-06-10, 12:22 PM   #5
Seerah
Fishing Trainer
 
Seerah's Avatar
WoWInterface Super Mod
Featured
Join Date: Oct 2006
Posts: 10,860
That's because you're using the wrong event. READY_CHECK_CONFIRM fires when someone *responds* to a ready check. You want just READY_CHECK.
__________________
"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
03-06-10, 12:39 PM   #6
Segore
A Murloc Raider
Join Date: Aug 2008
Posts: 5
I think that I didn't posted enough informations.

I'am already using READY_CHECK.

On READY_CHECK I show my frame. On a READY_CHECK_CONFIRM I close the window.

But as I can see on wowwiki the READY_CHECK_CONFIRM returns a unit_id..
  Reply With Quote
03-06-10, 11:12 PM   #7
Seerah
Fishing Trainer
 
Seerah's Avatar
WoWInterface Super Mod
Featured
Join Date: Oct 2006
Posts: 10,860
Well, READY_CHECK_CONFIRM only fires for the raid leader/assistant (when someone responds to a ready check) so that they can see who is and is not ready. It doesn't fire for other raid members (as you have already seen). You could instead hook the OnClick handler of the buttons for the ready check window...

Perhaps if you explain what you are trying to do, we can be of more assistance.
__________________
"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
03-07-10, 05:29 AM   #8
Segore
A Murloc Raider
Join Date: Aug 2008
Posts: 5
Originally Posted by Seerah View Post
Perhaps if you explain what you are trying to do, we can be of more assistance.
Ok, I try it. I do the following:
In our guild we sometimes have the problem that our players doesn't take their bufffod/flasks because they forget it.

My idea was a little addon that creates and show a frame on a READY_CHECK with a little bufffood and/or flask-icon to show the player that he or she is missing something.

ATM it is working with that stuff which I described in my former postings.

If you would like to see the addon you can download it here:
http://segorawow.googlecode.com/file...FlaskCheck.rar

It is not ready yet, because I'am planning some funny stuff with soundfiles..


But maybe you are able to unterstand more what I want to do if you see my code.

Maybe you will also see some stuff that is not very well "coded". I'am a absolute noob in the lua/wow-api stuff - I'am more in php/javascript etc..

Thank you for your time and tips.
  Reply With Quote

WoWInterface » Developer Discussions » Lua/XML Help » "Custom-Backdrops"? - Need Help


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