WoWInterface

WoWInterface (https://www.wowinterface.com/forums/index.php)
-   General Authoring Discussion (https://www.wowinterface.com/forums/forumdisplay.php?f=20)
-   -   Template frames (https://www.wowinterface.com/forums/showthread.php?t=18285)

Scale 09-24-08 04:09 PM

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 :rolleyes:),
Which is semi transparent and can be moved by mouse.

Thanks for reading.

Duugu 09-24-08 04:19 PM

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()


Scale 09-25-08 02:01 AM

Thanks Duugu,
Its perfect!


All times are GMT -6. The time now is 02:45 AM.

vBulletin © 2020, Jelsoft Enterprises Ltd
© 2004 - 2020 MMOUI