Settings Dialogue

Ok, this window has been bugging me for a while and its finally moving towards the top of the todo list. I don’t think it warrants a complete re-write but it could be very much improved:

Things I hate:
Ridiculous resolutions (320x240? Really? Is this 1985?)

Things I don’t like:
Lack of labels on the options

What’s odd is that full screen mode reads the available resolutions and presents them but windowed mode has a hard coded list the largest of which is uses like a quarter of my monitor and the smallest of which is a postage stamp.

I propose to make two or three changes (if no-one objects):

  1. Switch the windowed mode to use the same list of resolutions as fullscreen except for the very highest Y.

  2. Add a new setting for programmers using it to set minimum x and minimum y. Only resolutions exceeding that will be shown. If no suitable resolutions are available then an error message will be displayed.

  3. Maybe tweak the layout a bit and add labels for the options.

Any thoughts?

2 Likes

Oh, and while I’m in there add proper i18n support rather than hardcoded strings.

Right, it’s been committed so assuming I didn’t break anything it will appear in the next nightly. I didn’t add any real look&feel customisation options but it’s a standard swing window so the usual theme options are available (although slightly complicated by the fact that the window forces, the theme and I left that in as there was no comment saying what that was needed for and I didn’t want to break things. This means you can configure the standard theme, but not change the theme entirely).

For example though to turn the window background and labels white on black you would add the following to your main() method before creating the SimpleApplication:

[java] UIManager.put(“Panel.background”, new ColorUIResource(0,0,0));
UIManager.put(“Label.foreground”, new ColorUIResource(255,255,255));
UIManager.put(“CheckBox.foreground”, new ColorUIResource(255,255,255));
UIManager.put(“CheckBox.background”, new ColorUIResource(0,0,0));
[/java]

2 Likes

I’ve just added a small tweak to this so that three resolution options (1024 * 768, 1280 * 720, 1280 * 1024) are always available in windowed mode no matter what full screen modes the monitor supports.

Hey, be sure to put also 1920x1080 resolution for 1080p monitors, I often use that resolution myself on Windowed Mode (specially on games that I alt tab a lot).

It reads the supported modes for your monitor fullscreen and also offers those windowed - with the largest one being reduced by the size of the window insets to allow pseudo-fullscreen.

This fix really is for people with weird monitors/drivers that don’t report many/any valid resolutions.

@zarch said: It reads the supported modes for your monitor fullscreen and also offers those windowed - with the largest one being reduced by the size of the window insets to allow pseudo-fullscreen.

This fix really is for people with weird monitors/drivers that don’t report many/any valid resolutions.

Well, and my monitor doesn’t natively support 1280x720 in full screen so it’s good that it doesn’t show that one… but it’s still an extremely useful windowed mode since that’s what HD videos should typically be recorded at. :slight_smile: