Skip to content

Commit

Permalink
Update game menu buttons for classic version
Browse files Browse the repository at this point in the history
  • Loading branch information
seblindfors committed Aug 26, 2023
1 parent 7bb584c commit 502e9d5
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 32 deletions.
2 changes: 1 addition & 1 deletion ConsolePort/ConsolePort.toc
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
## Title: Console Port
## Notes: Game controller addon
## AddonCompartmentFunc: ConsolePort
## Version: 2.6.13
## Version: 2.6.14

## Author: Sebastian Lindfors
## X-Website: https://github.com/seblindfors/ConsolePort
Expand Down
29 changes: 2 additions & 27 deletions ConsolePort_Menu/Menus/GameMenuFrame.lua
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ do -- Initiate frame
local baseTemplates = {'CPMenuButtonBaseTemplate', 'SecureActionButtonTemplate'};
local hideMenuHook = {hidemenu = true};
local PLAYER_CLASS = select(2, UnitClass('player'))
local IsWoW9Version = not CPAPI.IsRetailVersion or nil;
local IsClassicGameVersion = CPAPI.IsClassicVersion or CPAPI.IsClassicEraVersion or nil;

LibStub('Carpenter')(Menu, {
Expand Down Expand Up @@ -512,23 +511,11 @@ do -- Initiate frame
self.Icon:SetTexture([[Interface\TUTORIALFRAME\UI-TutorialFrame-GloveCursor]])
end;
};
Interface = IsWoW9Version and {
_ID = 6;
_Type = 'Button';
_Setup = baseTemplates;
_Point = {'TOP', 'parent.System', 'BOTTOM', 0, 0};
_Text = UIOPTIONS_MENU;
_RefTo = GameMenuButtonUIOptions;
_OnLoad = function(self)
CPMenuButtonMixin.OnLoad(self)
self.Icon:SetTexture([[Interface\TUTORIALFRAME\UI-TutorialFrame-GloveCursor]])
end;
};
AddOns = {
_ID = 7;
_Type = 'Button';
_Setup = baseTemplates;
_Point = {'TOP', CPAPI.IsRetailVersion and 'parent.EditMode' or 'parent.Interface', 'BOTTOM', 0, 0};
_Point = {'TOP', CPAPI.IsRetailVersion and 'parent.EditMode' or 'parent.System', 'BOTTOM', 0, 0};
_Text = ADDONS;
_RefTo = GameMenuButtonAddons;
_OnLoad = function(self)
Expand All @@ -545,23 +532,11 @@ do -- Initiate frame
_RefTo = GameMenuButtonMacros;
_Image = CPAPI.IsRetailVersion and 'Pet_Type_Magical' or 'Trade_Alchemy';
};
KeyBindings = IsWoW9Version and {
_ID = 9;
_Type = 'Button';
_Setup = baseTemplates;
_Point = {'TOP', 'parent.Macros', 'BOTTOM', 0, 0};
_Text = KEY_BINDINGS;
_RefTo = GameMenuButtonKeybindings;
_OnLoad = function(self)
CPMenuButtonMixin.OnLoad(self)
self.Icon:SetTexture([[Interface\MacroFrame\MacroFrame-Icon]])
end;
};
Help = {
_ID = 10;
_Type = 'Button';
_Setup = baseTemplates;
_Point = {'TOP', IsWoW9Version and 'parent.KeyBindings' or 'parent.Macros', 'BOTTOM', 0, 0};
_Point = {'TOP', 'parent.Macros', 'BOTTOM', 0, 0};
_Text = GAMEMENU_HELP;
_RefTo = GameMenuButtonHelp;
_Image = 'INV_Misc_QuestionMark';
Expand Down
5 changes: 1 addition & 4 deletions ConsolePort_World/LootFrame/LootFrame.lua
Original file line number Diff line number Diff line change
Expand Up @@ -105,9 +105,8 @@ LootFrame.CloseOnButton = {
}

function LootFrame:OnGamePadButtonDown(button)
self:SetPropagateKeyboardInput(false)
if Input:IsOverrideActive(CPAPI.CreateKeyChord(button)) then
return self:SetPropagateKeyboardInput(true)
return
end

if (button == 'PAD1') then
Expand All @@ -123,8 +122,6 @@ function LootFrame:OnGamePadButtonDown(button)
self:UpdateFocus(self.focusIndex - 1)
elseif (self.CloseOnButton[button]) then
CloseLoot()
else
self:SetPropagateKeyboardInput(true)
end
end

Expand Down

0 comments on commit 502e9d5

Please sign in to comment.