Removing 'gloss' from attribute bars?
Helu esoui,
Ever since I discovered theres an alternative way to display the attribute bars by adding these lines: Quote:
It would seem that some function is re-enabling the 'glossyness' when player gain a buff or loses/gain health.. It is then automatically reversed after the 'translation effect'.. Is there a way to completely disable the gloss, and preventing the default functions from 're-enabling' the gloss? EDIT: also TL;DR Gloss also has a 'alpha value'. Is it possible to set a 'max alpha value' to say 0 for gloss, like in this example: Quote:
MYSLxxx |
what about hooking it directly
Lua Code:
that's a sample of course but that's how you can change the SetHidden behaviour after you changed it once |
Quote:
Would it be to much to ask for a 'working' example, since I am too stupid to understand what you're trying to teach me? /hugs MYSleX |
If :SetHidden(true) is your solution but something calls again :SetHidden(false) to revert your solution then you need to replace SetHidden by your function to filter out the calls made to SetHidden with false
In the sample I show you how to replace the SetHidden function by yours so you can decide then to pass the original execution to origZO_PlayerAttributeHealthBarLeftGloss to have the result of a normal SetHidden, or to not continue the execution , that's how you can forbid any call made to SetHidden It is not specific to Lua, it is just called function hooking and is present in all the programming language, the only requirement is overwrite the pointer of the original function by your and to store a pointer of the original function in a local variable before you replace it so you can call later the original function from your. Lua Code:
|
Quote:
However.. Hiding the 'glossy frame' and then disabling the sethidden function, still results in the 'glossyness' being shown when first aggroing an enemy thinking theres something glossy somewhere else.. Damn it!! I appreciate you helping me out, really! thank you! MysLEx |
Quote:
MsysELx |
did you tried the same with SetAlpha, SetAlpha(0) can sets an object invisible and SetAlpha(1) visible
and yeah btw it is just function oiverwriting, hooking is the commong term, that's a very powerfull way to change the way the default client is working, I use this in my anti spam addon to hook message comming before they reach the chatwindow and also to inject special command when you right click player names |
Quote:
|
Quote:
This is declared at the most top of the lua file: Quote:
Quote:
Quote:
Quote:
MSSYLex |
Quote:
investigation continues... |
Lua Code:
Will work too, quick and dirty. Just tested it. But there might be more performant options available. |
Quote:
Allthough im ashamed to admit, i am allergic to 'onupdate' functions that run continuesly. As you said, im a performance junkie.. All addons Im using / have written are triggered on events.. Small update to my problem.. It would seem my problem is directly related to the Quote:
If only there was a way to remove an existing animation................ MSLex |
your hook probably not registered , try to debug with adding d("text") inside the functions
|
Ok so I've tested a little more, seeing I also like the non-glossy version :D
Lua Code:
Seems to work and only gets called once. It avoids the re-showing problem by just setting the dimensions of the glow to 0 width and 0 height. |
Quote:
Quote:
Thank you all so much for helping me. Been annoyed the whole day! LOL! |
All times are GMT -6. The time now is 10:44 PM. |
vBulletin © 2024, Jelsoft Enterprises Ltd
© 2014 - 2022 MMOUI