I am trying to understand/translate the parameters returned by GetScreenBounds (Top/Right/Left/Bottom) in order to be able to manage a window if it is resized.
I display a window of 1024x768 like so
Then i drag the right side of the window and get this;
Here is my code;
// Project: resize
// Created: 2017-03-10
// show all errors
SetErrorMode(2)
// set window properties
SetWindowTitle( "resize" )
SetWindowSize( 1024, 768, 0 )
SetScissor(0.0, 0.0, 0.0, 0.0)
SetWindowAllowResize(1)
// set display properties
//SetVirtualResolution( -1.0, -1.0 )
SetOrientationAllowed( 1, 1, 1, 1 )
SetSyncRate( 30, 0 ) // 30fps instead of 60 to save battery
UseNewDefaultFonts( 1 ) // since version 2.0.22 we can use nicer default fonts
do
Print("FPS="+str(ScreenFPS()))
print("Window Width:Height="+str(1024)+":"+str(768))
print("Get bounds Left:Right=Total="+str(GetScreenBoundsLeft())+":"+str(GetScreenBoundsRight())+"="+str(abs(GetScreenBoundsLeft())+GetScreenBoundsRight()))
print("Get bounds Top:Bottom=Total="+str(GetScreenBoundsTop())+":"+str(GetScreenBoundsBottom())+"="+str(abs(GetScreenBoundsTop())+GetScreenBoundsBottom()))
print("Virtual Width:Height="+str(GetVirtualWidth())+":"+str(GetVirtualHeight()))
print("My guess="+str(1024 * (abs(GetScreenBoundsLeft()) + GetScreenBoundsRight())/100))
Sync()
loop
My calculations suggest the width should be 1242 but in fact it is 1229
if there something i'm missing here?