Thread Tools Display Modes
Prev Previous Post   Next Post Next
06-21-21, 04:54 AM   #1
SegFault
A Defias Bandit
Join Date: Jun 2021
Posts: 3
Drawing a square (basic noob question)

Hi,

I'm trying to draw a red square. I've searched for over an hour and it seems the "backdrop" api was changed in 9.0

Anyway, here is my code:

Code:
function HelloWorld() 
  print("Hello, World!"); 
  
  local p = CreateFrame("Frame", nil, self, BackdropTemplateMixin and "BackdropTemplate")
  p:SetWidth(100)
  p:SetHeight(100)
  p:SetBackdrop({backdropColor=CreateColor(1,0,0,1)})
  p:SetBackdropColor(1,0,0,1)
  p:SetPoint("TOPLEFT", 100, -100)
  p:Show()
end
I got some of the code from this thread: https://www.wowinterface.com/forums/...d.php?p=336419

This displays nothing however.

I'd appreciate if someone could please point me in the right direction...
  Reply With Quote
 

WoWInterface » Developer Discussions » General Authoring Discussion » Drawing a square (basic noob question)

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