opsdan
New Member
- Joined
- May 7, 2010
- Messages
- 16
- Solutions
- 1
- Reaction score
- 0
Hello everyone.
I'm using OTClientv8 classic UI, and I'm able to move the windows/huds inside the screen, as shown in the gif below.
How can I fix this?
If needed, I can post the client files.

Edit: I found the solution!
Create data/corelib/ui/uiminiwindow.lua and copy this code:
The discussion that helped me happened in this post here on OTLand:
I'm using OTClientv8 classic UI, and I'm able to move the windows/huds inside the screen, as shown in the gif below.
How can I fix this?
If needed, I can post the client files.

Edit: I found the solution!
Create data/corelib/ui/uiminiwindow.lua and copy this code:
function UIMiniWindownDragLeave(droppedWidget, mousePos)
local children = rootWidget:recursiveGetChildrenByMarginPos(mousePos)
local dropInPanel = 0
for i=1,#children do
local child = children
if child:getId() == 'gameLeftPanels' or child:getId() == 'gameRightPanels' 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
if self.movedWidget then
self.setMovedChildMargin(self.movedOldMargin or 0)
self.movedWidget = nil
self.setMovedChildMargin = nil
self.movedOldMargin = nil
self.movedIndex = nil
end
UIWindownDragLeave(self, droppedWidget, mousePos)
self:saveParent(self:getParent())
end
The discussion that helped me happened in this post here on OTLand:
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:
PHP:function UIMiniWindow:onDragLeave(droppedWidget...
Last edited: