diff --git a/CHANGELOG.md b/CHANGELOG.md index b17da0b..4948570 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,406 +1,5 @@ # CHANGELOG -## Version 80200.04 - -- Added an option to show currency losses. Disabled by default; -- Added fragment toasts to the "Archaeology" group; -- Updated Simplified Chinese translation. Translated by vk1103ing@Curse; -- Updated Traditional Chinese translation. Translated by BNS333@Curse. - -## Version 80200.03 - -- Re-added copper threshold to gold toasts; -- Made gold loss tracking optional. Enabling this feature will make gold toasts ignore set copper - threshold. Disabled by default; -- Updated German translation. Translated by Merathilis@Curse; -- Updated Korean translation. Translated by netaras@Curse; -- Updated Spanish translations. Translated by Gotxiko@Curse; -- Updated Traditional Chinese translation. Translated by BNS333@Curse. - -## Version 80200.02 - -- Rewrote gold toasts to display money gains and losses. Removed the copper threshold option - because it's interfering with the new functionality; -- Updated embeds. - -## Version 80200.01 - -- Added 8.2.0 support; -- Added Ctrl-Left-Click support to transmog, toy, mount, and item toasts to show the dressing room - frame; -- Updated embeds. - -## Version 80100.10 - -- Added "ToastCreated", "ToastSpawned", and "ToastReleased" callbacks. As always, callbacks use - CallbackHandler-1.0; -- Renamed toasts' Recycle method to Release. Recycle is still available, but is deprecated; -- Renamed "SetSkin" and "ResetSkin" callbacks to "SkinSet" and "SkinReset". "SetSkin" and - "ResetSkin" are still available, but are deprecated; -- Fixed toasts' border's tiling; -- Updated embeds. - -## Version 80100.09 - -- Updated anchors' config code. - -## Version 80100.08 - -- Added a workaround for a Blizz bug which prevents item tooltips from being rendered correctly. - -## Version 80100.07 - -- Added 8.1.5 support. - -## Version 80100.06 - -- Fixed an issue where multiple transmog toasts were shown for different sources of the same - appearance. It's mainly occurring when turning in the weekly conquest quest. - -## Version 80100.05 - -- Fixed an issue where world quest toasts wouldn't show the rewards; -- Tweaked achievement toasts. Added tooltips, guild achievements' toasts will now use "Guild - Achievement Earned" as their title; -- Updated German translation. Translated by Merathilis@Curse; -- Updated Traditional Chinese translation. Translated by BNSSNB@Curse; -- Updated embeds. - -## Version 80100.04 - -- Added "SetSkin" and "ResetSkin" callbacks. Use these if you hooked my ApplySkin method to modify toasts' - appearance since ApplySkin no longer exists. Callbacks use CallbackHandler-1.0, so something like - `ls_Toasts[1].RegisterCallback({}, "SetSkin", function(callbackName, toast) end)` should do the trick; -- Updated Traditional Chinese translation. Translated by BNSSNB@Curse; -- Misc performance and memory optimisations. - -## Version 80100.03 - -- Added support for multiple toast anchors. Each anchor has its own growth, scale, and other - settings; -- Added options to adjust toast growth offsets. - -## Version 80100.02 - -- Improved compatibility with addons that modify chat messages which are used by common loot and - currency toasts. - -## Version 80100.01 - -- Added 8.1.0 support; -- Slightly reorganised in-game config; -- Fixed common loot toasts. Items created via professions and scrapping should be handled - correctly once again. - -## Version 80000.06 - -- Added "Default (Legacy)" and "ElvUI (Legacy)" skins that use old texture backgrounds; -- Updated Simplified Chinese translation. Translated by dxlmike@Curse. - -## Version 80000.05 - -- Updated the default background texture. Retired all other backgrounds, but I'll eventually - redraw some of them in higher resolution; -- Updated included ElvUI skins; -- Updated Korean translation. Translated by next96@Curse. - -## Version 80000.04 - -- Reduced anchor frame's offsets to 4px. Now you can move toasts closer to the screen edge; -- Updated Simplified Chinese translation. Translated by y368413@Curse; -- Updated Traditional Chinese translation. Translated by gaspy10@Curse; -- Updated embeds. - -## Version 80000.03 - -- Fixed an issue where the addon would try to show a toast for an item whose data wasn't available. - -## Version 80000.02 - -- Updated Spanish translations. Translated by Gotzon@Curse; -- Updated Traditional Chinese translation. Translated by gaspy10@Curse; -- Updated embeds. - -## Version 80000.01 - -- Added 8.0.1 support; -- Added War Effort (BfA garrison) toasts; -- Added partial Latin American Spanish translation. Copied from Spanish; -- Updated German translation. Translated by staratnight@Curse; -- Updated French translation. Translated by Daniel8513@Curse; -- Updated embeds. - -## Version 70300.10 - -- Updated Traditional Chinese translation. - -## Version 70300.09 - -- Reworked slots for additional rewards; -- Updated Korean translation. Translated by next96@Curse; -- Updated Traditional Chinese translation. Translated by gaspy10@Curse. - -## Version 70300.08 - -- Fixed libs' loading order. - -## Version 70300.07 - -- Reworked skin engine. Added new toast and icon border textures. Added two basic ElvUI-like skins; -- Reworked sound controls. Now each toast group has its own SFX toggle; -- Embedded LibSharedMedia. Added font and font size controls; -- Added buttons for 1px adjustment to toast anchor frame; -- Added rarity threshold control for border and text colouring; -- Fixed issue which caused loot toast duplicates to appear; -- Updated Russian translation. - -NOTE: You'll have to restart WoW client to make things work after the update. - -## Version 70300.06 - -- Improved compatibility with other addons that override UI elements' alpha, e.g., Immersion; -- Increased max fade-out delay to 10 seconds; -- Fixed "Handle Left Click" option for transmog toasts; -- Updated Korean translation. Translated by next96@Curse; -- Updated Traditional Chinese translation. Translated by gaspy10@Curse. - -## Version 70300.05 - -- Fixed DND option. Previously it's disabling toast group entirely; -- Re-added click handler to collection toasts; -- Locked collection and transmog toasts' left click handling behind config option. Both may cause UI errors in combat if enabled, but people like being able to click them regardless; -- Updated German translation. Translated by pas06@Curse. - -## Version 70300.04 - -- Removed click handler from collection toasts. It taints Blizz code too much; -- Updated Korean translation. Translated by yuk6196@Curse; -- Updated Simplified Chinese translation. Translated by y368413@Curse; -- Updated Traditional Chinese translation. Translated by gaspy10@Curse. - -## Version 70300.03 - -- Fixed errors caused by toasts' click handlers. Sadly, as of now you won't be able to open UI panels via clicking related toasts while in combat; -- Fixed taint issue caused by toy toast; -- Added French translation. Translated by cyberlinkfr@Curse; -- Updated German translation. Translated by pas06@Curse; - -NOTE: I reorganised folder structure, so you'll have to restart WoW client to make things work after the update. - -## Version 70300.02 - -- Fixed toast fade out animation bug. - -## Version 70300.01 - -- Added options to control border and icon border colouring; -- Added new toast type: Collection. Includes toasts for mounts, pets and toys; -- Fixed item count text. If item count it 1, it's hidden; -- Updated German translation. Translated by pas06@Curse; -- Updated Korean translation. Translated by yuk6196@Curse; -- Updated Russian translation; -- Updated Simplified Chinese translation. Translated by y368413@Curse; -- Updated Traditional Chinese translation. Translated by gaspy10@Curse; -- Misc bug fixes and tweaks. - -## Version 70200.11 - -- Exposed `L` table. Will be useful for plugin devs; -- Added option to show quest item toasts regardless of their quality; -- Added Simplified Chinese translation. Translated by y368413@Curse; -- Updated Traditional Chinese translation. Translated by gaspy10@Curse; -- Updated Korean translation. Translated by yuk6196@Curse; -- Updated Russian translation; -- Misc bug fixes and tweaks. - -## Version 70200.10 - -- Project overhaul. New in-game config; -- Added option to change toasts' strata; -- Added option to show ilvl; -- Moved gold toasts to a separate group: Loot (Gold); -- Numerous bug fixes and tweaks. - -NOTE: Now this addon is more of a framework, others can hook up to it to show toasts. All built-in toast groups are written as plugins, so you may use them as ref. - -## Version 70200.09 - -- Added 7.2.5 support. - -## Version 70200.08 - -- Fixed toast tooltips; -- Updated Korean translation. Translated by yuk6196@Curse; -- Updated Russian translation. - -## Version 70200.07 - -- Re-release of 70200.05; -- Fixed in-game config issue that led to client freeze. - -## Version 70200.06 - -- Rollback. 70200.05 never happened. - -## Version 70200.05 - -- Reworked skins. All existing skins should work just for now, but you'll have to enable the skin of your choice via in-game config. Skin devs should make some minor adjustments; -- Added countermeasures to limit bloat caused by transmog toasts. - -## Version 70200.04 - -- Fixed bonus roll toast issues. - -## Version 70200.03 - -- Added item toasts stacking. Toasts for identical items that were triggered by the same events will now stack. If two items have similar names, but have different item links and/or come from different events, for example, "CHAT_MSG_LOOT" and "SHOW_LOOT_TOAST", they'll be shown as two different toasts; -- Added Russian translation. Translated by BLizzatron@Cruse and me; -- Misc tweaks. - -## Version 70200.02 - -- Fixed transmog toast issue; -- Fixed profession world quest toast issue; -- Misc tweaks. - -## Version 70200.01 - -- New version format: INTERFACE_VERSION.PATCH; -- Added 7.2 support; -- Added special loot item quality threshold drop down; -- Added Spanish translation. Translated by Gotxiko@GitHub; -- Updated Traditional Chinese translation. Translated by BNSSNB@Curse. - -## Version 1.24 - -- Added "ls: Toasts" config entry w/ "Enable" button to interface options panel. However, It doesn't change the fact that you still need to reload UI after you're done setting up the addon, hence I also added "Reload UI" button; -- Disabled common loot and currency string checks. Hopefully new patterns will perform better, but if I start getting reports about party/raid member loot toasts again, I'll re-enable them; -- Changed addon name's colour so it'll no longer interfere w/ addon list sorting; -- Updated Korean translation. Translated by yuk6196@Curse; -- Updated German translation. Translated by pas06@Curse; -- Numerous bug fixes and tweaks. - -## Version 1.23 - -- First attempt to address issue that made some people receive party/raid members' loot toasts. As of this version if addon detects that necessary variables were modified by another addon, it'll disable common loot and/or currency toasts, you'll be able to see which variables were modified and what addon did it in in-game config. Addon will also start checking if `CHAT_MSG_LOOT`'s 5th param (target) is the same as player's name; -- Updated German translation. Translated by pas06@Curse. - -NOTE: Warning preview. !test is my test addon. -![image](http://i.imgur.com/SVPzRN8.png) - -## Version 1.22 - -- Fixed in-game config. - -## Version 1.21 - -- Reworked profile manager. Sadly, I had to reset all settings; -- Added public methods to create, delete, set, and reset profiles. This feature is for addon devs. For more info, read [here](https://github.com/ls-/ls_Toasts#how-to-mod); -- Removed config from global `ls_Toasts` table; -- Updated German translation. Translated by Ithilrandir@Curse. - -## Version 1.20 - -- NEW! Added rated PvP reward toast; -- Added partial German translation. Translated by pas06@Curse; -- Added Traditional Chinese translation. Translated by BNSSNB@Curse; -- Updated Korean translation. Translated by yuk6196@Curse; -- Fixed issues in anchor frame code. - -## Version 1.19 - -- Improved compatibility with other addons that use default alert system to show custom toasts. - -## Version 1.18 - -- Added localisation support. Korean translation by WetU@GitHub; -- Fixed issue in reward button code; -- Fixed issue in follower/champion tooltip code. - -## Version 1.17 - -- Fixed compatibility issues with ElvUI. - -## Version 1.16 - -- Fixed issue that caused transmog toasts not to show proper info; -- Exposed config to other addons. This feature is for addon devs. For more info, read [here](https://github.com/ls-/ls_Toasts#how-to-mod). - -## Version 1.15 - -- Fixed issue in transmog toast code. - -## Version 1.14 - -- Added 7.1 support; -- Reworked transmog toasts. Now they show additions and removals of green, blue and epic appearances; -- Added ilvl upgrade indicator to item toasts. - -## Version 1.13 - -- Added hook to prevent default notifications from being shown; -- Added comparison tooltip to item toasts. Hold "Shift" key to show it. Original code by p3lim@GitHub. - -## Version 1.12 - -- Added currency toast stacking. Instead of creating new toasts for each currency gain, existing one will be updated; -- Added skinning support. This feature is for addon devs. For more info, read [here](https://github.com/ls-/ls_Toasts#how-to-reskin). - -## Version 1.11 - -- Fixed handling of caged battle pets. - -## Version 1.10 - -- Added workaround for few taints. - -NOTE: **IMPORTANT!** Now there's no ls: Toasts entry in Interface > AddOns section, but you can create one by using **/lstoasts** command. After that you'll be able to access config panel the old way. However, I strongly recommend to **/reload** UI after you're done setting up the addon. Even if you opened and closed config panel without changing anything, **/reload UI**. By doing so, you'll remove config entry from the system and prevent possible taints. Blame Blizzard, not me. - -## Version 1.09 - -- Split "Garrison" toast group into two new groups: "Garrison" and "Class Hall"; -- Moved currency toasts to a new category, "Loot (Currency)"; -- Misc bug fixes and tweaks. - -## Version 1.08 - -- Fixed "SetPortraitToTexture" error. - -## Version 1.07 - -- NEW! Added common loot toasts; -- Reworked in-game config a bit; -- Misc bug fixes and tweaks. - -## Version 1.06 - -- NEW! Added transmog toast; -- NEW! Added an option to colour item, follower names by quality, and world quest, mission titles by rarity. Original code by WetU@GitHub; -- NEW! Added options for horizontal growth directions; -- NEW! Added /lstoasts slash command; -- Fixed missing toast sounds; -- Misc bug fixes and tweaks. - -## Version 1.05 - -- Fixed anchor frame movement, when it's scaled down. - -## Version 1.04 - -- NEW! Added scaling for toasts; -- Fixed an issue in fade out delay code. - -## Version 1.03 - -- NEW! Added an option to save settings as a default preset that will be used for all characters; -- NEW! Added fade out delay slider. - -NOTE: Saving settings is an experimental feature, if feedback is negative, I may replace it with a typical profile manager. - -## Version 1.02 - -- Fixed issue in garrison toast test. - -## Version 1.01 +## Version 11302.01 - Release released. diff --git a/README.md b/README.md index fc45513..b90b1d3 100644 --- a/README.md +++ b/README.md @@ -2,25 +2,4 @@ Replacement for the default alert system. Better toasts, cheers! -![image](https://i.imgur.com/PvzX6VF.gif) - -## Download - -- [Curse](https://www.curseforge.com/wow/addons/ls-toasts) -- [WoWInterface](http://www.wowinterface.com/downloads/info24123.html) - -## Options - -Use **`/LSTOASTS`** or **`/LST`** to open in-game config. - -## Feedback and Feature Requests - -If you found a bug or want to share an idea on how to improve my addon, either use the issue tracker on [GitHub](https://github.com/ls-/ls_Toasts/issues), or post a comment on [WoWInterfrace](http://www.wowinterface.com/downloads/info24123.html#comments) or [Curse](https://www.curseforge.com/wow/addons/ls-toasts#comments). - -## Localisation - -Feel free to add and/or review translations on [Curse](https://www.curseforge.com/wow/addons/ls-toasts/localization), alternatively, you may create a PR on [project's GitHub page](https://github.com/ls-/ls_Toasts/pulls). - -## License - -Please see [LICENSE](https://github.com/ls-/ls_Toasts/blob/master/LICENSE.txt) file. +Classic WIP. diff --git a/assets/legacy/toast-bg-alliance.TGA b/assets/legacy/toast-bg-alliance.TGA deleted file mode 100644 index f9b3132..0000000 Binary files a/assets/legacy/toast-bg-alliance.TGA and /dev/null differ diff --git a/assets/legacy/toast-bg-archaeology.TGA b/assets/legacy/toast-bg-archaeology.TGA deleted file mode 100644 index f1318d4..0000000 Binary files a/assets/legacy/toast-bg-archaeology.TGA and /dev/null differ diff --git a/assets/legacy/toast-bg-azerite.TGA b/assets/legacy/toast-bg-azerite.TGA deleted file mode 100644 index 9828d96..0000000 Binary files a/assets/legacy/toast-bg-azerite.TGA and /dev/null differ diff --git a/assets/legacy/toast-bg-collection.TGA b/assets/legacy/toast-bg-collection.TGA deleted file mode 100644 index f40e738..0000000 Binary files a/assets/legacy/toast-bg-collection.TGA and /dev/null differ diff --git a/assets/legacy/toast-bg-dungeon.TGA b/assets/legacy/toast-bg-dungeon.TGA deleted file mode 100644 index 09a9178..0000000 Binary files a/assets/legacy/toast-bg-dungeon.TGA and /dev/null differ diff --git a/assets/legacy/toast-bg-horde.TGA b/assets/legacy/toast-bg-horde.TGA deleted file mode 100644 index f1651f4..0000000 Binary files a/assets/legacy/toast-bg-horde.TGA and /dev/null differ diff --git a/assets/legacy/toast-bg-legion.TGA b/assets/legacy/toast-bg-legion.TGA deleted file mode 100644 index fe0568e..0000000 Binary files a/assets/legacy/toast-bg-legion.TGA and /dev/null differ diff --git a/assets/legacy/toast-bg-recipe.TGA b/assets/legacy/toast-bg-recipe.TGA deleted file mode 100644 index 6b452ca..0000000 Binary files a/assets/legacy/toast-bg-recipe.TGA and /dev/null differ diff --git a/assets/legacy/toast-bg-store.TGA b/assets/legacy/toast-bg-store.TGA deleted file mode 100644 index e1fc584..0000000 Binary files a/assets/legacy/toast-bg-store.TGA and /dev/null differ diff --git a/assets/legacy/toast-bg-transmog.TGA b/assets/legacy/toast-bg-transmog.TGA deleted file mode 100644 index 6994b13..0000000 Binary files a/assets/legacy/toast-bg-transmog.TGA and /dev/null differ diff --git a/assets/legacy/toast-bg-upgrade.TGA b/assets/legacy/toast-bg-upgrade.TGA deleted file mode 100644 index 628f8e4..0000000 Binary files a/assets/legacy/toast-bg-upgrade.TGA and /dev/null differ diff --git a/assets/legacy/toast-bg-worldquest.TGA b/assets/legacy/toast-bg-worldquest.TGA deleted file mode 100644 index 775e880..0000000 Binary files a/assets/legacy/toast-bg-worldquest.TGA and /dev/null differ diff --git a/assets/ui-common-loot-toast.OGG b/assets/ui-common-loot-toast.OGG new file mode 100644 index 0000000..86b5b12 Binary files /dev/null and b/assets/ui-common-loot-toast.OGG differ diff --git a/assets/ui-legendary-loot-toast.OGG b/assets/ui-legendary-loot-toast.OGG new file mode 100644 index 0000000..3508e54 Binary files /dev/null and b/assets/ui-legendary-loot-toast.OGG differ diff --git a/core/toast.lua b/core/toast.lua index 089e211..1d14ace 100644 --- a/core/toast.lua +++ b/core/toast.lua @@ -17,9 +17,8 @@ local C_Timer = _G.C_Timer local Lerp = _G.Lerp --[[ luacheck: globals - BattlePetTooltip CreateFrame GameTooltip GameTooltip_ShowCompareItem GarrisonFollowerTooltip - GarrisonShipyardFollowerTooltip GetCVarBool IsModifiedClick PlaySound ShoppingTooltip1 - ShoppingTooltip2 UIParent + CreateFrame GameTooltip GameTooltip_ShowCompareItem GetCVarBool IsModifiedClick PlaySound PlaySoundFile + ShoppingTooltip1 ShoppingTooltip2 UIParent ]] -- Mine @@ -244,7 +243,11 @@ end local function toast_OnShow(self) if self._data.sound_file then - PlaySound(self._data.sound_file) + if type(self._data.sound_file) == "number" then + PlaySound(self._data.sound_file) + elseif type(self._data.sound_file) == "string" then + PlaySoundFile(self._data.sound_file) + end end self.AnimIn:Play() @@ -281,10 +284,7 @@ local function toast_OnEnter(self) end local function toast_OnLeave(self) - BattlePetTooltip:Hide() GameTooltip:Hide() - GarrisonFollowerTooltip:Hide() - GarrisonShipyardFollowerTooltip:Hide() ShoppingTooltip1:Hide() ShoppingTooltip2:Hide() diff --git a/init.lua b/init.lua index 489892a..2574e5e 100644 --- a/init.lua +++ b/init.lua @@ -10,7 +10,7 @@ local tonumber = _G.tonumber --[[ luacheck: globals AlertFrame CreateFrame GetAddOnMetadata InCombatLockdown InterfaceOptions_AddCategory - InterfaceOptionsFrame_Show InterfaceOptionsFramePanelContainer SlashCmdList + InterfaceOptionsFrame_Show InterfaceOptionsFramePanelContainer LibStub SlashCmdList ITEM_QUALITY_COLORS ITEM_QUALITY1_DESC ITEM_QUALITY2_DESC ITEM_QUALITY3_DESC ITEM_QUALITY4_DESC ITEM_QUALITY5_DESC LS_TOASTS_CFG LS_TOASTS_CFG_GLOBAL SLASH_LSTOASTS1 SLASH_LSTOASTS2 @@ -36,28 +36,9 @@ local STRATA_INDICES ={ } local BLACKLISTED_EVENTS = { - ["ACHIEVEMENT_EARNED"] = true, - ["AZERITE_EMPOWERED_ITEM_LOOTED"] = true, - ["CRITERIA_EARNED"] = true, - ["GARRISON_BUILDING_ACTIVATABLE"] = true, - ["GARRISON_FOLLOWER_ADDED"] = true, - ["GARRISON_MISSION_FINISHED"] = true, - ["GARRISON_RANDOM_MISSION_ADDED"] = true, - ["GARRISON_TALENT_COMPLETE"] = true, - ["LFG_COMPLETION_REWARD"] = true, ["LOOT_ITEM_ROLL_WON"] = true, - ["NEW_MOUNT_ADDED"] = true, - ["NEW_PET_ADDED"] = true, ["NEW_RECIPE_LEARNED"] = true, - ["NEW_TOY_ADDED"] = true, - ["QUEST_LOOT_RECEIVED"] = true, ["QUEST_TURNED_IN"] = true, - ["SCENARIO_COMPLETED"] = true, - ["SHOW_LOOT_TOAST"] = true, - ["SHOW_LOOT_TOAST_LEGENDARY_LOOTED"] = true, - ["SHOW_LOOT_TOAST_UPGRADE"] = true, - ["SHOW_PVP_FACTION_LOOT_TOAST"] = true, - ["SHOW_RATED_PVP_REWARD_TOAST"] = true, ["STORE_PRODUCT_DELIVERED"] = true, } @@ -85,46 +66,6 @@ E:RegisterEvent("ADDON_LOADED", function(arg1) C.db:RegisterCallback("OnProfileShutdown", shutdownCallback) C.db:RegisterCallback("OnDatabaseShutdown", shutdownCallback) - -- cleanup - LS_TOASTS_CFG = nil - LS_TOASTS_CFG_GLOBAL = nil - - -- ->80100.03 - if not C.db.profile.version or C.db.profile.version < 8010003 then - if C.db.profile.fadeout_delay then - C.db.profile.anchors[1].fadeout_delay = C.db.profile.fadeout_delay - C.db.profile.fadeout_delay = nil - end - - if C.db.profile.growth_direction then - C.db.profile.anchors[1].growth_direction = C.db.profile.growth_direction - C.db.profile.growth_direction = nil - end - - if C.db.profile.max_active_toasts then - C.db.profile.anchors[1].max_active_toasts = C.db.profile.max_active_toasts - C.db.profile.max_active_toasts = nil - end - - if C.db.profile.scale then - C.db.profile.anchors[1].scale = C.db.profile.scale - C.db.profile.scale = nil - end - - if C.db.profile.point then - C.db.profile.anchors[1].point.p = C.db.profile.point.p - C.db.profile.anchors[1].point.rP = C.db.profile.point.rP - C.db.profile.anchors[1].point.x = C.db.profile.point.x - C.db.profile.anchors[1].point.y = C.db.profile.point.y - C.db.profile.point = nil - end - end - - -- ->80100.05 - if not C.db.profile.version or C.db.profile.version < 8010005 then - C.db.profile.point = nil - end - C.options = { type = "group", name = L["LS_TOASTS"], @@ -323,24 +264,6 @@ E:RegisterEvent("ADDON_LOADED", function(arg1) P:UpdateOptions() P:EnableAllSystems() - local panel = CreateFrame("Frame", "LSTConfigPanel", InterfaceOptionsFramePanelContainer) - panel.name = L["LS_TOASTS"] - panel:Hide() - - local button = CreateFrame("Button", nil, panel, "UIPanelButtonTemplate") - button:SetText(L["OPEN_CONFIG"]) - button:SetWidth(button:GetTextWidth() + 18) - button:SetPoint("TOPLEFT", 16, -16) - button:SetScript("OnClick", function() - if not InCombatLockdown() then - InterfaceOptionsFrame_Show() - - LibStub("AceConfigDialog-3.0"):Open(addonName) - end - end) - - InterfaceOptions_AddCategory(panel, true) - E:RegisterEvent("PLAYER_REGEN_DISABLED", function() LibStub("AceConfigDialog-3.0"):Close(addonName) end) diff --git a/locales/_locales.xml b/locales/_locales.xml index a77c089..acc3e0d 100644 --- a/locales/_locales.xml +++ b/locales/_locales.xml @@ -10,4 +10,5 @@