Hello Guest

LWJGL Display resize limit

  • 1 Replies
  • 4030 Views
LWJGL Display resize limit
« 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).

*

Offline quew8

  • *****
  • 569
  • Because Square Eyes Look More Real
Re: LWJGL Display resize limit
« Reply #1 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);