Jump to content
Sign in to follow this  
Cruzix

Looking for help to color TrinketMenu's icon borders black

Recommended Posts

Here's a visual of the addon: 
GIF.gif

When you hover your cursor over the equipped trinkets frame which TrinketMenu provides, it will show all the trinkets you have in your bag so you can swap trinket easier, it also makes it possible to queue your trinkets to auto swap whenever you get out of combat which is the main reason why this addon is so popular.

 

Now to my issue - I can't figure out how to color its icon borders black, and I would love if somebody here could help me out.

I need to color the icon borders of both the trinketframe and the menuframe (when you hover it) and I think I've found where to put in the code, but as I have no coding knowledge what so ever I can't seem to figure out what I should enter

Here's where I think the code should go:
trinketframe - https://github.com/satan666/TrinketMenu-Fix/blob/master/TrinketMenu/TrinketMenu.xml#L99
menuframe - https://github.com/satan666/TrinketMenu-Fix/blob/master/TrinketMenu/TrinketMenu.xml#L227
^thats from trinketmenu.xml (couldn't find anywhere in trinketmenu.lua that looked right)
 

Addon link: https://github.com/satan666/TrinketMenu-Fix

Edited by Cruzix

Share this post


Link to post
Share on other sites

you can not change the icon borders since they are a part of the icon image itself...

that only possible by cutout the icon itself and add a custom black border over it

or 

overwrite the icon by additional black border

the lines you linked are for the background behind the icons:

LKSbyyA.png

Share this post


Link to post
Share on other sites
24 minutes ago, Renew said:

you can not change the icon borders since they are a part of the icon image itself...

that only possible by cutout the icon itself and add a custom black border over it

or 

overwrite the icon by additional black border

the lines you linked are for the background behind the icons:

LKSbyyA.png


Ah I see. Well I know it's possible to do because modUI does it to the trinketframe (not the menuframe though, but I assume that should be possible as well). Even if its an overlay that would do it for me, I just need to know how :p


Here's where modUI changes the icon border color https://github.com/obble/modui/blob/master/skin/button/addon.lua#L6-L14 however I don't understand this code so I can't use it to target the menuframe myself 
trinket.PNG <--- that's how it looks ingame with modUI

Edited by Cruzix

Share this post


Link to post
Share on other sites
7 minutes ago, Renew said:

as i said, you have to add new(black) borders, that exactly what modui does in the method "modSkin"

https://github.com/obble/modui/blob/5b8d7cf95800f85641ac1740d9115cde0583a7e3/skin/method/method.lua#L176

its not that trivial, i dont have time to add this atm, sorry

Np, hopefully somebody else can help me out then.

I just tried to edit this line: https://github.com/obble/modui/blob/master/skin/button/addon.lua#L10
to this: local bu = _G['TrinketMenu_Menu'..i]
(TrinketMenu_Menu instead of TrinketMenu_Trinket)

And it seems like that worked, it did color the menuframe however only the very first icon.. but at least im getting at something xD

trinket2.PNG

Edited by Cruzix

Share this post


Link to post
Share on other sites
7 minutes ago, Renew said:

so youre useing modui or not? if you use it its simple to do this ofc

I am using modUI, however I would prefer to get some code that I could copy paste into a fresh self made addon in case I switch to something else. But I would be more than happy to get a fix for modUI to do it as well

Edited by Cruzix

Share this post


Link to post
Share on other sites
for i = 1, 30 do
  local bu = _G['TrinketMenu_Menu'..i]
  modSkin(bu, 18)
  modSkinPadding(bu, 3)
  modSkinColor(bu, .2, .2, .2)
end

tHMy8eL.png

 

add tis code under line 14

Share this post


Link to post
Share on other sites
3 minutes ago, Renew said:

for i = 1, 30 do
  local bu = _G['TrinketMenu_Menu'..i]
  modSkin(bu, 18)
  modSkinPadding(bu, 3)
  modSkinColor(bu, .2, .2, .2)
end

tHMy8eL.png

 

add tis code under line 14

Thank you! :)

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×