/trunk
Copyright (c) 2012-2014 Phanx. All rights reserved. |
Permission is granted for anyone to use, read, or otherwise interpret |
this software for any purpose, without any restrictions. |
Permission is granted for anyone to modify this software or sample from |
it, and to distribute such modified versions or derivative works as long |
as neither the names of this software nor its author(s) are used in the |
name or title of the work or in any other way that may cause it to be |
confused with this software. |
Permission is granted for anyone to aggregate this software with other |
works not derived from this software for the purpose of creating a user |
interface compilation for "World of Warcraft" and to distribute such |
compilations as long as the software is not modified in any way, |
including by modifying or removing any files. |
This software may not be distributed standalone or in any other way, in |
whole or in part, modified or unmodified, without specific prior written |
permission from the author(s) of this software. |
The names of this software and/or its author(s) may not be used to |
promote or endorse works derived from this software without specific |
prior written permission from the author(s) of this software. |
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, |
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF |
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. |
IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR |
OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, |
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR |
OTHER DEALINGS IN THE SOFTWARE. |
local ADDON, Addon = ... |
PhanxFontDB = { |
normal = "Asap", |
bold = "Asap Bold", |
scale = 1.25, |
} |
local NORMAL = [[Interface\AddOns\PhanxMedia\font\Asap.ttf]] |
local BOLD = [[Interface\AddOns\PhanxMedia\font\Asap-Bold.ttf]] |
local BOLDITALIC = BOLD |
local ITALIC = NORMAL |
local NUMBER = BOLD |
------------------------------------------------------------------------ |
local function SetFont(obj, font, size, style, r, g, b, sr, sg, sb, sox, soy) |
obj:SetFont(font, floor(size * PhanxFontDB.scale + 0.5), style) |
if sr and sg and sb then |
obj:SetShadowColor(sr, sg, sb) |
end |
if sox and soy then |
obj:SetShadowOffset(sox, soy) |
end |
if r and g and b then |
obj:SetTextColor(r, g, b) |
elseif r then |
obj:SetAlpha(r) |
end |
end |
function Addon:SetFonts(event, addon) |
NORMAL = LibStub("LibSharedMedia-3.0"):Fetch("font", PhanxFontDB.normal) |
BOLD = LibStub("LibSharedMedia-3.0"):Fetch("font", PhanxFontDB.bold) |
BOLDITALIC = BOLD |
ITALIC = NORMAL |
NUMBER = BOLD |
UNIT_NAME_FONT = NORMAL |
NAMEPLATE_FONT = BOLD |
DAMAGE_TEXT_FONT = NUMBER |
STANDARD_TEXT_FONT = NORMAL |
-- Base fonts |
SetFont(AchievementFont_Small, BOLD, 12) |
SetFont(CoreAbilityFont, BOLD, 32) |
SetFont(DestinyFontHuge, BOLD, 32) |
SetFont(DestinyFontLarge, BOLD, 18) |
SetFont(FriendsFont_Large, NORMAL, 15, nil, nil, nil, nil, 0, 0, 0, 1, -1) |
SetFont(FriendsFont_Normal, NORMAL, 13, nil, nil, nil, nil, 0, 0, 0, 1, -1) |
SetFont(FriendsFont_Small, NORMAL, 11, nil, nil, nil, nil, 0, 0, 0, 1, -1) |
SetFont(FriendsFont_UserText, NUMBER, 12, nil, nil, nil, nil, 0, 0, 0, 1, -1) |
SetFont(GameTooltipHeader, BOLD, 15, "OUTLINE") |
SetFont(GameFont_Gigantic, BOLD, 32, nil, nil, nil, nil, 0, 0, 0, 1, -1) |
SetFont(InvoiceFont_Med, ITALIC, 13, nil, 0.15, 0.09, 0.04) |
SetFont(InvoiceFont_Small, ITALIC, 11, nil, 0.15, 0.09, 0.04) |
SetFont(MailFont_Large, ITALIC, 15, nil, 0.15, 0.09, 0.04, 0.54, 0.4, 0.1, 1, -1) |
SetFont(NumberFont_OutlineThick_Mono_Small, NUMBER, 13, "OUTLINE") |
SetFont(NumberFont_Outline_Huge, NUMBER, 30, "THICKOUTLINE", 30) |
SetFont(NumberFont_Outline_Large, NUMBER, 17, "OUTLINE") |
SetFont(NumberFont_Outline_Med, NUMBER, 15, "OUTLINE") |
SetFont(NumberFont_Shadow_Med, NORMAL, 14) |
SetFont(NumberFont_Shadow_Small, NORMAL, 12) |
SetFont(QuestFont_Shadow_Small, NORMAL, 16) |
SetFont(QuestFont_Large, NORMAL, 16) |
SetFont(QuestFont_Shadow_Huge, BOLD, 19, nil, nil, nil, nil, 0.54, 0.4, 0.1) |
SetFont(QuestFont_Super_Huge, BOLD, 24) |
SetFont(ReputationDetailFont, BOLD, 12, nil, nil, nil, nil, 0, 0, 0, 1, -1) |
SetFont(SpellFont_Small, BOLD, 11) |
SetFont(SystemFont_InverseShadow_Small, BOLD, 11) |
SetFont(SystemFont_Large, NORMAL, 17) |
SetFont(SystemFont_Med1, NORMAL, 13) |
SetFont(SystemFont_Med2, ITALIC, 14, nil, 0.15, 0.09, 0.04) |
SetFont(SystemFont_Med3, NORMAL, 15) |
SetFont(SystemFont_OutlineThick_Huge2, NORMAL, 22, "THICKOUTLINE") |
SetFont(SystemFont_OutlineThick_Huge4, BOLDITALIC, 27, "THICKOUTLINE") |
SetFont(SystemFont_OutlineThick_WTF, BOLDITALIC, 31, "THICKOUTLINE", nil, nil, nil, 0, 0, 0, 1, -1) |
SetFont(SystemFont_Outline_Small, NUMBER, 13, "OUTLINE") |
SetFont(SystemFont_Outline, NUMBER, 13, "OUTLINE") |
SetFont(SystemFont_Shadow_Huge1, BOLD, 20) |
SetFont(SystemFont_Shadow_Huge3, BOLD, 25) |
SetFont(SystemFont_Shadow_Large, NORMAL, 17) |
SetFont(SystemFont_Shadow_Med1, NORMAL, 13) |
SetFont(SystemFont_Shadow_Med2, NORMAL, 14) |
SetFont(SystemFont_Shadow_Med3, NORMAL, 15) |
SetFont(SystemFont_Shadow_Outline_Huge2, NORMAL, 22, "OUTLINE") |
SetFont(SystemFont_Shadow_Small, NORMAL, 11) -- was BOLD, used in dropdown menus |
SetFont(SystemFont_Small, NORMAL, 12) |
SetFont(SystemFont_Tiny, NORMAL, 11) |
SetFont(Tooltip_Med, NORMAL, 13) |
SetFont(Tooltip_Small, BOLD, 12) |
-- Derived fonts |
SetFont(BossEmoteNormalHuge, BOLDITALIC, 27, "THICKOUTLINE") |
SetFont(CombatTextFont, NORMAL, 26) |
SetFont(ErrorFont, ITALIC, 16, nil, 60) |
SetFont(QuestFontNormalSmall, BOLD, 13, nil, nil, nil, nil, 0.54, 0.4, 0.1) |
SetFont(WorldMapTextFont, BOLDITALIC, 31, "THICKOUTLINE", 40, nil, nil, 0, 0, 0, 1, -1) |
--[[ Fancy stuff! |
SetFont(ZoneTextFont, BOLD, 31, "THICKOUTLINE") -- inherits SystemFont_OutlineThick_WTF |
SetFont(SubZoneTextFont, BOLD, 27, "THICKOUTLINE") -- inherits SystemFont_OutlineThick_Huge4 |
SetFont(PVPInfoTextFont, NORMAL, 22, "THICKOUTLINE") -- inherits SystemFont_OutlineThick_Huge2 |
]] |
-- Language override fonts |
for _, fobj in pairs({ |
GameFontNormalKO, |
GameFontNormalRU, |
GameFontNormalZH, |
}) do |
local font, _, outline = fobj:GetFont() |
SetFont(fobj, font, 13, outline) -- size should match SystemFont_Shadow_Med1 |
end |
for _, fobj in pairs({ |
ChatFontNormalKO, |
ChatFontNormalRU, |
ChatFontNormalZH, |
}) do |
local font, _, outline = fobj:GetFont() |
SetFont(fobj, font, 14, outline) -- size should match NumberFont_Shadow_Med |
end |
for _, fobj in pairs({ |
FriendsFont_LargeKO, |
FriendsFont_LargeRU, |
FriendsFont_LargeZH, |
}) do |
local font, _, outline = fobj:GetFont() |
SetFont(fobj, font, 15, outline) -- size should match FriendsFont_Large |
end |
for _, fobj in pairs({ |
FriendsFont_NormalKO, |
FriendsFont_NormalRU, |
FriendsFont_NormalZH, |
}) do |
local font, _, outline = fobj:GetFont() |
SetFont(fobj, font, 13, outline) -- size should match FriendsFont_Normal |
end |
for _, fobj in pairs({ |
FriendsFont_SmallKO, |
FriendsFont_SmallRU, |
FriendsFont_SmallZH, |
}) do |
local font, _, outline = fobj:GetFont() |
SetFont(fobj, font, 11, outline) -- size should match FriendsFont_Small |
end |
-- Chat frames |
local _, size = ChatFrame1:GetFont() |
FCF_SetChatWindowFontSize(nil, ChatFrame1, size) |
end |
------------------------------------------------------------------------ |
local f = CreateFrame("Frame", "PhanxFont") |
f:RegisterEvent("ADDON_LOADED") |
f:SetScript("OnEvent", function(self, event, addon) |
UIDROPDOWNMENU_DEFAULT_TEXT_HEIGHT = 14 |
CHAT_FONT_HEIGHTS = { 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24 } |
Addon:SetFonts() |
-- I have no idea why the channel list is getting fucked up |
-- but re-setting the font obj seems to fix it |
for i = 1, MAX_CHANNEL_BUTTONS do |
_G["ChannelButton"..i.."Text"]:SetFontObject(GameFontNormalSmallLeft) |
end |
for _, button in pairs(PaperDollTitlesPane.buttons) do |
button.text:SetFontObject(GameFontHighlightSmallLeft) |
end |
-- Fix help frame category buttons, NFI why they need fixing |
for i = 1, 6 do |
_G["HelpFrameButton"..i.."Text"]:SetFontObject(GameFontNormalMed3) |
end |
BattlePetTooltip.Name:SetFontObject(GameTooltipHeaderText) |
FloatingBattlePetTooltip.Name:SetFontObject(GameTooltipHeaderText) |
end) |
hooksecurefunc("FCF_SetChatWindowFontSize", function(self, frame, size) |
if not frame then |
frame = FCF_GetCurrentChatFrame() |
end |
if not size then |
size = self.value |
end |
-- Set all the other frames to the same size. |
for i = 1, 10 do |
local f = _G["ChatFrame"..i] |
if f then |
f:SetFont(NORMAL, size) |
SetChatWindowSize(i, size) |
end |
end |
-- Set the language override fonts to the same size. |
for _, f in pairs({ |
ChatFontNormalKO, |
ChatFontNormalRU, |
ChatFontNormalZH, |
}) do |
local font, _, outline = f:GetFont() |
f:SetFont(font, size, outline) |
end |
end) |
hooksecurefunc("BattlePetToolTip_Show", function() |
BattlePetTooltip:SetHeight(BattlePetTooltip:GetHeight() + 12) |
end) |
hooksecurefunc("FloatingBattlePet_Show", function() |
FloatingBattlePetTooltip:SetHeight(FloatingBattlePetTooltip:GetHeight() + 12) |
end) |
## Interface: 50400 |
## Version: 5.4.8.wowi:revision |
## Title: PhanxFont |
## Notes: Simple font replacement. |
## Notes-deDE: Einfacher Erzatz der Schriften. |
## Notes-esES: Sustitución de fuentes simple. |
## Notes-esMX: Sustitución de fuentes simple. |
## Author: Phanx |
## X-Email: addons@phanx.net |
## X-Credits: Based on tekticles by Tekkub, which is based on ClearFont2 by Kirkburn. |
## X-Copyright: Copyright (c) 2012-2014 Phanx. All rights reserved. |
## X-License: See the accompanying LICENSE file for details. |
## X-CompatibleLocales: enUS, deDE, esES, esMX, frFR, itIT, koKR, ptBR, ruRU, zhCN, zhTW |
## OptionalDeps: LibSharedMedia-3.0, PhanxConfigWidgets |
## SavedVariables: PhanxFontDB |
Libs\LibStub\LibStub.lua |
Libs\CallbackHandler-1.0\CallbackHandler-1.0.lua |
Libs\LibSharedMedia-3.0\LibSharedMedia-3.0.lua |
Libs\PhanxConfig-ScrollingDropdown\PhanxConfig-ScrollingDropdown.lua |
Libs\PhanxConfig-Slider\PhanxConfig-Slider.lua |
Addon.lua |
Options.lua |
local ADDON, Addon = ... |
local L = setmetatable({}, { |
__index = function(t, k) |
local v = tostring(k) |
t[k] = v |
return v |
end |
}) |
if GetLocale() == "deDE" then |
L["Normal Font"] = "Normalschrift" |
L["Bold Font"] = "Fettschrift" |
L["Scale"] = "GröÃe" |
L["Reload UI"] = "UI neu laden" |
L["Apply"] = "Anwenden" |
elseif GetLocale():match("^es") then |
L["Normal Font"] = "Fuente normal" |
L["Bold Font"] = "Fuente en negrita" |
L["Scale"] = "Tamaño" |
L["Reload UI"] = "Recargar IU" |
L["Apply"] = "Aplicar" |
end |
local Options = CreateFrame("Frame", "PhanxFontOptions", InterfaceOptionsFramePanelContainer) |
Options.name = GetAddOnMetadata(ADDON, "Title") or ADDON |
Options:Hide() |
Options:SetScript("OnShow", function(self) |
local Title = self:CreateFontString(nil, "ARTWORK", "GameFontNormalLarge") |
Title:SetPoint("TOPLEFT", 16, -16) |
Title:SetText(self.name) |
local Notes = self:CreateFontString(nil, "ARTWORK", "GameFontHighlightSmall") |
Notes:SetPoint("TOPLEFT", Title, "BOTTOMLEFT", 0, -8) |
Notes:SetPoint("RIGHT", -32, 0) |
Notes:SetHeight(32) |
Notes:SetJustifyH("LEFT") |
Notes:SetJustifyV("TOP") |
Notes:SetText(GetAddOnMetadata(ADDON, "Notes")) |
local Media = LibStub("LibSharedMedia-3.0") |
local UpdatePreviews, SampleText |
---------- |
local NormalFont = LibStub("PhanxConfig-ScrollingDropdown"):New(self, L["Normal Font"], nil, Media:List("font")) |
NormalFont:SetPoint("TOPLEFT", Notes, "BOTTOMLEFT", 0, -8) |
NormalFont:SetPoint("TOPRIGHT", Notes, "BOTTOM", -8, -8) |
function NormalFont:Callback(value) |
local _, height, flags = self.valueText:GetFont() |
self.valueText:SetFont(Media:Fetch("font", value), height, flags) |
PhanxFontDB.normal = value |
UpdatePreviews() |
end |
function NormalFont:ListButtonCallback(button, value, selected) |
if button:IsShown() then |
button.label:SetFont(Media:Fetch("font", value), UIDROPDOWNMENU_DEFAULT_TEXT_HEIGHT) |
end |
end |
NormalFont.__SetValue = NormalFont.SetValue |
function NormalFont:SetValue(value) |
local _, height, flags = self.valueText:GetFont() |
self.valueText:SetFont(Media:Fetch("font", value), height, flags) |
self:__SetValue(value) |
end |
---------- |
local BoldFont = LibStub("PhanxConfig-ScrollingDropdown"):New(self, L["Bold Font"], nil, Media:List("font")) |
BoldFont:SetPoint("TOPLEFT", NormalFont, "BOTTOMLEFT", 0, -16) |
BoldFont:SetPoint("TOPRIGHT", NormalFont, "BOTTOMRIGHT", 0, -16) |
function BoldFont:Callback(value) |
local _, height, flags = self.valueText:GetFont() |
self.valueText:SetFont(Media:Fetch("font", value), height, flags) |
PhanxFontDB.bold = value |
UpdatePreviews() |
end |
function BoldFont:ListButtonCallback(button, value, selected) |
if button:IsShown() then |
button.label:SetFont(Media:Fetch("font", value), UIDROPDOWNMENU_DEFAULT_TEXT_HEIGHT) |
end |
end |
BoldFont.__SetValue = BoldFont.SetValue |
function BoldFont:SetValue(value) |
local _, height, flags = self.valueText:GetFont() |
self.valueText:SetFont(Media:Fetch("font", value), height, flags) |
self:__SetValue(value) |
end |
---------- |
local Scale = LibStub("PhanxConfig-Slider"):New(self, L["Scale"], nil, 0.5, 2, 0.05, true) |
Scale:SetPoint("TOPLEFT", BoldFont, "BOTTOMLEFT", 0, -16) |
Scale:SetPoint("TOPRIGHT", BoldFont, "BOTTOMRIGHT", 0, -16) |
function Scale:Callback(value) |
PhanxFontDB.scale = value |
UpdatePreviews() |
end |
---------- |
local ReloadButton = CreateFrame("Button", "$parentReloadButton", self, "UIPanelButtonTemplate") |
ReloadButton:SetPoint("BOTTOMLEFT", 16, 16) |
ReloadButton:SetSize(96, 22) |
ReloadButton:SetText(L["Reload UI"]) |
ReloadButton:SetScript("OnClick", ReloadUI) |
local ApplyButton = CreateFrame("Button", "$parentApplyButton", self, "UIPanelButtonTemplate") |
ApplyButton:SetPoint("BOTTOMLEFT", ReloadButton, "BOTTOMRIGHT") |
ApplyButton:SetSize(96, 22) |
ApplyButton:SetText(L["Apply"]) |
ApplyButton:SetScript("OnClick", Addon.SetFonts) |
---------- |
SampleText = self:CreateFontString(nil, "ARTWORK", "GameFontHighlight") |
SampleText:SetPoint("TOPLEFT", BoldFont, "BOTTOMLEFT", 0, -16) |
SampleText:SetPoint("TOPRIGHT", BoldFont, "BOTTOMRIGHT", 0, -16) |
SampleText:SetPoint("BOTTOMLEFT", ReloadButton, "TOPLEFT", 0, 16) |
SampleText:SetJustifyH("LEFT") |
SampleText:SetText("The quick brown fox jumps over the lazy dog.\n\nÃá Ãä Ãé Ãà Ãñ Ãó Ãö à Ãú Ãü\n¡! ¿? # $ ⬠% & ° â â\nâqâ âqâ âqâ âqâ «q» â¹qâº\n^ â ") |
---------- |
local ScrollBG = CreateFrame("Frame", nil, self) |
ScrollBG:SetPoint("TOPLEFT", Notes, "BOTTOM", 8, 0) |
ScrollBG:SetPoint("BOTTOMRIGHT", self, -16, 16) |
ScrollBG:SetBackdrop({ bgFile = "Interface\\BUTTONS\\WHITE8X8", tile = true, tileSize = 8, edgeFile = "Interface\\Tooltips\\UI-Tooltip-Border", edgeSize = 16, insets = { left = 4, right = 4, top = 4, bottom = 4 }}) |
ScrollBG:SetBackdropColor(0, 0, 0, 0.4) |
ScrollBG:SetBackdropBorderColor(1, 1, 1, 0.6) |
local ScrollFrame = CreateFrame("ScrollFrame", "$parentScrollFrame", ScrollBG, "UIPanelScrollFrameTemplate") |
ScrollFrame:SetPoint("TOPLEFT", ScrollBG, 5, -5) |
ScrollFrame:SetPoint("BOTTOMRIGHT", ScrollBG, -27, 5) |
local ScrollBarBG = ScrollFrame.ScrollBar:CreateTexture(nil, "BACKGROUND") |
ScrollBarBG:SetAllPoints(true) |
ScrollBarBG:SetTexture(0, 0, 0, 0.4) |
local ScrollChild = CreateFrame("Frame", "$parentScrollChildFrame", ScrollFrame) |
ScrollChild:SetPoint("TOPLEFT") |
ScrollChild:SetWidth(ScrollFrame:GetWidth()) |
ScrollChild:SetHeight(500) -- temp |
--[[ |
local ScrollChildBG = ScrollChild:CreateTexture(nil, "BACKGROUND") |
ScrollChildBG:SetAllPoints(true) |
ScrollChildBG:SetTexture(0, 0, 0, 0.2) |
]] |
ScrollFrame:SetScrollChild(ScrollChild) |
ScrollFrame:SetScript("OnSizeChanged", function(_, width, height) |
ScrollChild:SetWidth(width) |
end) |
----- |
local fonts = { |
"GameFontNormal", |
"GameFontHighlight", |
"GameFontDisable", |
"GameFontNormalSmall", |
"GameFontHighlightExtraSmall", |
"GameFontHighlightMedium", |
"GameFontNormalLarge", |
"GameFontNormalHuge", |
"GameFont_Gigantic", |
"BossEmoteNormalHuge", |
"NumberFontNormal", |
"NumberFontNormalSmall", |
"NumberFontNormalLarge", |
"NumberFontNormalHuge", |
"ChatFontNormal", |
"ChatFontSmall", |
"DialogButtonNormalText", |
"ZoneTextFont", |
"SubZoneTextFont", |
"PVPInfoTextFont", |
"QuestFont_Super_Huge", |
"QuestFont_Shadow_Small", |
"ErrorFont", |
"TextStatusBarText", |
"CombatLogFont", |
"GameTooltipText", |
"GameTooltipTextSmall", |
"GameTooltipHeaderText", |
} |
local bolds = { |
GameFontNormalHuge = true, |
GameFont_Gigantic = true, |
BossEmoteNormalHuge = true, |
NumberFontNormal = true, |
NumberFontNormalSmall = true, |
NumberFontNormalLarge = true, |
NumberFontNormalHuge = true, |
ZoneTextFont = true, |
SubZoneTextFont = true, |
QuestFont_Super_Huge = true, |
TextStatusBarText = true, |
GameTooltipHeaderText = true, |
} |
for i = 1, #fonts do |
local font = fonts[i] |
local fs = ScrollChild:CreateFontString(nil, "ARTWORK") |
if i == 1 then |
fs:SetPoint("TOPLEFT", ScrollChild, 5, -5) |
else |
fs:SetPoint("TOPLEFT", fonts[i-1], "BOTTOMLEFT", 0, -5) |
end |
fs:SetFontObject(font) |
fs:SetText(font) |
fs.font = font |
fonts[i] = fs |
end |
function UpdatePreviews(width) |
-- print(strjoin(" | ", "UpdatePreviews", PhanxFontDB.normal, PhanxFontDB.bold, PhanxFontDB.scale)) |
local NORMAL = Media:Fetch("font", PhanxFontDB.normal) |
local BOLD = Media:Fetch("font", PhanxFontDB.bold) |
SampleText:SetFont(NORMAL, 14 * PhanxFontDB.scale) |
local height = 5 |
for i = 1, #fonts do |
local fs = fonts[i] |
local file = bolds[fs.font] and BOLD or NORMAL |
local _, size, flag = fs:GetFont() |
fs:SetFont(file, size, flag) |
height = height + fs:GetHeight() + 5 |
end |
ScrollChild:SetHeight(height) |
end |
function self:refresh() |
NormalFont:SetValue(PhanxFontDB.normal) |
BoldFont:SetValue(PhanxFontDB.bold) |
Scale:SetValue(PhanxFontDB.scale) |
UpdatePreviews(width) |
end |
self:SetScript("OnShow", nil) |
self:refresh() |
end) |
InterfaceOptions_AddCategory(Options) |
SLASH_PHANXFONT1 = "/font" |
SLASH_PHANXFONT2 = "/schrift" |
SlashCmdList.PHANXFONT = function() |
InterfaceOptionsFrame_OpenToCategory(Options) |
InterfaceOptionsFrame_OpenToCategory(Options) |
end |