11.0.2 API changes
ynazar1 opened this issue ยท 8 comments
Some changes are easy to fix locally:
local GetAddOnMetadata = C_AddOns.GetAddOnMetadata
on top of lua file...
This one i'm not sure how to resolve. Something with how frames are called changed.
1x ...aceLookingForSatchels/LookingForSatchels.lua:357: attempt to call global 'GetBackgroundTexCoordsForRole' (a nil value)
[string "@LookingForSatchels/LookingForSatchels.lua"]:357: in function <...aceLookingForSatchels/LookingForSatchels.lua:68>
[string "@LookingForSatchels/LookingForSatchels.lua"]:784: in function `?'
[string "@LookingForSatchels/LookingForSatchels.lua"]:914: in function <...aceLookingForSatchels/LookingForSatchels.lua:913>
Update:
Found through depreciation... add to the lua file:
local GetBackgroundTexCoordsForRole = function(role)
local textureHeight, textureWidth = 128, 256;
local roleHeight, roleWidth = 75, 75;
if ( role == "TANK" ) then
return GetTexCoordsByGrid(2, 1, textureWidth, textureHeight, roleWidth, roleHeight);
elseif ( role == "HEALER" ) then
return GetTexCoordsByGrid(1, 1, textureWidth, textureHeight, roleWidth, roleHeight);
elseif ( role == "DAMAGER" ) then
return GetTexCoordsByGrid(3, 1, textureWidth, textureHeight, roleWidth, roleHeight);
else
error("Role does not have background: "..tostring(role));
end
end;
I still cannot find the frame to be honest... but at least no errors. And the button works in the LFG UI.
Probably something else is missing.
Oh found the 'L' it's just a letter L without background in the middle of my screen. So yes something else's broken i think for setting up the frame, though the whole frame setup have changed recently.
I will go with the default UI's way to get these icons, as this will most likely be supported for longer.
If you have trouble moving the letter "L" try "/lfs move". I really have to get around to do some UX updates soon...
To be clear, i've not used LFS for a while now since DPS i play are never in demand... So I'm not sure if no background letter "L" is the appropriate free-floating frame for LSF. And if it is.. then that's fine. It's in the middle cause I've reset the coordinates. I seem to recall it having a little square around itself or something like that but honestly, i've not seriously used LFS since Legion.
No errors in 11.0.2 and it loads. Feel free to close split off UI to new issue and/or close this one.
I don't recall where but i found out that the old way to do boxes wasn't sufficient for addons now... I've fixed it in my addon by following wiki outline to give background texture and color (it was there but was transparent) you can see the changes roughly in the middle here with the frame changes.
I'm not sure if zero background letter as UI is intentional or not:
Now I see. As it is, the background is intended to be transparent when the "L" cannot be moved around. I'll close the issue and maybe open another one for the UX stuff
Awesome and thanks. Your call on the UI/UX things.
Note, that by coincidence my weapon is red and the letter is red so it was basically invisible when centered on me in current gear which is the default reset location. This explains why i couldn't find it in above comment, as I didn't know what I was looking for.