Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix gap in micro menu in Classic Era #185

Closed
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 30 additions & 14 deletions MicroMenu.lua
Original file line number Diff line number Diff line change
Expand Up @@ -14,26 +14,42 @@ local ButtonBar = Bartender4.ButtonBar.prototype
local pairs, setmetatable, table_insert = pairs, setmetatable, table.insert

local WoWClassic = (WOW_PROJECT_ID ~= WOW_PROJECT_MAINLINE)
local WoWClassicEra = (WOW_PROJECT_ID == WOW_PROJECT_CLASSIC)
local WoW10 = select(4, GetBuildInfo()) >= 100000

-- GLOBALS: CharacterMicroButton, SpellbookMicroButton, TalentMicroButton, AchievementMicroButton, QuestLogMicroButton, GuildMicroButton
-- GLOBALS: LFDMicroButton, CollectionsMicroButton, EJMicroButton, MainMenuMicroButton
-- GLOBALS: HasVehicleActionBar, UnitVehicleSkin, HasOverrideActionBar, GetOverrideBarSkin

local BT_MICRO_BUTTONS = WoWClassic and CopyTable(MICRO_BUTTONS) or
{
"CharacterMicroButton",
"SpellbookMicroButton",
"TalentMicroButton",
"AchievementMicroButton",
"QuestLogMicroButton",
"GuildMicroButton",
"LFDMicroButton",
"CollectionsMicroButton",
"EJMicroButton",
"StoreMicroButton",
"MainMenuMicroButton",
local BT_MICRO_BUTTONS
if WoWClassicEra then
BT_MICRO_BUTTONS = {
"CharacterMicroButton",
"SpellbookMicroButton",
"TalentMicroButton",
"QuestLogMicroButton",
"SocialsMicroButton",
"WorldMapMicroButton",
"MainMenuMicroButton",
"HelpMicroButton"
}
elseif WoWClassic then
BT_MICRO_BUTTONS = CopyTable(MICRO_BUTTONS)
else
BT_MICRO_BUTTONS = {
"CharacterMicroButton",
"SpellbookMicroButton",
"TalentMicroButton",
"AchievementMicroButton",
"QuestLogMicroButton",
"GuildMicroButton",
"LFDMicroButton",
"CollectionsMicroButton",
"EJMicroButton",
"StoreMicroButton",
"MainMenuMicroButton",
}
end

-- create prototype information
local MicroMenuBar = setmetatable({}, {__index = ButtonBar})
Expand Down Expand Up @@ -61,7 +77,7 @@ function MicroMenuMod:OnEnable()
local buttons = {}

-- handle lfg/worldmap button on classic
if WoWClassic and C_LFGList and C_LFGList.IsLookingForGroupEnabled then
if WoWClassic and not WoWClassicEra and C_LFGList and C_LFGList.IsLookingForGroupEnabled then
tDeleteItem(BT_MICRO_BUTTONS, C_LFGList.IsLookingForGroupEnabled() and "WorldMapMicroButton" or "LFGMicroButton")
end

Expand Down
Loading