TekNoLogic / teksLoot

WoW Addon - Minimalistic group roll frames.
http://www.tekkub.net
16 stars 6 forks source link

Need Button shows as clickable even when not clickable. #18

Closed zaphon closed 12 years ago

zaphon commented 12 years ago

Every since 4.3, I have noticed that on items I clearly can't roll on (cloth for example on my warrior) show up as a clickable option (clicking does nothing, but they're not grayed out like in the past). I have looked at the code, and I don't see any reason as to why this should have changed, but it's driving me crazy.

billyyao commented 12 years ago

this is not a technical issue.

this is disabled by blizzard as random dungeon is not need loot rather than group loot

zaphon commented 12 years ago

Actually this is a bug (though I'm not sure who's). I have looked at Blizzard's Code and made a small change, and have restored the expected functionality to teksLoot. I'm not sure if it's the configuration I'm using (Windows 7, I'm using DX11 as the rendering path in WoW), but the issues wasn't occurring prior to the 4.3 release.

In a nutshell what's happening is that for each of the Need, Greed, and Disenchant buttons, if it's not clickable, it's being Disabled and SetDesaturation is being called to basically grey it out. For some reason, since 4.3, calling SetDesaturation doesn't grey out the Need button on my computer (but it does the Disenchant button). Looking at Blizzard's LootFrame code, they do 1 additional thing that's not being done in teksLoot, they set an alpha as well (they set it to 1.0 if the button is enabled, they set it to 0.35 if the button is disabled). I cleaned up the code and put this additional call in as well, so while it still doesn't grey out the button, it fades it out, and it's clear that it's not clickable.

Ultimately I'd like to understand why the SetDesaturation call doesn't grey out the button (and whether this is restricted to the DX11 path, or if it also happens on DX9 and OpenGL), but simply adopting the same code as Blizzard's at least gave me back the behavior I expected.

LordJZ commented 12 years ago

@zaphon can you please kindly share your fix? thanks.