Quantcast WoWInterface - View Single Post - SetColorTexture strange behaviour
View Single Post
10-14-19, 01:07 PM   #3
toha
A Murloc Raider
Join Date: Oct 2019
Posts: 4
Originally Posted by Terenna View Post
Please post all of your code
Code:
local EventFrame = CreateFrame("Frame") 
local frame_1= CreateFrame("Frame", nil, UIParent) 
local frame_2= CreateFrame("Frame", nil, UIParent) 

function EventFrame:OnEvent(event, ...) 
	print("HelloWorld:", event)
	self[event](self, ...) 
end
EventFrame:SetScript("OnEvent", EventFrame.OnEvent)

function EventFrame:PLAYER_LOGIN() 
        frame_1:SetFrameStrata("BACKGROUND")						-- 1
	frame_1:SetWidth(10) 
	frame_1:SetHeight(10) 
	frame_1.texture = frame_1:CreateTexture(nil,"BACKGROUND")
	frame_1.texture:SetAllPoints(frame_1)
	frame_1:SetPoint("TOPRIGHT",10,0)
	frame_1:Show()
	frame_2:SetFrameStrata("BACKGROUND")						-- 2
	frame_2:SetWidth(10) 
	frame_2:SetHeight(10) 
	frame_2.texture = frame_2:CreateTexture(nil,"BACKGROUND")
	frame_2.texture:SetAllPoints(frame_2)
	frame_2:SetPoint("TOPRIGHT",20,0)
	frame_2:Show()	
end
  Reply With Quote