mirror of
https://github.com/OTCv8/otclientv8.git
synced 2025-12-18 01:47:12 +01:00
Version 2.6 - http://otclient.net/showthread.php?tid=552
This commit is contained in:
@@ -165,8 +165,7 @@ function UIMiniWindow:setup()
|
||||
self:eraseSettings({height = true})
|
||||
end
|
||||
end
|
||||
|
||||
if selfSettings.closed and not self.forceOpen then
|
||||
if selfSettings.closed and not self.forceOpen and not self.containerWindow then
|
||||
self:close(true)
|
||||
end
|
||||
|
||||
@@ -174,7 +173,7 @@ function UIMiniWindow:setup()
|
||||
self:lock(true)
|
||||
end
|
||||
else
|
||||
if not self.forceOpen and self.autoOpen ~= nil and (self.autoOpen == 0 or self.autoOpen == false) then
|
||||
if not self.forceOpen and self.autoOpen ~= nil and (self.autoOpen == 0 or self.autoOpen == false) and not self.containerWindow then
|
||||
self:close(true)
|
||||
end
|
||||
end
|
||||
@@ -185,7 +184,7 @@ function UIMiniWindow:setup()
|
||||
self.miniLoaded = true
|
||||
|
||||
if self.save then
|
||||
if oldParent and oldParent:getClassName() == 'UIMiniWindowContainer' then
|
||||
if oldParent and oldParent:getClassName() == 'UIMiniWindowContainer' and not self.containerWindow then
|
||||
addEvent(function() oldParent:order() end)
|
||||
end
|
||||
if newParent and newParent:getClassName() == 'UIMiniWindowContainer' and newParent ~= oldParent then
|
||||
@@ -350,6 +349,20 @@ function UIMiniWindow:eraseSettings(data)
|
||||
g_settings.setNode('MiniWindows', settings)
|
||||
end
|
||||
|
||||
function UIMiniWindow:clearSettings()
|
||||
if not self.save then return end
|
||||
|
||||
local settings = g_settings.getNode('MiniWindows')
|
||||
if not settings then
|
||||
settings = {}
|
||||
end
|
||||
|
||||
local id = self:getId()
|
||||
settings[id] = {}
|
||||
|
||||
g_settings.setNode('MiniWindows', settings)
|
||||
end
|
||||
|
||||
function UIMiniWindow:saveParent(parent)
|
||||
local parent = self:getParent()
|
||||
if parent then
|
||||
|
||||
Reference in New Issue
Block a user