Skip to content

Commit ac3d01b

Browse files
committed
feat: proper unloading of modules, tp text color when full, consumed buffs
- Modules unload properly now on logout and character change, this should reduce bugs with the config settings. - TP text color can now change when full. Default is yellow. - Added consumption of buffs for a lot of different buffs that go away on a condition
1 parent a7e6656 commit ac3d01b

File tree

5 files changed

+579
-75
lines changed

5 files changed

+579
-75
lines changed

erisunitframes.lua

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,8 +86,19 @@ windower.register_event('login', function()
8686
end
8787
end)
8888

89+
-- unload
8990
windower.register_event('logout', function()
90-
ui:destroy()
91+
if isLoaded then
92+
isLoaded = false
93+
ui:destroy()
94+
end
95+
end)
96+
97+
windower.register_event('unload', function()
98+
if isLoaded then
99+
isLoaded = false
100+
ui:destroy()
101+
end
91102
end)
92103

93104

@@ -205,6 +216,9 @@ windower.register_event('addon command', function(command, ...)
205216
local settings = config.load(defaults)
206217
ui:initialize(settings, theme)
207218
ui.settings.theme = theme_name
219+
220+
ui:show()
221+
208222
windower.add_to_chat(8, '---------------------------------------------')
209223
windower.add_to_chat(8, 'Loaded theme: ' .. theme_name .. '.')
210224
windower.add_to_chat(8, 'You must save to keep these changes.')
@@ -219,6 +233,8 @@ windower.register_event('addon command', function(command, ...)
219233

220234
ui:initialize(settings, theme)
221235

236+
ui:show()
237+
222238
windower.add_to_chat(8, '---------------------------------------------')
223239
windower.add_to_chat(8, 'Reset EUF settings to defaults.')
224240
windower.add_to_chat(8, 'You must save to keep these changes.')

0 commit comments

Comments
 (0)