Please login or register.

Login with username, password and session length

Author Topic: LWJGL Display resize limit  (Read 3795 times)


  • Newbie
  • *
  • Offline Offline
  • Posts: 15
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).


  • Nerdus Imperius
  • *****
  • Offline Offline
  • Posts: 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 ) ) {

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

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