mirror of
https://github.com/brues-code/pfUI.git
synced 2026-09-29 02:36:02 +00:00
panel: add microbutton menubar
This commit is contained in:
@@ -33,6 +33,7 @@ function pfUI:LoadConfig()
|
||||
pfUI:UpdateConfig("panel", "right", "center", "time")
|
||||
pfUI:UpdateConfig("panel", "right", "right", "gold")
|
||||
pfUI:UpdateConfig("panel", "other", "minimap", "zone")
|
||||
pfUI:UpdateConfig("panel", "micro", "enable", "0")
|
||||
pfUI:UpdateConfig("panel", "xp", "showalways", "0")
|
||||
pfUI:UpdateConfig("castbar", "player", "hide_blizz", "1")
|
||||
pfUI:UpdateConfig("tooltip", nil, "position", "bottom")
|
||||
|
||||
+3
-1
@@ -81,7 +81,8 @@ pfUI:RegisterModule("gui", function ()
|
||||
local movable = { pfUI.minimap, pfUI.chat.left, pfUI.chat.right,
|
||||
pfUI.uf.player, pfUI.uf.target, pfUI.uf.targettarget, pfUI.uf.pet,
|
||||
pfUI.bars.shapeshift, pfUI.bars.bottomleft, pfUI.bars.bottomright,
|
||||
pfUI.bars.vertical, pfUI.bars.pet, pfUI.bars.bottom, pfUI.panel.minimap,
|
||||
pfUI.bars.vertical, pfUI.bars.pet, pfUI.bars.bottom,
|
||||
pfUI.panel.minimap, pfUI.panel.microbutton,
|
||||
pfUI.uf.group[1], pfUI.uf.group[2], pfUI.uf.group[3], pfUI.uf.group[4],
|
||||
pfUI.uf.raid[1], pfUI.uf.raid[2], pfUI.uf.raid[3], pfUI.uf.raid[4], pfUI.uf.raid[5],
|
||||
pfUI.uf.raid[6], pfUI.uf.raid[7], pfUI.uf.raid[8], pfUI.uf.raid[9], pfUI.uf.raid[10],
|
||||
@@ -602,6 +603,7 @@ pfUI:RegisterModule("gui", function ()
|
||||
pfUI.gui:CreateConfig(pfUI.gui.panel, "Right Panel: Right", pfUI_config.panel.right, "right", "dropdown", values)
|
||||
pfUI.gui:CreateConfig(pfUI.gui.panel, "Other Panel: Minimap", pfUI_config.panel.other, "minimap", "dropdown", values)
|
||||
pfUI.gui:CreateConfig(pfUI.gui.panel, "Always show XP and Reputation Bar", pfUI_config.panel.xp, "showalways", "checkbox")
|
||||
pfUI.gui:CreateConfig(pfUI.gui.panel, "Show Menubar", pfUI_config.panel.micro, "enable", "checkbox")
|
||||
|
||||
-- tooltip
|
||||
pfUI.gui.tooltip = pfUI.gui:CreateConfigTab("Tooltip")
|
||||
|
||||
@@ -316,4 +316,41 @@ pfUI:RegisterModule("panel", function ()
|
||||
pfUI.panel.minimap.text:SetPoint("CENTER", 0, 0)
|
||||
pfUI.panel.minimap.text:SetFontObject(GameFontWhite)
|
||||
pfUI.panel.minimap.text:SetText("[DUMMY]")
|
||||
|
||||
-- MicroButtons
|
||||
if pfUI_config.panel.micro.enable == "1" then
|
||||
pfUI.panel.microbutton = CreateFrame("Frame", "pfPanelMicroButton", UIParent)
|
||||
pfUI.panel.microbutton:SetPoint("TOP", 0, 0)
|
||||
pfUI.utils:loadPosition(pfUI.panel.microbutton)
|
||||
pfUI.panel.microbutton:SetHeight(23)
|
||||
pfUI.panel.microbutton:SetWidth(145)
|
||||
pfUI.panel.microbutton:SetFrameStrata("BACKGROUND")
|
||||
|
||||
local MICRO_BUTTONS = {
|
||||
'CharacterMicroButton', 'SpellbookMicroButton', 'TalentMicroButton',
|
||||
'QuestLogMicroButton', 'SocialsMicroButton', 'WorldMapMicroButton',
|
||||
'MainMenuMicroButton', 'HelpMicroButton',
|
||||
}
|
||||
|
||||
for i=1,table.getn(MICRO_BUTTONS) do
|
||||
local anchor = getglobal(MICRO_BUTTONS[i-1]) or pfUI.panel.microbutton
|
||||
local button = getglobal(MICRO_BUTTONS[i])
|
||||
button:ClearAllPoints()
|
||||
button:SetParent(pfUI.panel.microbutton)
|
||||
if i == 1 then
|
||||
button:SetPoint("LEFT", pfUI.panel.microbutton, "LEFT", 1, 10)
|
||||
else
|
||||
button:SetPoint("TOPLEFT", anchor, "TOPRIGHT", 1, 0)
|
||||
end
|
||||
|
||||
button:SetScale(.6)
|
||||
button.frame = CreateFrame("Frame", "backdrop", button)
|
||||
button.frame:SetScale(1.4)
|
||||
button.frame:SetPoint("TOPLEFT", button, "TOPLEFT", 1, -16)
|
||||
button.frame:SetPoint("BOTTOMRIGHT", button, "BOTTOMRIGHT", -1, 1)
|
||||
button.frame:SetBackdrop(pfUI.backdrop)
|
||||
button.frame:SetBackdropColor(0,0,0,0)
|
||||
button:Show()
|
||||
end
|
||||
end
|
||||
end)
|
||||
|
||||
Reference in New Issue
Block a user