• 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 - view screen height and width.

Nothxbye

Banned User
Joined
Jan 22, 2012
Messages
1,124
Reaction score
173
Is here anyone who know how to get pixels height and width of current view screen?

3esOSXp.png
 
Make print screen, go to paint and select this screen pixelperfect and on the bottom of a Paint window you have pixel's x/y or rectangle size in px.
 
Maybe
Code:
screenWidth = gameMapPanel:getWidth()
screenHeight = gameMapPanel:getHeight()
yes, gameMapPanel:getHeight() is correct but gameMapPanel:getWidth() gives size from parent left to right panel, so it's always same value.
So basically gameMapPanel is not the view screen it's just whole pannel where the view screen is placed.
 
yes, gameMapPanel:getHeight() is correct but gameMapPanel:getWidth() gives size from parent left to right panel, so it's always same value.
Maybe
Code:
screenWidth = gameMapPanel:getWidth() - (gameRightPanel:getWidth() + gameLeftPanel:getWidth())
 
Back
Top