Quantcast reliably setting color of frames - WoWInterface
Thread Tools Display Modes
Prev Previous Post   Next Post Next
02-07-20, 05:05 AM   #1
A Kobold Labourer
Join Date: Feb 2020
Posts: 1
Question reliably setting color of frames


I am working on a study project. I am creating multiple colored frames and I am trying to make them change their color.
I have tried to methods, the first one setting the color via SetTexture and then using SetColorTexture to change the color of the texture on the frame. This is very unreliable, (maybe I am initalising the farmes incorrectly...?) but they sometimes dont show up, or show up in black without the color changing. Doing a couple of /reload fixes them but, its a very undeterministic behaviour. They show up as white, but doesn't change. Code for this one, they somehow get stuck with being white:
local frame = CreateFrame("Frame", k, UIParent)
    frame:SetPoint("TOPLEFT", x, heightFromCorner)

      frame.texture = frame:CreateTexture()
    function(self, event)
The other method that I have tried was using SetBackdrop but that way the frames show up as green. I am trying to load a simple background texture, so it should be loadable, doing it like this:
      bgFile = [[Interface\AddOns\myaddon\data\backdrop.tga]],
      insets = {top = 0, left = 0, bottom = 0, right = 0},
I suspect something is off with the way I am trying to update the color of the frames, but since I assign a callback to the OnUpdate event, the update should be handled correctly.

Can you give any insights to this?

Thank you
  Reply With Quote

WoWInterface » Developer Discussions » General Authoring Discussion » reliably setting color of frames

Thread Tools
Display Modes

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