1
+ --[[
2
+
3
+ UI Layers
4
+
5
+ 1. background
6
+ 2. border
7
+ 3. artwork
8
+ 4. overlay
9
+ 5. highlight
10
+
11
+ ]] --
12
+
1
13
local height = 32
2
14
3
15
local x = 0
@@ -22,26 +34,23 @@ local frmMain = CreateFrame('Button','XYPos',UIParent)
22
34
frmMain :RegisterForClicks (' AnyUp' )
23
35
frmMain :SetScript (' OnClick' , OnClickXYPos )
24
36
frmMain :SetSize (170 , height )
25
- frmMain .t = frmMain :CreateTexture ()
26
37
frmMain :SetPoint (' TOP' )
27
- frmMain .t :SetColorTexture (0.5 ,0.5 ,0.5 ,0.3 )
28
- frmMain .t :SetAllPoints (frmMain )
29
-
30
- frmMain .Backdrop = CreateFrame (" Frame" , " Backdrop" , frmMain , " BackdropTemplate" )
31
- frmMain .Backdrop :SetAllPoints ()
32
- frmMain .Backdrop .backdropInfo = {
33
- bgFile = " Interface\\ DialogFrame\\ UI-DialogBox-Background" ,
34
- edgeFile = " Interface\\ DialogFrame\\ UI-DialogBox-Border" ,
35
- tile = true ,
36
- tileSize = 2 ,
37
- edgeSize = 2 ,
38
- insets = { left = 2 , right = 2 , top = 2 , bottom = 2 , },
38
+
39
+ local backdrop = CreateFrame (" Frame" , " Backdrop" , frmMain , " BackdropTemplate" )
40
+ backdrop :SetAllPoints ()
41
+ backdrop .backdropInfo = {
42
+ bgFile = nil , -- String - Which texture file to use as frame background (.blp or .tga format)
43
+ edgeFile = " Interface/Tooltips/UI-Tooltip-Border" , -- String- Which texture file to use as frame edge blp or .tga format)
44
+ tile = true , -- Boolean - whether background texture is tiled or streched
45
+ tileSize = 16 , -- Number - Control how large each copy of the bgFile becomes on-screen
46
+ edgeSize = 16 , -- Number - Control how large each copy of the edgeFile becomes on-screen (i.e. border thickness and corner size)
47
+ insets = { left = 4 , right = 4 , top = 4 , bottom = 4 , },
39
48
}
40
- frmMain . Backdrop :ApplyBackdrop ()
49
+ backdrop :ApplyBackdrop ()
41
50
frmMain :Show ()
42
51
43
52
local xyPos = frmMain :CreateFontString (frmMain , ' OVERLAY' , ' GameTooltipText' )
44
- xyPos :SetTextColor (1 ,1 , 1 , 1 )
53
+ xyPos :SetTextColor (1 , 1 , 1 , 1 )
45
54
xyPos :SetPoint (' CENTER' ,0 ,0 )
46
55
47
56
function round (number , precision )
0 commit comments