A better way to learn from each other is you post us your code and we can tell you what you could do better/another way.
My example code from above would look like this, where your new addon's name would be "NoActionbarBorders" (filename would be the same + .lua, and the manifest file + .txt at the end, and create a new folder with the addon#s name and put the lua and txt file in there, and this folder then as a subfolder into the "Addons" folder):
Lua Code:
--Just a function to reduce redundant code
local function RemoveActionbarBorders()
--remove borders at action buttons
for slotNum = 3, 9 do
local button = ZO_ActionBar_GetButton(slotNum).button
button:SetNormalTexture("")
button:SetPressedTexture("")
button:SetDisabledTexture("")
end
end
--Callback function for the player activated event (upon zone change or logging in new)
local function Callback_Player_Activated(...)
RemoveActionbarBorders()
end
--Callback function for the weapon swap event
local function Weapon_Swapped(...)
RemoveActionbarBorders()
end
--Put this somewhere where your addon gets initialized, e.g. inside callback function of EVENT_ADDON_ON_LOAD or just at the bottom of your addon
--Register for the zone change/player ready event
EVENT_MANAGER:RegisterForEvent("NoActionbarBorders", EVENT_PLAYER_ACTIVATED, Callback_Player_Activated)
--Callback function for the addon loaded event (executes for EVERY addon that loads!)
local function Addon_Loaded(eventCode, addOnName)
--Is THIS addon HERE found?
if(addOnName ~= "NoActionbarBorders") then
return
end
--If you got here your addon is found so execute the following code lines:
--Unregister this event again so it isn't fired again after this addon has beend loaded
EVENT_MANAGER:UnregisterForEvent("NoActionbarBorders", EVENT_ADD_ON_LOADED)
--Register for the zone change/player ready event
EVENT_MANAGER:RegisterForEvent("NoActionbarBorders", EVENT_PLAYER_ACTIVATED, Callback_Player_Activated)
--Register the callback function for the weapon bar switch
EVENT_MANAGER:RegisterForEvent("NoActionbarBorders", EVENT_ACTIVE_WEAPON_PAIR_CHANGED, Weapon_Swapped)
end
--Register the event ADD_ON_LOADED to get started with your addon. As this event will be called for EVERY addon you need to
--check your addon#s name inside the cllback function so it won't execute your code for EVERY addon!
EVENT_MANAGER:RegisterForEvent("NoActionbarBorders", EVENT_ADD_ON_LOADED, Addon_Loaded)
I did not test this so it might contain errors. But I hope you get the point and it helps you!
EDIT:
I did test it now and it is working fine. You notice a small flickering of the borders at a weapon change but I think you won't be able to change this without replacing the textures for the borders with some other textures, or NO textures.
There is some command for lua to exchange/replace existing textures but I do not know if you are able to do this with these action bar textures as well.
search the forum for "replace texture" or "exchange texture" and use the addon "TextureIt" to find the textures for the action bars and then you might get it to work.