Added control in stat screen doesn't hide correctly
I made a addon to show me the mitigation from resistances, and someone wanted the same feature "MitigationValue" had to show it in the char screen too.
I basically used the same code that addon did for adding it to the stat screen: Code:
function MitigationPercent:displayInCharScreen() Code:
ZO_PreHook(ZO_Stats, "InitializeKeybindButtons", function() self:displayInCharScreen() end) I have no clue why this is the case. I'm no programmer or anything (only do small things like this here), but i just can't see why it only works after one of those things happens. MitigationValue seems to have the same problem (now), so i think the game itself is at fault here, but i can't find a workaround that is possible to setup with the api tools i know of. I hope someone here can help me :) Edit: Things i thought of but miss knowledge to do: -Open and close the map (or any other thing that has the same effect, are there such functions?) -showing and hiding my controls whenever the statscreen opens/closes (i can do hiding on close wit hthe popped event, but how can i check when it opens again?) |
It would be much easier if you do not add new line, but just modify text already in there.
For example line: Spell Resistance: 10000 becomes: Spell Resistance: 10000 (15.63%) Simple code how to do that: Lua Code:
|
Small hack how to add mitigation values:
Lua Code:
Result: |
WOW thanks very much!
This really helps alot. If i have time later i'll look into it and try to understand it :D |
Regarding your non-hiding issue, that's because you defined your controls as <TopLevelControl>. Those are not supposed to have a parent, and thus hide with it. Change that to <Control>.
|
All times are GMT -6. The time now is 12:51 AM. |
vBulletin © 2024, Jelsoft Enterprises Ltd
© 2014 - 2022 MMOUI