• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Fix able to move windows/hud insite screen - Otclientv8 Classic Ui

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.

Window-hud locked inside screen.gif

Edit: I found the solution!
Create data/corelib/ui/uiminiwindow.lua and copy this code:

function UIMiniWindow:onDragLeave(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

UIWindow:onDragLeave(self, droppedWidget, mousePos)
self:saveParent(self:getParent())
end


The discussion that helped me happened in this post here on OTLand:

 
Last edited:
Back
Top