View Single Post
06-26-17, 06:55 AM   #1
Layback_
An Onyxian Warder
Join Date: Feb 2016
Posts: 358
Drawing a texture on top of fontstring

Hi all,

Both texture and fontstring are drawn on same frame (frame.Health), but each are created via two separate functions, ComposeNameText() and ComposeReadyCheckIndicator() where ReadyCheckIndicator is created after NameText.

Lua Code:
  1. function ComposeNameText()
  2.     local nameText = frame.Health:CreateFontString(frame:GetName() .. "NameText", "OVERLAY");
  3. end

Lua Code:
  1. function ComposeReadyCheckIndicator()
  2.     local readyCheckIndicator = frame.Health:CreateTexture(frame:GetName() .. "ReadyCheckIndicator", "OVERLAY");
  3. end

Here's what it looks like at the moment.



I tried to use 'sublevel' argument, but unlike texture, fontstring doesn't seem to have a sublevel argument

At this stage, I've changed fontstring's draw layer to "ARTWORK" as a temporary solution.

My question is would modifying draw layer be the only solution to solve this problem?

Last edited by Layback_ : 06-26-17 at 07:01 AM.
  Reply With Quote