Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion spec/System/TestTradeQueryGenerator_spec.lua
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ describe("TradeQueryGenerator", function()
end
queryGen:FinishQuery()

assert.are.equal(31, #query.stats[1].filters)
assert.are.equal(32, #query.stats[1].filters)
assert.is_not_nil(query.filters.equipment_filters.filters.rune_sockets)
end)
end)
Expand Down
13 changes: 12 additions & 1 deletion src/Classes/Control.lua
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,14 @@ local rect = {
--]]

---@class Control
---@field enabled boolean | fun(...: any): boolean
---@field onFocusGained? fun()
---@field onFocusLost? fun()
---@field shown Prop<boolean>
---@field x Prop<number>?
---@field y Prop<number>?
---@field collapseY number? An additional offset which is applied when this control uses a collapsed anchor.
---@field collapseX number? An additional offset which is applied when this control uses a collapsed anchor.
local ControlClass = newClass("Control")

function ControlClass:Control(anchor, rect)
Expand Down Expand Up @@ -68,7 +76,10 @@ end

function ControlClass:GetPos()
if self.anchor.collapse and self.anchor.other and not self.anchor.other:GetProperty("shown") then
return self.anchor.other:GetPos()
local x, y = self.anchor.other:GetPos()
x = x + (self.collapseX or 0)
y = y + (self.collapseY or 0)
return x, y
end
local x = self:GetProperty("x")
local y = self:GetProperty("y")
Expand Down
Loading
Loading