Multiple hud layers

Hi

I’m playing with various 3d scene graphs for my next project. Most of them have advantages and dis advantages when it comes to the main 3d parts, but it’s the 2d parts that seem to set them apart. I’m seriously looking at xith again, it seems to be have the most intuative (to me) 2d overlay interfac.

I’m playing with multiple hud planes. I’ve started by modifying the Xith3DGuiTest and have moved the panel to the middle of the screen, made it so escape will show/hide it. When I try and add multiple overlays things go funny. I’m adding one that is almost as big as the xith window, with the original one in the middle over the top. When I press escape, it comes and goes as before, but now non of the buttons work???. Is it possile to do multiple overlays like this, or do I have to have one overlay with the other components (JButton etc) on the one overlay?.

I’d like to be able to have a HUD during game play, and then when I hit esc the main menu overlay is added too, but obviously, I’d want the input to work :slight_smile:

Endolf

Does the silence mean that it’s not possible to have overlapping UIOverlays and still maintain the input for them?

Endolf

I’m not sure this is what you are asking, but I found it easier just to go with one big UIWindow that does everything instead of multiple smaller overlapping UIWindows.

Hi

I’m using JButton JTextArea and the like on my overlays, when I have two overlapping overlays, the input to the JButtons etc seems to not happen.

Thanks

Endolf

Sorry but I havn’t used the UI classes, so I won’t be able to help. Hopefully others have and will.

Will.

That being the case, how do you do your hud/options screens?

Endolf

I’m not sure one of the Xith project use a real GUI with the UIWindow/Overlay classes.
There are mostly deprecated.
We were discussing of that, why not doing a true 3D Gui and so on…

I want to do some GUI for my games, so I’ll make a solution, but :

  • Either the Xith community agree to integrate it in Xith
  • Either I include it in Gamma, and that’s it

I run multiple gui windows and have not lost button action, I have noticed at times that only the bottom portion of a button may react to mouse clicks. When I have 3 buttons in a container sometimes the first button does nothing until the second or third is pressed then the first works…wierd.

I use the Foreground node. This is very fast, but has no text support though :frowning:

Xith3D desperatelly needs a supported UI toolkit. I have seen three or four projects come and go, some delivering betas or impressive screenshots, but never a finished product.

MagicSpark, I’ll tell you what I told everyone: Good luck, I really hope you make something, I can’t wait to see something, and if there is anything you think I can do to help, just ask. It would be nice to see just one UI effort go through to completion.

I believe the ideal UI would use the Foreground node as a base, and add on text display/input and button support (to start with).

Will.

Endolf, just on the off chance, you haven’t been reading my Gem have you?

I’ve done context-sensitive multi HUD layers in Swing very effectively, and they’re fantastic. I’ve never got them to work in Xith so far.

Context-sensitive HUDs are:

  • you build your HUD as a set of 100% independent mini-HUDs, each in a separate class
  • all these get displayed simultaneously at runtime, overlaid on top of each other
  • depending upon what is happening in the game, some of them disappear and others appear (this is part of the context sensitivity)
  • if the game is point-and-click mouse-controlled, then precisely one of the HUD’s captures mouse input at any given time; it uses the x/y info to update itself. For instance, a simple example is a HUD that displays a selection rectangle around any object the mouse is currently floating over.
  • the user has some control over which HUD is capturing input (this is the othe part of context-sensitivity)

I bring this up because:

  • IMHO any rewrite of Xith’s overlay code MUST support all this; this is the best way to write HUD’s, and is beautifully simple to maintain and add new GUI features to
  • Swing effortlessly supports all of that, although I avoid Swing’s event-handling and just have the background (JFrame or similar) capture all events and then forward them to whichever HUD is currently active, rather than rely on Swing propagating things around, or risk it propagating things I don’t want propagated, or consuming things it shouldnt be.

Once you’ve used something like this, it really is the only way to fly :).

Someone said in a thread of this forum that JOGL can’t do Fullscreen.
Is it because it use AWT/Swing ?
If yes, it would be impossible to make a fullscreen game ( using JOGL ) with a Swing GUI ( using the current Xith User Interface ),
Am I wrong ?

Who said that? I’m pretty certain JOGL can do full screen, it works for my game (though I am using LWJGL as my default renderer).

I have no idea if the UI works in fullscreen though.

Cheers,

Will.

Probably a LWJGL developer ;D ;D ;D

That’s why I went with one big overlay that managed the interactions of the various Swing components. Once I did that, I was in familiar turf. I now have multiple Swing components with transparent backgrounds, custom images for buttons, etc.

Here is the code I use:
http://cvs.sourceforge.net/viewcvs.py/whoola/game/src/com/whoola/game/dock/view/ui/DockUIWindow.java?rev=1.33&view=auto

Do you have a simple driver for the DockUI class?? ;D