Jaliborc / Bagnon-Masque

Allows Masque to skin Bagnon windows
3 stars 2 forks source link

IconBorder Issue #3

Closed StormFX closed 6 months ago

StormFX commented 5 years ago

It seems that under certain conditions, Bagnon_Facade's IconBorder:SetAlpha(0) isn't being applied correctly. For example, if one reloads the UI, kills a mob, loots a gray or white item and then moves an uncommon or better item to that slot, the IconBorder is still in its default state. I'm not sure why this occurring. I was able to fix it by using adding an additional method overwrite to Bagnon_Facade, like so:

-- Edited this line:
local NewItem, FreeItem, UpdateItem = Item.New, Item.Free, Item.Update

-- Added these lines:
function Item:Update()
    UpdateItem(self)
    self.IconBorder:SetAlpha(0)
end
GreyFoxGer commented 5 years ago

Doesen't fixed for me :(

StormFX commented 5 years ago

Copy the code you changed and put it in a gist.

GreyFoxGer commented 5 years ago

https://gist.github.com/GreyFoxGer/d166e338531233742f121e1f496d0abe

StormFX commented 5 years ago

If you're using Bagnon_Facade, you need to edit it, too. That code only affects Combuctor_Masque.

GreyFoxGer commented 5 years ago

i don't use bagnon at all...

StormFX commented 5 years ago

You mentioned Bagnon in the issue you posted on Masque. The fix was made for Bagnon_Facade. I didn't test it on Combuctor because I don't use Combuctor. It worked fine with Bagnon. Outside of that, I don't know what to tell you other than it's not an issue with Masque.

GreyFoxGer commented 5 years ago

I just tested it with Bagnon, same thing.

Same border appears: https://imgur.com/a/Wqf0q58

After icon get switched it appears normal: https://imgur.com/a/1N1B1XZ

If i click on the button: https://imgur.com/a/QDwju8O

Should be like: https://imgur.com/a/pyFEyuJ

So,it's not 100% fixed :(

StormFX commented 5 years ago

The first image is not the same issue you pointed out in the other report. What you're seeing there is most likely the default NewItem texture, which is the texture that appears over newly looted items and then disappears when you mouse over it. The skin doesn't seem to be applied to it, which is the fault of the skin.

The issue with the Pushed texture is caused by the same issue as the one affecting IconBorder, which seems to be related to inheritance from the parent "class".

I didn't say it was 100% fixed. I demonstrated a fix that got it working on my end. I can't account for factors other than what I experienced. I used the fix I posted and tested the same scenario as was discussed, in the same manner. With the fix, the issue was gone on my computer.

At this point, you'll probably have to wait until the author fixes it.

Jaliborc commented 5 years ago

Just fyi, I haven't read this issue yet, cause I'm dealing with some a big higher priority issues. Will try to look at it this week.

StormFX commented 5 years ago

No problem, J.

@GreyFoxGer: Try this. (Replace the contents of Bagnon_Facade.lua)

The issue is that, in spite of calling button.IconBorder:SetAlph(0) in the Item:New() method, when one prints self.IconBorder:GetAlpha() from the :Update() method, the result is 1. Thus, the alpha has to be explicitly set to 0, after the :Update() call.

GreyFoxGer commented 5 years ago

@StormFX still the same problem :(

StormFX commented 5 years ago

Don't know what to tell you, then. It's working fine on my end.

Jaliborc commented 6 months ago

Oh wow, forgot about this. 5 years ago! Implemented, lmao.