Open Backpacks Minimised
#21
--[[
Script made by Lee (Discord: l33_) - www.trainorcreations.com
If you want to support my work, feel free to donate at https://trainorcreations.com/donate
PS. Stop ripping off my work and selling it as your own.
]]--
local openMin = addSwitch("openMin", "Open Minimised", function(widget)
widget:setOn(not widget:isOn())
storage.openMin = widget:isOn()
end, parent)
openMin:setOn(storage.openMin)
onContainerOpen(function(container, previousContainer)
if openMin:isOn() then
if not previousContainer then
local containerPanel = modules.game_interface.getContainerPanel()
local containerWindow = containerPanel:getChildById('container' .. container:getId())
if containerWindow then
if containerWindow:getId() == "container0" then
containerWindow:setContentHeight(34)
else
containerWindow:minimize()
end
end
end
end
end)
01 May 2021