04/13/15, 02:17 PM | #1 |
[Request] Remove Action Button Borders
Garkin as been kind enough to help me out with a couple things I have been working on for my flat, minimalist UI. He gave me this snippet of code that removes the borders on the action buttons:
Code:
for slotNum = 3, 9 do local button = ZO_ActionBar_GetButton(slotNum).button button:SetNormalTexture("") button:SetPressedTexture("") button:SetDisabledTexture("") end |
|
04/13/15, 02:34 PM | #2 |
I think you need to put it into the callback function of the event_player_activated so it gets called everytime a zonechage/reloadui takes place:
Lua Code:
Like written in the code the addon should load some function as it loads up, by event EVENT_ADDON_ON_LOAD. Replace MyAddonName with the name of your addon, like the lua filename is. Lua Code:
At the bottom of your addon's lua file put this then to register the event on addon load callback function: Lua Code:
About the weapon bar change: I do not know how to check on this but I'll have a look. EDIT: There is an event for this too. So put this into the ON ADDOn LOAD event callback function: Lua Code:
And this somewhere above: Lua Code:
As the code is duplicate now try to put it in a nother local function and then call the function inside the Weapon swapped callback function AND the player activated function instead. Last edited by Baertram : 04/13/15 at 02:39 PM. |
|
04/13/15, 03:45 PM | #3 |
Thanks for the help! I am very new to learning lua. I mostly dissect code and make changes to see how it works. Is there more to this code than what you have showed me? I tried to put that code together as you instructed(and a few other ways), but I keep getting errors (due to me not having the skills to deduce why the errors are happening). If you have the time, can you please show me what this code looks like all together? I didn't intend to have someone write this addon for me, but I can see that it is way beyond my current coding skillset.
|
|
04/13/15, 04:08 PM | #4 |
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:
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. Last edited by Baertram : 04/13/15 at 04:21 PM. |
|
04/13/15, 04:12 PM | #5 |
The .txt manifest file would look like this, for example:
Code:
## Title: NoActionbarBorders ## APIVersion: 100011 ## SavedVariables: NoActionbarBorders_SavedVariables ## Description: This addon will remove the borders around the action bar skills ## Version: 0.0.1 ## Author: blakbird NoActionbarBorders.lua APIversion should be the most current one so the addon is not listed as outdated inside the ESO game addon manager. |
|
04/13/15, 04:36 PM | #6 |
Found the thread with that replace texture function. It's name is
"RedirectTexture(string oldTexturefilename, string newTextureFileName)" http://www.esoui.com/forums/showthre...eplace+texture |
|
04/13/15, 04:45 PM | #7 |
I copied the lua code and saved it as NoActionbarBorders.lua. I copied the text file info and saved it as NoActionbarBorders.txt. I can see the addon is loaded in game, but it does nothing. I'm not completely new to programming as I used to be a web designer, but looking at lua, I can only see why working code works. I just can't see why code doesn't work.
I will check out that thread you linked now about replacing the textures. |
|
04/13/15, 04:50 PM | #8 |
I had an error in my lua code in line 24.
I had written "-_" instead of "--" to start a commented line. -> To better see those errors ingame install the addon "BugEater". It will show the error messages in the chat and you can configure them to only show once etc. Need to visit the settings of this addon in the menu. Just in case you copied the source code BEFORE I changed this just copy the code again. Here you'll find a working version so you can check the difference with yours: No Actionbar Borders v0.0.1 |
|
04/13/15, 05:04 PM | #9 |
Thank you very much!!! I just added this at line 10:
Code:
RedirectTexture("/esoui/art/actionbar/ability_ultimate_framedecobg.dds", "") Edit - Adding these 3 lines of code starting at line 10 seems to be working: Code:
RedirectTexture("/esoui/art/actionbar/ability_ultimate_framedecobg.dds", "") RedirectTexture("/esoui/art/actionbar/abilityinset.dds", "") RedirectTexture("/esoui/art/actionbar/abilityframe64_up.dds", "") Last edited by blakbird : 04/13/15 at 05:11 PM. |
|
04/13/15, 05:11 PM | #10 |
Fine :-)
The thread said something about preloading the textures at least once otherwise they won't be shown and thus not replaced. I think this will be done automatically as the action bar is always there at the start of the game, or at leasta fter swapping it at least once. Sometimes deleting the file ShadedCooked.cache one folder above the "Addons" folder helps too if you experiment with textures! I hope you can find the right textures. I've tried it with Lua Code:
and also with the *-up.dds each time the weapons are swapped, but this did not seem to work properly :-( Maybe I got the wrong texture names. EDIT: Ok, I had the wrong textures then ^^ Now optimize your code so the textures won't be redirected too often. I guess it is enough to redirect them at the player activated event callbackfunction once because they shouldn't reload at each weapon switch, isn't it? |
|
04/13/15, 05:21 PM | #11 |
This is where I start to get lost again. I don't really know what code is unnecessary or how this addon can be optimized.
|
|
04/13/15, 05:27 PM | #12 |
As I said: Post your code here.
Just use the highlight container and copy&paste your lua file in here so we can see it :-) |
|
04/13/15, 05:34 PM | #13 |
Lua Code:
Last edited by blakbird : 04/13/15 at 05:48 PM. |
|
04/13/15, 05:45 PM | #14 |
Ok, as I said you don't need the weapon switch event anymore, because you can exchange the textures 1 time at the player activated event. After they are changed from original textures to NONE they won't show up anymore, even if you change the weapons.
And if you reload or rezone the player activated event will be fired again and replace the texturs with NONE again, so you should be fine. Here is the result: Lua Code:
Btw: there is still one small texture line left beyond the ultimate skill |
|
04/13/15, 05:48 PM | #15 |
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.
It will insert the following code: Code:
[high light="Lua"] Paste your lua source code here [/high light] Paste&Write your lua code in between the opening and closing tags, that's all. |
|
04/13/15, 05:54 PM | #16 | |
It worked the second time I tried it. I don't know what I did wrong the first time.
|
||
04/13/15, 06:04 PM | #17 |
Do you see this small grey line beyond the icon? I thought this maybe is another border texture which you wanted to remove. If I change weapons I can clearly see it. |
|
04/13/15, 06:10 PM | #18 | ||
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:
|
|||
04/13/15, 06:14 PM | #19 | |
Do you know how to access the art folder? Since we are able to swap textures I was thinking I could replace the textured icons in the chat window with flat white ones. That would be super easy if I could just copy the .dds files and alter them in photoshop and store the new ones in a folder in the addon that replaces those icons. Garkin gave me a link to an extractor, but I can't get it to work. It immediately crashes when I try to use it. Last edited by blakbird : 04/15/15 at 02:28 AM. |
||
04/13/15, 06:24 PM | #20 |
EDIT:
Sorry, I did not read your post to the end ... No, I unfortunately do not know how to extract those textures But why don't you just let the chat fade out to 10% or 0%? This is a standard ESO setting. Together with my addon FCOChatTabBrain you can make the 3 icons + other icons face out too. it gives you possibility to control the chat by keybindings as well + many other nice options. And the addon pChat, which is a really handy chat enhancement/changer, you can make the text of the chat window fade in again so only the text is shown and everything else is hidden until you hover it. It gives you also some other features like timstamps, copy messages to clipboard, copy chat settings (chat tabs, etc.) from char 1 to char 2. My old message was: Oh, well :-) I don't use the fill line as an addon is telling me % value of the "fill state". I like it this way because there are some ultimate skills, that get more power with higher % values (like 1000% maximum, instead of 100% where the fill line ends). I think you cannot access the art folder or any other folders of the game. But you are able to put some .dds texture files in your addon#s folder, or better a subfolder. Check the addon "Destinations" or "Inventory Grid View" e.g. They got an "assets" folder containing texture .dds files. In your addon source code you are able to load the filenames into an array/table, like Inventory grid view does: Lua Code:
You just need to put the correct addon folder name (yours would be "NoActionbarBorders" then) and the folder + .dds filename. This way you could replace the textures, maybe. Last edited by Baertram : 04/13/15 at 06:28 PM. |
|
ESOUI » AddOns » AddOn Search/Requests » [Request] Remove Action Button Borders |
«
Previous Thread
|
Next Thread
»
|
Display Modes |
Linear Mode |
Switch to Hybrid Mode |
Switch to Threaded Mode |
|
|