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