Mercurial > wow > askmrrobot
comparison ui/RobotStamp.lua @ 0:ec731d2fe6ba
Version 1.2.12.0
author | Adam tegen <adam.tegen@gmail.com> |
---|---|
date | Tue, 20 May 2014 21:43:23 -0500 |
parents | |
children | ece9167c0d1c |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:ec731d2fe6ba |
---|---|
1 local _, AskMrRobot = ... | |
2 | |
3 -- initialize the RobotStamp class (inherit from Frame) | |
4 AskMrRobot.RobotStamp = AskMrRobot.inheritsFrom(AskMrRobot.Frame) | |
5 | |
6 -- item icon contructor | |
7 function AskMrRobot.RobotStamp:new(name, parent) | |
8 -- create a new frame (if one isn't supplied) | |
9 local o = AskMrRobot.Frame:new(name, parent) | |
10 | |
11 -- use the RobotStamp class | |
12 setmetatable(o, { __index = AskMrRobot.RobotStamp }) | |
13 | |
14 o:SetPoint("TOPLEFT", parent, "TOPLEFT") | |
15 o:SetPoint("RIGHT", parent, "RIGHT") | |
16 o:SetHeight(80); | |
17 | |
18 o.bigText = o:CreateFontString(nil, "ARTWORK", "GameFontNormalHuge") | |
19 o.bigText:SetTextColor(7/255, 166/255, 11/255) | |
20 local file, _, flags = o.bigText:GetFont() | |
21 o.bigText:SetFont(file, 24, flags) | |
22 o.bigText:SetText("ROBOT STAMP OF APPROVAL") | |
23 o.bigText:SetPoint("TOPLEFT", o, "TOPLEFT", 15, -20) | |
24 o.bigText:SetPoint("RIGHT", o, "RIGHT", -15, 0) | |
25 | |
26 o.smallText = o:CreateFontString(nil, "ARTWORK", "GameFontWhite") | |
27 o.smallText:SetText("Your gems are 100% optimal! You are truly, truly outrageous.") | |
28 o.smallText:SetPoint("TOPLEFT", o.bigText, "BOTTOMLEFT", 0, -7) | |
29 o.smallText:SetPoint("RIGHT", o, "RIGHT", -15, 0) | |
30 o.smallText:SetWidth(o.smallText:GetWidth()) | |
31 o.smallText:SetJustifyH("CENTER") | |
32 | |
33 o:SetBackdrop({edgeFile = "Interface\\AddOns\\AskMrRobot\\Media\\round-edge-big", edgeSize = 16}) | |
34 o:SetBackdropBorderColor(7/255, 166/255, 11/255) | |
35 | |
36 -- return the instance of the RobotStamp | |
37 return o | |
38 end |