Skip to content

Commit

Permalink
Fixed a few annotations and types for TWW
Browse files Browse the repository at this point in the history
  • Loading branch information
Cidan committed Aug 14, 2024
1 parent 04d1d3c commit 8fbc339
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 8 deletions.
10 changes: 3 additions & 7 deletions annotations.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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 = {}
Expand Down
4 changes: 4 additions & 0 deletions config/itemlist.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion core/events.lua
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ local callbackProto = {}
---@field _eventHandler AceEvent-3.0
---@field _messageMap table<string, {fn: fun(...), cbs: Callback[]}>
---@field _eventMap table<string, {fn: fun(...), cbs: Callback[]}>
---@field _bucketTimers table<string, cbObject>
---@field _bucketTimers table<string, FunctionContainer>
---@field _eventQueue table<string, boolean>
---@field _eventArguments table<string, EventArg[]>
---@field _bucketCallbacks table<string, fun(...)[]>
Expand Down
2 changes: 2 additions & 0 deletions core/fonts.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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)
2 changes: 2 additions & 0 deletions themes/gw2.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit 8fbc339

Please sign in to comment.