adam@0: local _, AskMrRobot = ... adam@0: adam@0: -- initialize the RobotStamp class (inherit from Frame) adam@0: AskMrRobot.RobotStamp = AskMrRobot.inheritsFrom(AskMrRobot.Frame) adam@0: adam@0: -- item icon contructor adam@0: function AskMrRobot.RobotStamp:new(name, parent) adam@0: -- create a new frame (if one isn't supplied) adam@0: local o = AskMrRobot.Frame:new(name, parent) adam@0: adam@0: -- use the RobotStamp class adam@0: setmetatable(o, { __index = AskMrRobot.RobotStamp }) adam@0: adam@0: o:SetPoint("TOPLEFT", parent, "TOPLEFT") adam@0: o:SetPoint("RIGHT", parent, "RIGHT") adam@0: o:SetHeight(80); adam@0: adam@0: o.bigText = o:CreateFontString(nil, "ARTWORK", "GameFontNormalHuge") adam@0: o.bigText:SetTextColor(7/255, 166/255, 11/255) adam@0: local file, _, flags = o.bigText:GetFont() adam@0: o.bigText:SetFont(file, 24, flags) adam@0: o.bigText:SetText("ROBOT STAMP OF APPROVAL") adam@0: o.bigText:SetPoint("TOPLEFT", o, "TOPLEFT", 15, -20) adam@0: o.bigText:SetPoint("RIGHT", o, "RIGHT", -15, 0) adam@0: adam@0: o.smallText = o:CreateFontString(nil, "ARTWORK", "GameFontWhite") adam@0: o.smallText:SetText("Your gems are 100% optimal! You are truly, truly outrageous.") adam@0: o.smallText:SetPoint("TOPLEFT", o.bigText, "BOTTOMLEFT", 0, -7) adam@0: o.smallText:SetPoint("RIGHT", o, "RIGHT", -15, 0) adam@0: o.smallText:SetWidth(o.smallText:GetWidth()) adam@0: o.smallText:SetJustifyH("CENTER") adam@0: adam@0: o:SetBackdrop({edgeFile = "Interface\\AddOns\\AskMrRobot\\Media\\round-edge-big", edgeSize = 16}) adam@0: o:SetBackdropBorderColor(7/255, 166/255, 11/255) adam@0: adam@0: -- return the instance of the RobotStamp adam@0: return o adam@0: end