Thread Tools Display Modes
09-24-08, 04:09 PM   #1
Scale
A Fallenroot Satyr
AddOn Author - Click to view addons
Join Date: Jul 2005
Posts: 28
Template frames

I'm not a bad coder although fairly new to lua,
Now i want to create a new addon now the coding im not worrying about.

It the frame to put it in im really not good at this,
So my question is are there simple template frames that i can find somewhere?

All i would need is a tooltip'ish frame (so just a square basicly ),
Which is semi transparent and can be moved by mouse.

Thanks for reading.
  Reply With Quote
09-24-08, 04:19 PM   #2
Duugu
Premium Member
 
Duugu's Avatar
AddOn Author - Click to view addons
Join Date: Nov 2006
Posts: 851
This code snippet shows a simple frame:

Code:
local f = CreateFrame("Frame", "myFrame", UIParent)
f:SetFrameStrata("MEDIUM")
f:SetWidth(200)  
f:SetHeight(200) 
f:SetScript("OnDragStart", function() getglobal("myFrame"):StartMoving() end)
f:SetScript("OnDragStop", function() getglobal("myFrame"):StopMovingOrSizing() end)
f:SetPoint("CENTER",0,0)
f:SetBackdrop({bgFile="Interface\\DialogFrame\\UI-DialogBox-Background", edgeFile="Interface\\Tooltips\\UI-Tooltip-Border", tile = false, tileSize = 0, edgeSize = 16, insets = { left = 0, right = 0, top = 0, bottom = 0 }})
f:SetMovable(true)
f:EnableMouse(true)
f:SetClampedToScreen(true)
f:RegisterForDrag("LeftButton")
f:Show()
  Reply With Quote
09-25-08, 02:01 AM   #3
Scale
A Fallenroot Satyr
AddOn Author - Click to view addons
Join Date: Jul 2005
Posts: 28
Thanks Duugu,
Its perfect!
  Reply With Quote

WoWInterface » Developer Discussions » General Authoring Discussion » Template 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