1
\$\begingroup\$

I want to create a custom titlebar/border for my display/window so I set the corresponding system property to "true" but how do I send a close request to the window manually to react to the Display.isCloseRequested()?

\$\endgroup\$

1 Answer 1

1
\$\begingroup\$

Listen to a preferred event and then do System.exit(0); Then you are good to go! Bear in mind , LWJGL is a OpenGL wrapper , it doesnt include any widgets physics engines and stuff. So make your own button and listen for an event

\$\endgroup\$
4
  • \$\begingroup\$ Well it does feature the creation of a window for you that has a close requested flag - somehow I need to be able to set this flag ... right? \$\endgroup\$
    – salbeira
    Nov 3, 2013 at 19:02
  • \$\begingroup\$ the Display.isCloseRequested() is false till the program gets a request (System.exit(0)) to close the window \$\endgroup\$
    – ntakouris
    Nov 4, 2013 at 12:29
  • \$\begingroup\$ Ah - the reason this works is because of the registered shutdown hook that gets created when the window is created - (I did a bit of source digging here ...) \$\endgroup\$
    – salbeira
    Nov 5, 2013 at 7:50
  • \$\begingroup\$ Sometimes on Apple systems , you need to call System.exit(0); after Display.destroy(). You just have to. \$\endgroup\$
    – ntakouris
    Nov 7, 2013 at 12:47

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .