I wrote some code that should be add to OTClient as feature (on/off in config?).
It's limit of dragging windows (as you could see in Tibianic.org client).
With normal OTClient you can drag window to any place on screen (for wars: BP of SD 5 pixels from target enemy, BP of potions 5 pixels from 'self').
With my modification, if you drop window outside 'panel' (right panel or [if is 'on' in client options] left panel), it will move that window to closest panel.
HOW TO INSTALL
In data/corelib/ui/uiminiwindow.lua under:
paste:
It's limit of dragging windows (as you could see in Tibianic.org client).
With normal OTClient you can drag window to any place on screen (for wars: BP of SD 5 pixels from target enemy, BP of potions 5 pixels from 'self').
With my modification, if you drop window outside 'panel' (right panel or [if is 'on' in client options] left panel), it will move that window to closest panel.
HOW TO INSTALL
In data/corelib/ui/uiminiwindow.lua under:
PHP:
function UIMiniWindow:onDragLeave(droppedWidget, mousePos)
PHP:
local children = rootWidget:recursiveGetChildrenByMarginPos(mousePos)
local dropInPanel = 0
for i=1,#children do
local child = children[i]
if child:getId() == 'gameLeftPanel' or child:getId() == 'gameRightPanel' then
dropInPanel = 1
end
end
if dropInPanel == 0 then
tmpp = self
if(modules.game_interface.getLeftPanel():isVisible()) then
if modules.game_interface.getRootPanel():getWidth() / 2 < mousePos.x then
addEvent(function() tmpp:setParent(modules.game_interface.getRightPanel()) end)
else
addEvent(function() tmpp:setParent(modules.game_interface.getLeftPanel()) end)
end
else
addEvent(function() tmpp:setParent(modules.game_interface.getRightPanel()) end)
end
end