• 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 Make Backpack Open Above a Panel?

katumblo

Member
Joined
Oct 20, 2010
Messages
60
Reaction score
7
I'm developing some things in Otclient (specifically in otclient redemption: GitHub - mehah/otclient: An alternative tibia client for otserv written in C++20 and Lua, made with a modular system that uses lua scripts for ingame interface and functionality, making otclient flexible and easy to customize (https://github.com/mehah/otclient)).

I would like to know how the logic works to determine which widgets stay on top of each other or below each other because I'm creating a panel that occupies the entire screen when opened.
The problem is that when I open the backpack, it stays below this panel I created.
However, I noticed some peculiarities in Tibia itself.

For example:
1 - When I open the backpack, I can move it above the chat so that it's not hidden.
2 - The backpack is on the same level as the minimap.
3 - The top menu items are above this panel I created.

How can I make the backpack open on top of this panel I'm creating?

I'm modifying the game_inventory*
 
Last edited:
I'm developing some things in Otclient (specifically in otclient redemption: GitHub - mehah/otclient: An alternative tibia client for otserv written in C++20 and Lua, made with a modular system that uses lua scripts for ingame interface and functionality, making otclient flexible and easy to customize (https://github.com/mehah/otclient)).

I would like to know how the logic works to determine which widgets stay on top of each other or below each other because I'm creating a panel that occupies the entire screen when opened.
The problem is that when I open the backpack, it stays below this panel I created.
However, I noticed some peculiarities in Tibia itself.

For example:
1 - When I open the backpack, I can move it above the chat so that it's not hidden.
2 - The backpack is on the same level as the minimap.
3 - The top menu items are above this panel I created.

How can I make the backpack open on top of this panel I'm creating?

I'm modifying the game_inventory*

Not really sure, but it should be something with UIWidget::raise(): I mean myWindow:raise().
 
Not really sure, but it should be something with UIWidget::raise(): I mean myWindow:raise().
I tried putting it in place, and it worked to some extent. However, when the backpack opens in the "right panel," it still remains "underneath" my new panel that covers the entire screen. But if I drag the backpack window to somewhere outside the panel (where it's "loose"), then it appears "on top."
Do you know how I could make the backpack not open within the panel or fix this bug where it stays "underneath" when inside the panel?
 
I tried putting it in place, and it worked to some extent. However, when the backpack opens in the "right panel," it still remains "underneath" my new panel that covers the entire screen. But if I drag the backpack window to somewhere outside the panel (where it's "loose"), then it appears "on top."
Do you know how I could make the backpack not open within the panel or fix this bug where it stays "underneath" when inside the panel?

Maybe rightPanel:raise().
It raises the widget to the top of all children of his parent, that's why it does not works if they are attached on side panels.
So, my guess is that you probably need to raise the panels too.
 
Maybe rightPanel:raise().
It raises the widget to the top of all children of his parent, that's why it does not works if they are attached on side panels.
So, my guess is that you probably need to raise the panels too.
This method didn't work very well, because when I open the bag (container/backpack) it keeps getting behind the new panel I created... What I more or less managed to do was:

Lua:
containerWindow:setParent(modules.game_interface.getRootPanel())

in the file:

Code:
containers.lua

however if I click anywhere on the screen, or if I resize the window size, the backpack widget is updating and sends it back to the "behind" of the new panel I created, do you know where/how I can do this in a way that this does not happen?
 
Back
Top