LWJGL Display resize limit

Started by Maykin53, October 22, 2013, 13:42:51

Previous topic - Next topic

Maykin53

Hi, would it be much trouble to add the ability to restrict the resizing of the LWJGL Display window to a minimum dimension? (For example, restrict a user so they cannot resize the window less than 1024x768)
A "setMaximised" method would also be very useful (so that a game starting in windowed mode could start maximised, and not 'floating' with the lower part under the task bar).

quew8

The first rfe you could quite easily implement yourself I think:

if(Display.wasResized() && ( Display.getWidth() < minWidth || Display.getHeight() < inHeight ) ) {
    Display.setDisplayMode(aDisplayModeOfMinSize);
}


Not sure what you mean by the second. I think you can centre the Display by calling:

Display.setLocation(-1, -1);