LWJGL Forum

Programming => Lightweight Java Gaming Library => Topic started by: Maykin53 on October 22, 2013, 13:42:51

Title: LWJGL Display resize limit
Post by: Maykin53 on October 22, 2013, 13:42:51
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).
Title: Re: LWJGL Display resize limit
Post by: quew8 on October 22, 2013, 16:38:57
The first rfe you could quite easily implement yourself I think:

Code: [Select]
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:

Code: [Select]
Display.setLocation(-1, -1);