• 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!

How to keep "miniwindows" permanently inside in right panel?

xapokis

Member
Joined
Nov 4, 2012
Messages
112
Reaction score
6
Well, as the topic says i want that the "miniwindows" (backpacks, skills, etc) stay only in the right panel area, just as in Tibia's client.

In another post i saw that i could use "draggable: false" but then it isn't possible to reorder the miniwindows (up and down) in the right pannel, they stay "blocked".

I'm developing an old-school pvp server and some players think that this function could be abused by some players.

Thx in advance.

OTClient is the future of open tibia community. Such an AWESOME Project. Thx to all who have worked (and still working :D ) in it.
 
You can try this, open modules\corelib\ui\uiminiwindowcontainer

serach for

Code:
function UIMiniWindowContainer:onDrop(widget, mousePos)
  if widget:getClassName() == 'UIMiniWindow' then
    local oldParent = widget:getParent()
    if oldParent == self then
      return true
    end

after:

Code:
    if oldParent == self then
      return true
    end

paste:

Code:
    if widget:getId() == 'gameLeftPanel' then
      return true
    end
 
Sorry i was thinking you want it not to be at the left panel.

open modules\corelib\ui\uiminiwindow

serach for:
Code:
    local child = children[i]

after put this:

Code:
    if not (child:getClassName() == 'UIMiniWindowContainer') then
      return
    end

it should work
 
Back
Top