view ui/RobotStamp.lua @ 51:6f1bb8fcf64d v18

AskMrRobot.toc - Added line for new SettingsTab file AskMrRobotUi.lua - Added code for new Settings menu amr-constants.lua - Added instance IDs for all WoD 6.0 5-mans and Raids. - Removed legacy SoO IDs. config.lua - Removed "Interface/Addons" options area, migrated all settings to main addon window. localization/localization.en.lua - Added new strings for new Settings tab and new Raid auto-logging ui/CombatLogTab.lua - Removed legacy SoO code - Added auto-logging settings for Highmaul and Blackrock Foundry. ui/SettingsTab.lua - new main window tab for Minimap and Auction House settings options
author TuhMuffinMan <TuhMuffinMan>
date Fri, 28 Nov 2014 13:09:52 -0600
parents ece9167c0d1c
children
line wrap: on
line source
local _, AskMrRobot = ...
local L = AskMrRobot.L;

-- initialize the RobotStamp class (inherit from Frame)
AskMrRobot.RobotStamp = AskMrRobot.inheritsFrom(AskMrRobot.Frame)

-- item icon contructor
function AskMrRobot.RobotStamp:new(name, parent)
	-- create a new frame (if one isn't supplied)
	local o = AskMrRobot.Frame:new(name, parent)

	-- use the RobotStamp class
	setmetatable(o, { __index = AskMrRobot.RobotStamp })

	o:SetPoint("TOPLEFT", parent, "TOPLEFT")
	o:SetPoint("RIGHT", parent, "RIGHT")
	o:SetHeight(80);

	o.bigText = o:CreateFontString(nil, "ARTWORK", "GameFontNormalHuge")
	o.bigText:SetTextColor(7/255, 166/255, 11/255)
	local file, _, flags = o.bigText:GetFont()
	o.bigText:SetFont(file, 24, flags)
	o.bigText:SetText(L.AMR_ROBOTSTAMP_TEXT)
	o.bigText:SetPoint("TOPLEFT", o, "TOPLEFT", 15, -20)
	o.bigText:SetPoint("RIGHT", o, "RIGHT", -15, 0)

	o.smallText = o:CreateFontString(nil, "ARTWORK", "GameFontWhite")
	o.smallText:SetText(AMR_ROBOTSTAMP_GEMS)
	o.smallText:SetPoint("TOPLEFT", o.bigText, "BOTTOMLEFT", 0, -7)
	o.smallText:SetPoint("RIGHT", o, "RIGHT", -15, 0)
	o.smallText:SetWidth(o.smallText:GetWidth())
	o.smallText:SetJustifyH("CENTER")

	o:SetBackdrop({edgeFile = "Interface\\AddOns\\AskMrRobot\\Media\\round-edge-big", edgeSize = 16})
	o:SetBackdropBorderColor(7/255, 166/255, 11/255)

	-- return the instance of the RobotStamp
	return o
end