Go to Page... |
Compatibility: | Update 43 (10.1.0) Gold Road (10.0.0) |
Updated: | 08/10/24 07:22 AM |
Created: | 08/10/24 06:54 AM |
Monthly downloads: | 0 |
Total downloads: | 1 |
Favorites: | 1 |
MD5: |
Comment Options |
Today, 08:46 AM | |
|
Hi and welcome to ESO addon development.
Your addon is in the ESO tools and utilitis category which is not shown within Minion addon manager, was that on purpose? Else we should move it to another category, please tell me which one and I can do so. Other points and hints: In your addons' event_add_on_loaded callback you should unregisetr your addon once it was loaded so the same func is not called for every other addon loaded again and again and again: Code:
function Volette.OnAddonLoaded(event, addonName) if addonName == Volette.name then Volette.Initialize() EVENT_MANAGER:UnregisterForEvent(Volette.name, EVENT_ADD_ON_LOADED) end end In your settings menu (LAM) you can use requiresReload = true to add a button for a reloadi once someone changed that setting. The user is asked, if he tries to leave the addon settings, if changed values will be applied and reloadui is done, or else they will be switched back to old values automatically. No need to manually add a warning there, that's all automatically there if you just add requiresReload = true to the widget. Your code in slash.lua should be capsuled in a function which is 1st loaded from your EVENT_ADD_ON_LOADED callback or else you risk that the slash commands are added early where your functions are not present OR savedvariables are not present and lead to errors in the end! So do something like: Code:
function Volette.LoadSlashCommands() for shortcut, func in pairs(COMMANDS) do SLASH_COMMANDS["/v-" .. shortcut] = func end end The notation using : in e.g. function VoletteContactsMenu:Initialize is kind of wrong as it is a control and not an object. Using self in there works "by accident" but should not be done! So change the function name to function VoletteContactsMenu.Initialize and instead of using self use VoletteContactsMenu then. Using the function Volette.contacts.setPinButton(button, pinned) each time in the loop over your contacts is kind of wrong. You only need to add the handlers for OnMouseEnter and Exit etc. once, and they stay there, so no need to re-do that overwriting them if they use fixed texts (and they do, as you use GetString(VOLETTE_CONTACTS_UNPIN_BUTTON_TOOLTIP)). Better idea: Add the pinned state to the butonControl directly button.pinned = pinned And in the handlers just check Code:
local textToShow = button.pinned and VOLETTE_CONTACTS_UNPIN_BUTTON_TOOLTIP or VOLETTE_CONTACTS_PIN_BUTTON_TOOLTIP ... SetTooltipText(InformationTooltip, GetString(textToShow)) Hope it helps, if you got questions feel free to chat with us here: https://app.gitter.im/#/room/#esoui_esoui:gitter.im |
|
Baertram |
View Public Profile |
Send a private message to Baertram |
Find More Posts by Baertram |
Add Baertram to Your Buddy List |