[SOLVED] set window site + title bar

  • #1, by sebastianTuesday, 21. March 2017, 22:36 7 years ago
    Hey there chaps and chapsaloises =)


    short question / feature request:

    Right now the setWindowSize() Lua function sets the window size of a windowed game to the desired size. The window size is set in pixels. 's good!

    The tricky part here is that the size is incl. its title bar (and also its borders on the left/right/bottom on other OS - i can only tell my story for macOS which only has a titlebar).  When resizing my window then i have to add the height of the titlebar to the y-size -In my case +23 pixel- to keep the aspect ratio of my game. Otherwise black bars will appear on the sides.

    My iMac has a resolution of 1920x1080. So its no 4k/5k Screen. But i know that these greater (retina) screens have the characteristics to scale the resolution. The thing here may is that the titlebar would be twice as big (if not bigger) if i understand it right.
    If this is the case than the height of the titlebar is dynamically different on each system, depending on the selected resolution settings.

    Look here at these two screens of the same window with different resolition settings in macOS:

    (click to enlarge)
    (click to enlarge)

    also i assume that Windows and Linux may have also different heigh title bars... 

    Is it possible to adapt / change the setWindowSize() function to set the size according to the windows content instead of the whole window incl. titlebar? 
    I remeber that this was the case in 4.2, so maybe this is just a but.



    Thread Captain

    2346 Posts


  • #2, by sebastianSaturday, 01. April 2017, 20:11 7 years ago
    any infos if this "issue" is getting addressed in VS5?

    Thread Captain

    2346 Posts

  • #3, by sebastianThursday, 13. April 2017, 23:05 7 years ago
    seems to be fixed in v5 RC

    Thread Captain

    2346 Posts