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