View Single Post
04/13/15, 06:10 PM   #18
Garkin
 
Garkin's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 832
Originally Posted by Baertram View Post
Just use the blue lua (better write lua instead of LUA or Garkin will post you a link about lua and LUA ) button above the text window her ein the chat message.
Originally Posted by http://www.lua.org/about.html
"Lua" (pronounced LOO-ah) means "Moon" in Portuguese. As such, it is neither an acronym nor an abbreviation, but a noun. More specifically, "Lua" is a name, the name of the Earth's moon and the name of the language. Like most names, it should be written in lower case with an initial capital, that is, "Lua". Please do not write it as "LUA", which is both ugly and confusing, because then it becomes an acronym with different meanings for different people. So, please, write "Lua" right!


If you redirect textures, you dont need to set textures to "", so the code could be much more simple.

Textures are replaced until reload UI, but at this moment will be executed EVENT_ADD_ON_LOADED again, so it is enough to replace textures in there.

Lua Code:
  1. --Callback function for the addon loaded event (executes for EVERY addon that loads!)
  2. local function Addon_Loaded(eventCode, addOnName)
  3.     if (addOnName == "NoActionbarBorders") then
  4.         RedirectTexture("/esoui/art/actionbar/ability_ultimate_framedecobg.dds", "")
  5.         RedirectTexture("/esoui/art/actionbar/abilityinset.dds", "")
  6.         RedirectTexture("/esoui/art/actionbar/abilityframe64_up.dds", "")
  7.     end
  8. end
  9.  
  10. --Register the event ADD_ON_LOADED to get started with your addon. As this event will be called for EVERY addon you need to
  11. --check your addon#s name inside the cllback function so it won't execute your code for EVERY addon!
  12. EVENT_MANAGER:RegisterForEvent("NoActionbarBorders", EVENT_ADD_ON_LOADED, Addon_Loaded)
  Reply With Quote