Skip to content

Commit

Permalink
Fixes for 10.0 (#66)
Browse files Browse the repository at this point in the history
* Fixes for 10.0

Changes required by new handling of cast bar. Kept back compatiblity with color setting as much as I could. best to my knowledge

* Fix to hide Blizzard frames

Fix to hide Blizzard frames

* Fix to hiding game frames

* Valida frame names

* Updated version of Ace

It is weird as previous commits did not pop issues with Ace, even when sarena was run alone. However now it has so I updated the Ace libraries.

* Fix for focus and target

This has taken me much more time than I'd like. But for some reason the on click function receives different parameters when not overwritten in sArena.xml resulting in typerelease instead of type. type is correctly returned when overwriting onclick in sarena.xml however this is not allowed as this is a secure function and cannot be called. As I am not sure what is the difference or how to steer it properly for now I am leaving type1 and type2 attributes as well as adding typerelease ones.

* Fix for focus and target when not using press and cast and ActionButtonUseKeyDown is true

From version 10 games checkes, before perfoming registered action, whether user has ActionButtonUseKeyDown set to true or false. If it does not match registered click, the action is rejected. Therfore it is needed to handle both situation so regardless of user setting the registered actions will work.

* Removed tabs

* Updated version to 3.2.0

* Removed tabs from xml file

* Removed commented out line

* Removed previous check of Blizzard Arena addon loaded

This addon no longer exists and seems it was changed to normal in game frame.

* Additional formating fixes

* Reverting incorrectly setup parameter for debugging

Not sure how that got commited in, reverting this change (used during debugging)

* Tab removals and format fixes in layouts

* Added new globals to pass the lua check

* Changed order
  • Loading branch information
MyGamesDevelopmentAcc authored Oct 30, 2022
1 parent 2b9d636 commit 346bb8e
Show file tree
Hide file tree
Showing 32 changed files with 636 additions and 427 deletions.
2 changes: 2 additions & 0 deletions .luacheckrc
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ exclude_files = {
}
read_globals = {
'AbbreviateLargeNumbers',
'ArenaEnemyFramesContainer',
'ArenaEnemyPrepFramesContainer',
'AuraUtil',
'C_PvP',
'C_Timer',
Expand Down
35 changes: 14 additions & 21 deletions Ace3/AceConfig-3.0/AceConfigCmd-3.0/AceConfigCmd-3.0.lua
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
--- AceConfigCmd-3.0 handles access to an options table through the "command line" interface via the ChatFrames.
-- @class file
-- @name AceConfigCmd-3.0
-- @release $Id: AceConfigCmd-3.0.lua 1202 2019-05-15 23:11:22Z nevcairiel $
-- @release $Id: AceConfigCmd-3.0.lua 1284 2022-09-25 09:15:30Z nevcairiel $

--[[
AceConfigCmd-3.0
Expand Down Expand Up @@ -37,17 +37,10 @@ local error, assert = error, assert
-- WoW APIs
local _G = _G

-- Global vars/functions that we don't upvalue since they might get hooked, or upgraded
-- List them here for Mikk's FindGlobals script
-- GLOBALS: LibStub, SELECTED_CHAT_FRAME, DEFAULT_CHAT_FRAME


local L = setmetatable({}, { -- TODO: replace with proper locale
__index = function(self,k) return k end
})



local function print(msg)
(SELECTED_CHAT_FRAME or DEFAULT_CHAT_FRAME):AddMessage(msg)
end
Expand Down Expand Up @@ -401,7 +394,7 @@ local function handle(info, inputpos, tab, depth, retfalse)
return
end

local str = strsub(info.input,inputpos);
local strInput = strsub(info.input,inputpos);

if tab.type=="execute" then
------------ execute --------------------------------------------
Expand All @@ -414,21 +407,21 @@ local function handle(info, inputpos, tab, depth, retfalse)

local res = true
if tab.pattern then
if not(type(tab.pattern)=="string") then err(info, inputpos, "'pattern' - expected a string") end
if not strmatch(str, tab.pattern) then
usererr(info, inputpos, "'"..str.."' - " .. L["invalid input"])
if type(tab.pattern)~="string" then err(info, inputpos, "'pattern' - expected a string") end
if not strmatch(strInput, tab.pattern) then
usererr(info, inputpos, "'"..strInput.."' - " .. L["invalid input"])
return
end
end

do_final(info, inputpos, tab, "set", str)
do_final(info, inputpos, tab, "set", strInput)



elseif tab.type=="toggle" then
------------ toggle --------------------------------------------
local b
local str = strtrim(strlower(str))
local str = strtrim(strlower(strInput))
if str=="" then
b = callmethod(info, inputpos, tab, "get")

Expand Down Expand Up @@ -465,9 +458,9 @@ local function handle(info, inputpos, tab, depth, retfalse)

elseif tab.type=="range" then
------------ range --------------------------------------------
local val = tonumber(str)
local val = tonumber(strInput)
if not val then
usererr(info, inputpos, "'"..str.."' - "..L["expected number"])
usererr(info, inputpos, "'"..strInput.."' - "..L["expected number"])
return
end
if type(info.step)=="number" then
Expand All @@ -487,7 +480,7 @@ local function handle(info, inputpos, tab, depth, retfalse)

elseif tab.type=="select" then
------------ select ------------------------------------
local str = strtrim(strlower(str))
local str = strtrim(strlower(strInput))

local values = tab.values
if type(values) == "function" or type(values) == "string" then
Expand Down Expand Up @@ -528,7 +521,7 @@ local function handle(info, inputpos, tab, depth, retfalse)

elseif tab.type=="multiselect" then
------------ multiselect -------------------------------------------
local str = strtrim(strlower(str))
local str = strtrim(strlower(strInput))

local values = tab.values
if type(values) == "function" or type(values) == "string" then
Expand Down Expand Up @@ -565,7 +558,7 @@ local function handle(info, inputpos, tab, depth, retfalse)

--check that the opt is valid
local ok
for k,v in pairs(values) do
for k in pairs(values) do
if strlower(k)==opt then
opt = k -- overwrite with key (in case of case mismatches)
ok = true
Expand Down Expand Up @@ -634,7 +627,7 @@ local function handle(info, inputpos, tab, depth, retfalse)

elseif tab.type=="color" then
------------ color --------------------------------------------
local str = strtrim(strlower(str))
local str = strtrim(strlower(strInput))
if str == "" then
--TODO: Show current value
return
Expand Down Expand Up @@ -706,7 +699,7 @@ local function handle(info, inputpos, tab, depth, retfalse)

elseif tab.type=="keybinding" then
------------ keybinding --------------------------------------------
local str = strtrim(strlower(str))
local str = strtrim(strlower(strInput))
if str == "" then
--TODO: Show current value
return
Expand Down
Loading

0 comments on commit 346bb8e

Please sign in to comment.