Quantcast WoWInterface - View Single Post - SetColorTexture strange behaviour
View Single Post
10-15-19, 01:51 AM   #7
toha
A Murloc Raider
Join Date: Oct 2019
Posts: 4
Originally Posted by jeffy162 View Post
Yes, but, you apparently didn't post ALL of your code.
im surprised that you ask full code because my small question only about one small API function its like you ask full code for this

Code:
print(1)  -- 2
actually full code already above but okay, i hope you will help me if you will have full code in one forum message

Code:
local EventFrame = CreateFrame("Frame") 
local frame_1 = CreateFrame("Frame", nil, UIParent) 
local frame_2 = CreateFrame("Frame", nil, UIParent) 

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

function EventFrame:PLAYER_LOGIN() 
        frame_1:SetFrameStrata("BACKGROUND")						
	frame_1:SetWidth(100) 
	frame_1:SetHeight(100) 
	frame_1.texture = frame_1:CreateTexture(nil,"BACKGROUND")
	frame_1.texture:SetAllPoints(frame_1)
	frame_1:SetPoint("TOPLEFT",200,-100)
	frame_1:Show()
	frame_2:SetFrameStrata("BACKGROUND")						
	frame_2:SetWidth(100) 
	frame_2:SetHeight(100) 
	frame_2.texture = frame_2:CreateTexture(nil,"BACKGROUND")
	frame_2.texture:SetAllPoints(frame_2)
	frame_2:SetPoint("TOPLEFT",450,-100)
	frame_2:Show()
	
	frame_1.texture:SetColorTexture(0, 0.007, 0.257)	
	frame_2.texture:SetColorTexture(0, 0.141, 0.007)	
end

Last edited by toha : 10-15-19 at 01:56 AM.
  Reply With Quote