Hi !
Featured games (91)
games approved by the League of Dukes
Games in Showcase (757)
Games in Android Showcase (229)
games submitted by our members
Games in WIP (844)
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  
  Creating new panels in Exclusive Mode?  (Read 2034 times)
0 Members and 1 Guest are viewing this topic.
Offline 69_Jeremy_69

Senior Newbie

Java games rock!

« Posted 2004-12-02 03:46:35 »

I have an app running in full screen mode.  Now I want an area along the bottom for player info.  How do you go about creating some kind of panel that will float above the screen.

The main playing area is a 1024x1024 board.  Think risk, like an area at the base of the screen, that will show your current cards.  Any pointers to howto's would be great thanks.

If you check out Wurm you'll see that have little tabs at the bottom of there window.
Offline Eliwood

Junior Devvie


« Reply #1 - Posted 2004-12-02 04:23:27 »

Although this isn't exactly what you are looking for since there is a real solution to this, there's nothing really wrong with just drawing right over the bottom of the screen if it's a HUD...

Of couse, if you want buttons and GUI components, then it would be to your benefit to actually place Swing components there as described in Brackeen's book. Just remember to disable their repainting scheme, otherwise you'll end up with a mess of repaints.

Offline Jeff

JGO Coder

Got any cats?

« Reply #2 - Posted 2004-12-06 04:34:53 »

WURM is an OpenGL prgoram.

Im prrtty sure they are cretaing textures  on the fly and rendering them to polygons co-incident with the screen.

However it soudsn to me like what youare doing is a 2D game using Full Screen Exlcusive mdoe, yes?  The answer is that ocne you've tkane control of the screen it is *yours* to draw to.  So in order to create one thing "over" another you just need to control the order in which you BLT your data to the buffer before you flip it.

HUDs by definiton are always drawn last.

if you want areas of your HUD to show whatw as drawn "behind' it you just need to do a BLT with Alpha.  Note however that there are some limits in how Java2D handles Alpha values.  Im not sure what the latest state of these limits is, how many still exist.  Others doing 2D work in Tiger could probably tell you or you could try looking at the Tiger release notes.

Got a question about Java and game programming?  Just new to the Java Game Development Community?  Try my FAQ.  Its likely you'll learn something!
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline 69_Jeremy_69

Senior Newbie

Java games rock!

« Reply #3 - Posted 2004-12-07 18:55:16 »

Thanks, yep thats working.  Got the HUD working.  Now I just need to design a better looking gif to overlay. Thanks.
Pages: [1]
  ignore  |  Print  

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

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

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

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

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

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

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

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

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

Solater (143 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 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‑
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!