local addonname, addon = ...

local button = CreateFrame("button", addonname.."Button", UIParent)
button:SetFrameStrata("HIGH")
button:SetFrameLevel(0)
button.nextUpdate = 0
button:SetNormalFontObject("NumberFont_Shadow_Med")
button:SetHighlightFontObject("NumberFont_Outline_Med")
button:SetText(" ")
button.text = button:GetRegions()
button.icon = button:CreateTexture(nil, "border")
button:SetPoint("center")
button:SetWidth(18)
button:SetHeight(18)
button:SetClampedToScreen(true)
button.SetFormattedText = function(self, ...) self:SetText(string.format(...)) end
button.icon:SetTexture([==[Interface\AddOns\Addon_Memory\icon.tga]==]) -- 화수님의 HS_Mem 에서 가져왔어요
button.text:ClearAllPoints()
button.text:SetPoint("LEFT", button.icon, "RIGHT", 2, 0)
button.icon:ClearAllPoints()
button:SetParent(UIParent)
button.text:Show()
button:SetFrameStrata("MEDIUM")
button.icon:SetPoint("TOPLEFT", button, "TOPLEFT", 0, 0)
button.icon:SetPoint("BOTTOMRIGHT", button, "BOTTOMRIGHT", 0, 0)
button:SetHighlightTexture("Interface/Buttons/UI-ActionButton-Border")

addon:RegisterButton(button)