Java-Gaming.org Hi !
Featured games (91)
games approved by the League of Dukes
Games in Showcase (762)
Games in Android Showcase (229)
games submitted by our members
Games in WIP (846)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: [1]
  ignore  |  Print  
  Multiple hud layers  (Read 3873 times)
0 Members and 1 Guest are viewing this topic.
Offline endolf

JGO Coder


Medals: 7
Exp: 15 years


Current project release date: sometime in 3003


« Posted 2005-07-26 20:17:57 »

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 Smiley

Endolf

Offline endolf

JGO Coder


Medals: 7
Exp: 15 years


Current project release date: sometime in 3003


« Reply #1 - Posted 2005-07-28 11:26:22 »

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

Endolf

Offline croft

Junior Devvie




Java, Java, Java


« Reply #2 - Posted 2005-07-28 18:19:32 »

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

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.

David Wallace Croft / www.CroftSoft.com / (214) 636-3790 m / Advanced Java Game Programming
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline endolf

JGO Coder


Medals: 7
Exp: 15 years


Current project release date: sometime in 3003


« Reply #3 - Posted 2005-07-28 19:17:11 »

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

Offline William Denniss

JGO Coder


Projects: 2


Fire at will


« Reply #4 - Posted 2005-07-29 01:42:32 »

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

Will.

Offline endolf

JGO Coder


Medals: 7
Exp: 15 years


Current project release date: sometime in 3003


« Reply #5 - Posted 2005-07-29 10:58:18 »

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

Endolf

Offline Amos Wenger

Senior Devvie




Everything's possible, but not everything's fun...


« Reply #6 - Posted 2005-07-29 15:47:21 »

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

"Once you start working on something, don't be afraid of failure and don't abandon it. People who work sincerely are the happiest"
Offline hawkwind

Junior Devvie




Java games rock!


« Reply #7 - Posted 2005-07-29 23:39:13 »

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.
Offline William Denniss

JGO Coder


Projects: 2


Fire at will


« Reply #8 - Posted 2005-07-30 02:07:43 »

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

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.

Offline blahblahblahh

JGO Coder


Medals: 1


http://t-machine.org


« Reply #9 - Posted 2005-07-30 12:20:54 »

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 Smiley.

malloc will be first against the wall when the revolution comes...
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline Amos Wenger

Senior Devvie




Everything's possible, but not everything's fun...


« Reply #10 - Posted 2005-07-30 12:43:57 »

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 ?

"Once you start working on something, don't be afraid of failure and don't abandon it. People who work sincerely are the happiest"
Offline William Denniss

JGO Coder


Projects: 2


Fire at will


« Reply #11 - Posted 2005-08-01 05:09:02 »

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.

Offline Amos Wenger

Senior Devvie




Everything's possible, but not everything's fun...


« Reply #12 - Posted 2005-08-01 11:41:36 »

Who said that?
Probably a LWJGL developer  Grin Grin Grin

"Once you start working on something, don't be afraid of failure and don't abandon it. People who work sincerely are the happiest"
Offline croft

Junior Devvie




Java, Java, Java


« Reply #13 - Posted 2005-08-01 16:20:48 »

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.


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

David Wallace Croft / www.CroftSoft.com / (214) 636-3790 m / Advanced Java Game Programming
Offline hawkwind

Junior Devvie




Java games rock!


« Reply #14 - Posted 2005-08-01 20:49:58 »

Do you have a simple driver for the  DockUI class?? Grin
Pages: [1]
  ignore  |  Print  
 
 

 
EgonOlsen (359 views)
2018-06-10 19:43:48

EgonOlsen (360 views)
2018-06-10 19:43:44

EgonOlsen (298 views)
2018-06-10 19:43:20

DesertCoockie (533 views)
2018-05-13 18:23:11

nelsongames (850 views)
2018-04-24 18:15:36

nelsongames (836 views)
2018-04-24 18:14:32

ivj94 (1283 views)
2018-03-24 14:47:39

ivj94 (408 views)
2018-03-24 14:46:31

ivj94 (1070 views)
2018-03-24 14:43:53

Solater (417 views)
2018-03-17 05:04:08
Java Gaming Resources
by philfrei
2017-12-05 19:38:37

Java Gaming Resources
by philfrei
2017-12-05 19:37:39

Java Gaming Resources
by philfrei
2017-12-05 19:36:10

Java Gaming Resources
by philfrei
2017-12-05 19:33:10

List of Learning Resources
by elect
2017-03-13 14:05:44

List of Learning Resources
by elect
2017-03-13 14:04:45

SF/X Libraries
by philfrei
2017-03-02 08:45:19

SF/X Libraries
by philfrei
2017-03-02 08:44:05
java-gaming.org is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑gaming.org
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!