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

[OTClient] Game Window Position

Otfan125

Well-Known Member
Joined
Mar 1, 2008
Messages
169
Solutions
1
Reaction score
55
Location
Thais
Hello all,
Where is the position of the game window defined? Normally, the game window is positioned at the center of the client. I want to know how I can change this. Or, could someone simply tell me where is this handled? I need to attempt it myself.

Thanks.
Post automatically merged:

One second, I think I found the solution, I will post here how to do it... or if this violates the sub-forum rules, may a moderator please remove this thread. Thanks
Post automatically merged:

scratch that, it is a lot harder than I thought... Any pointers?
 
Last edited:
Last edited:
Hello!!

I think you need change the game map panel anchors...

But the game map panel is not positioned at the center.. It is positioned between left and right panel...

So you need pay attention when you change the anchors...

edubart/otclient (https://github.com/edubart/otclient/blob/master/modules/game_interface/gameinterface.otui#L27-L33)

hey there :)
That is where I had originally thought I had found the answer! But, I can't seem to make it work... In order to debug or test, what I did was make three more panels that are positioned on the right side of the window. Then, I kept making the gamePanel anchored to the left of the leftmost panel, as shown here:
Screenshot from 2020-08-14 05-53-42.png

Here is the anchored gamePanel code:

Code:
  GameMapPanel
    id: gameMapPanel
    anchors.left: parent.left
    anchors.right: gameRightPanel3.left
    anchors.top: parent.top
    anchors.bottom: gameBottomPanel.top
    focusable: true

And here are the three panels (which are repeated gameRightPanels):


Code:
  GameSidePanel
    id: gameRightPanel
    anchors.right: parent.right
    anchors.top: parent.top
    anchors.bottom: parent.bottom
    focusable: false
    on: true
  GameSidePanel
    id: gameRightPanel2
    anchors.right: gameRightPanel.left
    anchors.top: parent.top
    anchors.bottom: parent.bottom
    focusable: false
    on: true
  GameSidePanel
    id: gameRightPanel3
    anchors.right: gameRightPanel2.left
    anchors.top: parent.top
    anchors.bottom: parent.bottom
    focusable: false
    on: true

Strangely enough, this doesn't quite work the way I wanted...
Thank you for your help! :)
Post automatically merged:

I got it to work!
We were right about changing the otui files, though I had ViewMode = 2 and it was messing with the anchors without me knowing it... Now I just have to edit gameInterface.lua as well now ! :)
Thanks !
 
Last edited:
Back
Top