Skip to content

Commit

Permalink
Update uiminiwindow.lua
Browse files Browse the repository at this point in the history
  • Loading branch information
mehah committed Nov 23, 2023
1 parent 32aaa6f commit 706c19a
Showing 1 changed file with 14 additions and 3 deletions.
17 changes: 14 additions & 3 deletions modules/corelib/ui/uiminiwindow.lua
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,11 @@ function UIMiniWindow:open(dontSave)
self:setSettings({ closed = false })
end

addEvent(function()
self:raise()
self:raise()

if self:getParent() then
self:getParent():saveChildren()
end)
end

signalcall(self.onOpen, self)
end
Expand Down Expand Up @@ -555,6 +556,16 @@ function UIMiniWindow:getMaximumHeight()
return resizeBorder:getMaximum()
end

function UIMiniWindow:modifyMaximumHeight(height)
local resizeBorder = self:getChildById('bottomResizeBorder')
local newHeight = resizeBorder:getMaximum() + height
local curHeight = self:getHeight()
resizeBorder:setMaximum(newHeight)
if newHeight < curHeight or newHeight - height == curHeight then
self:setHeight(newHeight)
end
end

function UIMiniWindow:isResizeable()
local resizeBorder = self:getChildById('bottomResizeBorder')
return resizeBorder:isExplicitlyVisible() and resizeBorder:isEnabled()
Expand Down

0 comments on commit 706c19a

Please sign in to comment.