The Happy Friar wrote:
Not sure, but I think Grimm added more resolutions to the menu.
No. I am working on it though, the trick is to be able to exec a configuration, or a series of commands based on a string value.
D3 cannot 'enumerate' the available resolutions, but that easy to do in the SDK for a programmer, I can't 'program' in the SDK so I always opt for GUI/script solutions. With our current hardware and CPU strength I don't see any issues with scripting performance, as long as you use your head and time your stuff wisely.
The resolution stuff in the gui is set up like this:
Code:
choiceDef socScreenSize {
rect 240, 75, 120, 15
backcolor 0.1,0.1,0.1,0.4
choices "#str_04222"//320x240;400x300;512x384;
values "3;4;5;6;7;8"//0;1;2;
cvar "r_mode"
updateGroup render
choiceType 1
font "fonts/Chiller"
textscale 0.32
//textalign 1
textaligny -6
forecolor 1, 0.7, 0.6, 1
}
#str_04222 is just a string in the strings file that reads "640x480;1024x768....etc..etc.."
When you click the choicedef it sets the cvar to whatever corresponding value you set in the 'values' option of the choicedef, in this case r_mode.
The issue there is that for alternative modes to work (any widescreen mode), you need to set r_mode to -1.
So without SDK work, I am thinking of a way I might fix this.
I am going to try to extend the values to the #str_04222 and not map it to r_mode at all.
Instead I'll map it to a local variable in the GUI, and use an event to catch changes to this variable.
Then depending on these changes I'll simply set three hidden c_var choicedefs that are bound to r_mode, r_customwidth and r_customheight. That ought to do it.