Hi this is for my wow addon BGCallouts
In last patch 7.3 my frame is not visible anymore. Also it says that mu addon is out of date but i have no bugs in it. should i wait or can u help me solve this?
If i change the values in frame.texture:SetTexture(0, 0, 0, 1) the frame turns green but i want it black,
Toc file have this row
=============
## Interface: 70300
Here i creat my frame:
===============
local function SetupBGFrame(frame)
frame:SetMovable(true)
frame:EnableMouse(true)
frame:RegisterForDrag("LeftButton")
frame:SetScript("OnDragStart", frame.StartMoving)
frame:SetScript("OnDragStop", frame.StopMovingOrSizing)
-- frame:SetPoint("CENTER", UIParent, "CENTER")
-- The code below makes the frame visible
frame.texture = frame:CreateTexture("ARTWORK")
frame.texture:SetAllPoints()
frame.texture:SetTexture(0, 0, 0, 1)
return frame
end
First, your addon shows as being out of date because the Interface number should not be 70300. The current version of WoW is not 7.3, but 7.0. Change that to 70000.
Second, I see you have the SetPoint line for your frame commented out. Do you provide a location for your frame to appear elsewhere in your code? This is a necessary element for a frame to be visible.
Lastly, if your texture appears a neon green color, that means that there is a problem loading the texture itself. (File path incorrect, unsupported dimensions, unsupported file-type, etc.) I haven't heard of issues with SetTexture, and if there were any issues loading the texture, it would be that green color all the time...
I was playing around with something else last night and it seems that :SetTexture() no longer takes r,g,b values. It just wasn't giving an error. Use :SetVertexColor() instead.
:SetVertexColor worked perfectly fine for me and should for you.
local function SetupBGFrame(frame)
frame:SetMovable(true)
frame:EnableMouse(true)
frame:RegisterForDrag("LeftButton")
frame:SetScript("OnDragStart", frame.StartMoving)
frame:SetScript("OnDragStop", frame.StopMovingOrSizing)
-- frame:SetPoint("CENTER", UIParent, "CENTER")
-- The code below makes the frame visible
frame.texture = frame:CreateTexture("ARTWORK")
frame.texture:SetAllPoints()
frame.texture:SetVertexColor(0, 0, 0, 1) <--change to this
return frame
end
Hi
I solved using Backdrop.. it was hard to find "UI-DialogBox-<whatever>" that really linked as i should.
Do you have a list of what possible "backdrop textures" that is avaliable?
local function SetupBGFrame(frame)
frame:SetMovable(true)
frame:EnableMouse(true)
frame:RegisterForDrag("LeftButton")
frame:SetScript("OnDragStart", frame.StartMoving)
frame:SetScript("OnDragStop", frame.StopMovingOrSizing)
frame:SetPoint("CENTER", UIParent, "CENTER")
-- The code below makes the frame visible
frame:SetBackdrop({
bgFile = "Interface\\DialogFrame\\UI-DialogBox-Background-Dark", tile = true, tileSize = 20,
edgeFile = "Interface\\DialogFrame\\UI-DialogBox-Border", edgeSize = 32,
insets = { left = 10, right = 10, top = 10, bottom = 10 }
})
frame:SetBackdropColor(0.8,0.8,0.8,1)
frame:SetBackdropBorderColor(0.8,0.8,0.8,1)
return frame
end
You can use any texture in the game, or any texture you create (so long as it follows the guidelines).
I still don't know why you were having issues. You never showed what you had changed the code to (or maybe there was something affecting it somewhere else in your code), or maybe what you put on the forums wasn't your real code. /shrug
Hi
ofc it was my real code.. i am not a pro coder but i couldnt find anything else that affected the code. Now it works and i am happy and thank you very much for taking your time to help me. /hug
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
In last patch 7.3 my frame is not visible anymore. Also it says that mu addon is out of date but i have no bugs in it. should i wait or can u help me solve this?
If i change the values in frame.texture:SetTexture(0, 0, 0, 1) the frame turns green but i want it black,
Toc file have this row
=============
## Interface: 70300
Here i creat my frame:
===============
local function SetupBGFrame(frame)
frame:SetMovable(true)
frame:EnableMouse(true)
frame:RegisterForDrag("LeftButton")
frame:SetScript("OnDragStart", frame.StartMoving)
frame:SetScript("OnDragStop", frame.StopMovingOrSizing)
-- frame:SetPoint("CENTER", UIParent, "CENTER")
-- The code below makes the frame visible
frame.texture = frame:CreateTexture("ARTWORK")
frame.texture:SetAllPoints()
frame.texture:SetTexture(0, 0, 0, 1)
return frame
end
Second, I see you have the SetPoint line for your frame commented out. Do you provide a location for your frame to appear elsewhere in your code? This is a necessary element for a frame to be visible.
Lastly, if your texture appears a neon green color, that means that there is a problem loading the texture itself. (File path incorrect, unsupported dimensions, unsupported file-type, etc.) I haven't heard of issues with SetTexture, and if there were any issues loading the texture, it would be that green color all the time...
thanks now my addon is up to date and i have no bugs in it. But the frame is still green or not visible... Can it have something to do with
frame.texture = frame:CreateTexture("ARTWORK")
You said ...File path incorrect, unsupported dimensions, unsupported file-type, etc.
/thanks
I solved using Backdrop.. it was hard to find "UI-DialogBox-<whatever>" that really linked as i should.
Do you have a list of what possible "backdrop textures" that is avaliable?
local function SetupBGFrame(frame)
frame:SetMovable(true)
frame:EnableMouse(true)
frame:RegisterForDrag("LeftButton")
frame:SetScript("OnDragStart", frame.StartMoving)
frame:SetScript("OnDragStop", frame.StopMovingOrSizing)
frame:SetPoint("CENTER", UIParent, "CENTER")
-- The code below makes the frame visible
frame:SetBackdrop({
bgFile = "Interface\\DialogFrame\\UI-DialogBox-Background-Dark", tile = true, tileSize = 20,
edgeFile = "Interface\\DialogFrame\\UI-DialogBox-Border", edgeSize = 32,
insets = { left = 10, right = 10, top = 10, bottom = 10 }
})
frame:SetBackdropColor(0.8,0.8,0.8,1)
frame:SetBackdropBorderColor(0.8,0.8,0.8,1)
return frame
end
I still don't know why you were having issues. You never showed what you had changed the code to (or maybe there was something affecting it somewhere else in your code), or maybe what you put on the forums wasn't your real code. /shrug
ofc it was my real code.. i am not a pro coder but i couldnt find anything else that affected the code. Now it works and i am happy and thank you very much for taking your time to help me. /hug