- added variable text size for the menus
- added disenchanting and prospecting to the menu
- changed the text on the option to hide the main button to standalone button
This commit is contained in:
Anch
2023-10-25 14:03:09 +13:00
parent 5b9beb5c3e
commit ccc268d5cc
3 changed files with 67 additions and 35 deletions
+32 -2
View File
@@ -10,6 +10,8 @@ end
function PM:OpenOptions()
if InterfaceOptionsFrame:GetWidth() < 850 then InterfaceOptionsFrame:SetWidth(850) end
PM:DropDownInitialize()
UIDropDownMenu_SetText(ProfessionMenuOptions_TxtSizeMenu, PM.db.txtSize)
end
--Creates the options frame and all its assets
@@ -27,7 +29,7 @@ end
hideMenu.Lable = hideMenu:CreateFontString(nil , "BORDER", "GameFontNormal")
hideMenu.Lable:SetJustifyH("LEFT")
hideMenu.Lable:SetPoint("LEFT", 30, 0)
hideMenu.Lable:SetText("Hide Main Menu")
hideMenu.Lable:SetText("Hide Standalone Button")
hideMenu:SetScript("OnClick", function()
if PM.db.HideMenu then
ProfessionMenuFrame:Show()
@@ -68,10 +70,38 @@ end
hideMinimap:SetScript("OnClick", function() PM:ToggleMinimap() end)
local itemDel = CreateFrame("CheckButton", "ProfessionMenuOptions_DeleteMenu", ProfessionMenuOptionsFrame, "UICheckButtonTemplate")
itemDel:SetPoint("TOPLEFT", 15, -160)
itemDel:SetPoint("TOPLEFT", 15, -165)
itemDel.Lable = itemDel:CreateFontString(nil , "BORDER", "GameFontNormal")
itemDel.Lable:SetJustifyH("LEFT")
itemDel.Lable:SetPoint("LEFT", 30, 0)
itemDel.Lable:SetText("Delete anvil after summoning")
itemDel:SetScript("OnClick", function() PM.db.DeleteItem = not PM.db.DeleteItem end)
local txtSize = CreateFrame("Button", "ProfessionMenuOptions_TxtSizeMenu", ProfessionMenuOptionsFrame, "UIDropDownMenuTemplate")
txtSize:SetPoint("TOPLEFT", 15, -200)
txtSize.Lable = txtSize:CreateFontString(nil , "BORDER", "GameFontNormal")
txtSize.Lable:SetJustifyH("LEFT")
txtSize.Lable:SetPoint("LEFT", txtSize, 190, 0)
txtSize.Lable:SetText("Menu Text Size")
local function options_Menu_Initialize()
local info
for i = 10, 25 do
info = {
text = i;
func = function()
PM.db.txtSize = i
local thisID = this:GetID();
UIDropDownMenu_SetSelectedID(ProfessionMenuOptions_TxtSizeMenu, thisID)
end;
};
UIDropDownMenu_AddButton(info);
end
end
function PM:DropDownInitialize()
--Setup for Dropdown menus in the settings
UIDropDownMenu_Initialize(ProfessionMenuOptions_TxtSizeMenu, options_Menu_Initialize)
UIDropDownMenu_SetSelectedID(ProfessionMenuOptions_TxtSizeMenu)
UIDropDownMenu_SetWidth(ProfessionMenuOptions_TxtSizeMenu, 150)
end