From 8fbc3394c1b80842ff7b947f34471e0bda34551d Mon Sep 17 00:00:00 2001 From: Antonio Lobato Date: Tue, 13 Aug 2024 21:16:15 -0700 Subject: [PATCH] Fixed a few annotations and types for TWW --- annotations.lua | 10 +++------- config/itemlist.lua | 4 ++++ core/events.lua | 2 +- core/fonts.lua | 2 ++ themes/gw2.lua | 2 ++ 5 files changed, 12 insertions(+), 8 deletions(-) diff --git a/annotations.lua b/annotations.lua index ee7f8715..69e0c87e 100644 --- a/annotations.lua +++ b/annotations.lua @@ -278,6 +278,9 @@ function ScrollBoxDragBehavior:SetFinalizeDrop(fn) end ---@field AutoDepositItemsIntoBank fun(bankType: BankType) C_Bank = {} +-- Backwards compatible function for Classic. +function CloseBankFrame() end + ---@enum BagSlotFlags BagSlotFlags = { DisableAutoSort = 1, @@ -292,13 +295,6 @@ BagSlotFlags = { ExpansionLegacy = 512, } ----@class BankTabData ----@field ID number ----@field bankType BankType ----@field name string ----@field icon number ----@field depositFlags BagSlotFlags - ---@class Frame ---@field scrollable boolean local frameProto = {} diff --git a/config/itemlist.lua b/config/itemlist.lua index b3e66ad0..51c75e86 100644 --- a/config/itemlist.lua +++ b/config/itemlist.lua @@ -172,14 +172,18 @@ function config:CreateItemListWidget() widget["SetDisabled"] = SetDisabled widget["SetItemValue"] = SetItemValue +---@diagnostic disable-next-line: invisible widget.frame:EnableMouse(true) local section = sectionFrame:Create() section:DisableHeader() section:SetFillWidth(true) section:SetTitle("Items") +---@diagnostic disable-next-line: invisible section.frame:SetParent(widget.frame) +---@diagnostic disable-next-line: invisible section.frame:SetPoint("TOPLEFT", widget.frame, "TOPLEFT", 6, -6) +---@diagnostic disable-next-line: invisible section.frame:SetPoint("BOTTOMRIGHT", widget.frame, "BOTTOMRIGHT", -6, 6) widget.section = section diff --git a/core/events.lua b/core/events.lua index 90ce68cf..c81b6c53 100644 --- a/core/events.lua +++ b/core/events.lua @@ -19,7 +19,7 @@ local callbackProto = {} ---@field _eventHandler AceEvent-3.0 ---@field _messageMap table ---@field _eventMap table ----@field _bucketTimers table +---@field _bucketTimers table ---@field _eventQueue table ---@field _eventArguments table ---@field _bucketCallbacks table diff --git a/core/fonts.lua b/core/fonts.lua index 3c8ea1d8..7c1b996d 100644 --- a/core/fonts.lua +++ b/core/fonts.lua @@ -7,9 +7,11 @@ local addon = LibStub('AceAddon-3.0'):GetAddon(addonName) local fonts = addon:NewModule('Fonts') fonts.UnitFrame12White = CreateFont('BetterBagsUnitFrame12White') +---@diagnostic disable-next-line: param-type-mismatch fonts.UnitFrame12White:SetFont(UNIT_NAME_FONT, 12, "") fonts.UnitFrame12White:SetTextColor(1, 1, 1) fonts.UnitFrame12Yellow = CreateFont('BetterBagsUnitFrame12Yellow') +---@diagnostic disable-next-line: param-type-mismatch fonts.UnitFrame12Yellow:SetFont(UNIT_NAME_FONT, 12, "") fonts.UnitFrame12Yellow:SetTextColor(1, .81960791349411, 0, 1) \ No newline at end of file diff --git a/themes/gw2.lua b/themes/gw2.lua index 713c2c3a..4e38ef16 100644 --- a/themes/gw2.lua +++ b/themes/gw2.lua @@ -177,6 +177,7 @@ local gw2Theme = { decoration:SetBackdrop(gw.BackdropTemplates.Default) decoration.title:ClearAllPoints() +---@diagnostic disable-next-line: param-type-mismatch decoration.title:SetFont(DAMAGE_TEXT_FONT, 16, "") decoration.title:SetTextColor(255 / 255, 241 / 255, 209 / 255) decoration.title:SetPoint("TOP", decoration, "TOP", 0, -5) @@ -204,6 +205,7 @@ local gw2Theme = { decoration:SetBackdrop(gw.BackdropTemplates.Default) decoration.title:ClearAllPoints() +---@diagnostic disable-next-line: param-type-mismatch decoration.title:SetFont(DAMAGE_TEXT_FONT, 16, "") decoration.title:SetTextColor(255 / 255, 241 / 255, 209 / 255) decoration.title:SetPoint("TOP", decoration, "TOP", 0, -5)