[AceConfig] Update options(?) based on selected unit
Hi all :),
I am trying to make an interface options with AceConfig-3.0 and here's what I got so far. Lua Code:
The question is, is it possible to re-use those General, Health and Power tabs, but only change the db entry based on the selected unit? Or should I re-construct all those tabs whenever the unit changes? |
Quote:
Code:
local ACR = LibStub("AceConfigRegistry-3.0") |
Quote:
I really, really and really appreciate your time! So, is the first getter function being the key point which gets called every single time when the selected unit changes? If so, what would be the best way to deal with my db structure? Lua Code:
Like you said it should be the matter of how simply the db is set-up, but I would like to maintain this structure, if possible. Would the best chance be putting IF statements to see which 'point' the option is referring to? |
Quote:
|
Quote:
I mean I had those inherited getter and setter for those child options, but it didn't really update the values... Let me have a look first! SO EXCITED :banana: EDIT #1 Yeap, you are totally right, Vrul. I was an idiot. It was a logical error and here's what happened. My actual code of getting those general options were like this. Lua Code:
The _selectedUnit was never getting updated to newly selected unit and so, the db was always referrring to player's one even if the selected unit changes. Which should actually be something like Lua Code:
Now it's working perfectly well! Thank you so much for enlightening me :banana::banana::banana: |
All times are GMT -6. The time now is 09:05 AM. |
vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI