WoWInterface

WoWInterface (https://www.wowinterface.com/forums/index.php)
-   Lua/XML Help (https://www.wowinterface.com/forums/forumdisplay.php?f=16)
-   -   "Custom-Backdrops"? - Need Help (https://www.wowinterface.com/forums/showthread.php?t=31097)

Segore 03-06-10 09:31 AM

"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?

nightcracker 03-06-10 09:32 AM

The sizes of WoW textures must be a power of 2. So 128*64 or 256*256, etc.

Segore 03-06-10 10:03 AM

Thats the point!
Thank you for your help.

Segore 03-06-10 10:12 AM

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?

Seerah 03-06-10 12:22 PM

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.

Segore 03-06-10 12:39 PM

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

Seerah 03-06-10 11:12 PM

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.

Segore 03-07-10 05:29 AM

Quote:

Originally Posted by Seerah (Post 180835)
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.. :banana:


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.


All times are GMT -6. The time now is 06:14 PM.

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