LWJGL
May 23, 2012, 03:16:21 *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: LWJGL 2.8.3 released!
 
   Home   Help Search Login Register  



Pages: [1] 2 3 4
  Print  
Author Topic: Title bar and multi window support  (Read 3254 times)
tlf30
Regular nerd
**
Posts: 59



« on: November 25, 2011, 16:55:14 »

I'm working on a game client, everything works good except the way the title bar looks. I was wondering if there was a way to have it take on the theme of the OS.
Logged
kappa
Administrator
Nerdus Imperius
*****
Posts: 961



« Reply #1 on: November 25, 2011, 17:19:42 »

The look of the title bar should be set automatically by the window manager of the OS, which OS are you running on?
Logged
tlf30
Regular nerd
**
Posts: 59



« Reply #2 on: December 05, 2011, 18:53:29 »

I'm using windows 7 pro with the alienware overlay on the OS. This is how the title bar looks:
Logged
tlf30
Regular nerd
**
Posts: 59



« Reply #3 on: December 09, 2011, 18:13:34 »

I have icons and a background texture for the title bar, I just need a way to swap them out with the ones lwjgl gives it.
Logged
jediTofu
Prolific Timewaster
****
Posts: 280



« Reply #4 on: December 09, 2011, 22:50:24 »

You'll have to set Undecorated to true:

http://www.lwjgl.org/wiki/index.php?title=LWJGL_Hidden_Switches

Then draw the title bar and mini/max/close buttons using OpenGL via LWJGL.

Else you'll have to modify the native code as there is no other way that I know of.
Logged

cool story, bro
tlf30
Regular nerd
**
Posts: 59



« Reply #5 on: December 12, 2011, 13:10:13 »

Does undecorating take away the border?
Logged
jediTofu
Prolific Timewaster
****
Posts: 280



« Reply #6 on: December 12, 2011, 18:19:58 »

It has no border for me on linux; tested with this:

java -cp .:res:jar/lwjgl.jar:jar/lwjgl_test.jar:jar/lwjgl_util.jar:jar/jinput.jar: -Djava.library.path=native/linux -Dorg.lwjgl.opengl.Window.undecorated=true org.lwjgl.test.WindowCreationTest

http://www.lwjgl.org/wiki/index.php?title=Downloading_and_Setting_Up_LWJGL

I assume Windows probably uses WM_POPUP or something and doesn't have border as well.
Logged

cool story, bro
tlf30
Regular nerd
**
Posts: 59



« Reply #7 on: December 12, 2011, 19:03:19 »

Im not sure on doing it this way, my frame rate is already deathly low.
Logged
jediTofu
Prolific Timewaster
****
Posts: 280



« Reply #8 on: December 13, 2011, 06:02:22 »

You could also stick the game window inside JFrame and modify the look&feel to use your icons.  Of course, AWT's Frame would be better to use, but no idea how to modify the icons through that.
Logged

cool story, bro
tlf30
Regular nerd
**
Posts: 59



« Reply #9 on: December 13, 2011, 09:19:52 »

How would I get the lwjgl canvas in a JFrame.
Logged
CodeBunny
Nerdus Imperius
*****
Posts: 453



WWW
« Reply #10 on: December 14, 2011, 11:21:06 »

Place an AWT Canvas onto a JFrame, then:

Display.setParent(the_canvas_to_use).
Logged
tlf30
Regular nerd
**
Posts: 59



« Reply #11 on: December 14, 2011, 11:53:45 »

I'll try that! Thanks.
Logged
tlf30
Regular nerd
**
Posts: 59



« Reply #12 on: January 23, 2012, 00:29:41 »

Changing the canvas over was voted down in my last development meeting, it there a way of adding custom title bar theme support to lwjgl?
Logged
princec
Nerdus Imperius
*****
Posts: 1782



WWW
« Reply #13 on: January 23, 2012, 01:01:42 »

Yes, tell the rest of the development team if they want to do it they have to do what you say.

Cas Smiley
Logged

tlf30
Regular nerd
**
Posts: 59



« Reply #14 on: January 23, 2012, 22:57:07 »

That wont work. Really all that we need is the correct title bar when using themes like on alienware computers.
Logged
Pages: [1] 2 3 4
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.16 | SMF © 2011, Simple Machines
SMFAds for Free Forums
Valid XHTML 1.0! Valid CSS!