petri wrote:There is no autodetetection or scaling of the window contents.
We just open a window as specified by the config file and render the 3d scene to it. The gui is rendered on top the of the scene pixel-perfect with 1:1 mapping between texels and pixels. Dialogs are centered in the viewport.
Please note that getting pixel perfect rendering out of d3d9 is actually harder than rendering 2d elements that scale up & down with the resolution. To achieve pixel-perfect rendering we have to care things such as the discrepancy of centers of pixels and texels (an unfortunate feature of DirectX before version 10) and carefully authoring the graphics so that they fit to the screen and look good in all supported resolutions.
Why do we jump through all these hoops? One reason is that we care about image quality a lot, meaning that we wanted to preserve Juho's high detail art. Upscaling & downscaling bitmaps always results in noticeable decrease in image quality. If you compare grimrock's gui graphics with some other games that have scaled guis you'll notice that grimrock's gui is much crisper. This is because texture filtering always blurs the image (except when the scaling is disabled by carefully setting up texture and screen coordinates like we do).
Rendering 1:1 means that there is a certain minimum resolution that is required to fit the graphics to the screen. Therefore LoG requires a minimum resolution that is at least 720 pixels tall. Making gui graphics at most 720 pixels high we can be sure that the content fits into the renderable area (this is not precisely true because if you have a desktop resolution of 1280x720, the window will be about 720+20 pixels tall with its titlebar and some clipping will occur but that is beside the point).
Steam's hardware survey shows that 99.85% of Steam users can meet the minimum resolution requirement (see
http://store.steampowered.com/hwsurvey). Therefore we think that this is a sensible requirement.
Back to the original poster's problem, the real question is, why is the opened window 50% larger than what is requested. Obviously this will easily cut off a large area of the window, causing problem not only with the options dialog but some parts of the 3d view will be cut off as you have demonstrated here
viewtopic.php?f=12&t=4649&start=20#p49198. And as the original poster reported, in this case this has probably something to do with Windows DPI scaling thing.
The bottom line is changing the option dialog to be scrollable or scaled is just treatment for the symptoms without fixing the real issue(s) causing the window to be larger than the desktop size.
I hope this helped to shed some light on how the gui works and why it has been designed like this.
Thanks for the detailed explanation, appreciated. While I can see your point in getting the best out of juho's artwork you should consider for robustness and performance reasons a downscaling support for <1024x768 modes. You can still recommend that for best LOG experience it should be played >=1024x768. Why I think it is important enough? On one hand, there are several reports by people with integrated and ATI cards with only <30fps which is not enough for the timed puzzles, selecting a lower resolution is often a better looking and more fine grained solution possiblity than the low spec mode. While having the option for a low spec mode is nice, it is a extreme approach which reduces the visual quality and LOG experience significantly as it limits the light source number pretty severe and select the rendered one pretty "illogical" (see
viewtopic.php?f=12&t=4611&start=10#p52309). The low spec mode for performance reasons is therefore even more in conflict with your "max-quality" policy than plain downscaling would be. Also, there are people with netbooks with pretty low resolutions and was there not an early announcement of an iOS version of LOG?

There are also people with pretty adavanced and exotic multimonitor setups with incoherent Y sizes and extreme aspect ratios were your "jumping through the hoops approach" seems to stumble (and a plain scaling approach would most likely work). And as last point there is always the chance for misdetecting the resolution on first startup of LOG which could lead to an cutted option menu if downscaling is not supported (suffered it myself with 1.1.3, was not able to reproduce it).
Also,I still think your focussed on question
"Back to the original poster's problem, the real question is, why is the opened window 50% larger than what is requested." has the the something to do with the physical resolution which is in taken in consideration for the viewport. If you look on my test (1024 x 1600 in physical 1360x768), it fullfills the minimum size reqirements for viewport and physical screen. On start-up, viewport and text would be correctly centered if it would be not cutted to the physical Y-size. As the viewport was cutted to around 768 (the physical Y-size) option menu is not accessible anymore.
1024 x 1600 in physical 1360x768
start up situation: window starts not centered, but grimrock is centered according to the physical screen

moved window down: Y size is NOT 1600 (seems 768) while it seems to be cutted to that size, leading to messed up the centering
Point is, the scaleing and cutting behaviour in windowed mode changes for a fixed viewport with changed native screen resolution, a unexpected, unusual and most likely unwanted behaviour.
Another case, on this report
viewtopic.php?f=12&t=4649#p48764 a triple monitorsetup with 2 different physical monitor sizes and another windowed size was used. In the end he had to use a very strange resolution which he found empirically (
After playing around with the cfg file, I was able to set the resolution to 1270x710 and the entire screen is visible on my 1920x1080 monitors. YAY! viewtopic.php?f=12&t=4649&start=10#p49067).
I agree on your opinion on a scrollable option menu - would be not right solution but at least a quickfix if the real reason is not found or by design not easily implementable (or even more dirty: bound the return button to apply... the important stuff is on top). cheers