Java-Gaming.org Hi !
Featured games (81)
games approved by the League of Dukes
Games in Showcase (513)
Games in Android Showcase (119)
games submitted by our members
Games in WIP (576)
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 1301 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 Duke




Stencyl


« 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!

http://wiki.java.net/bin/view/Games/JeffFAQ
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  
 
 
You cannot reply to this message, because it is very, very old.

 

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

Longarmx (36 views)
2014-10-17 03:59:02

Norakomi (28 views)
2014-10-16 15:22:06

Norakomi (24 views)
2014-10-16 15:20:20

lcass (27 views)
2014-10-15 16:18:58

TehJavaDev (52 views)
2014-10-14 00:39:48

TehJavaDev (54 views)
2014-10-14 00:35:47

TehJavaDev (42 views)
2014-10-14 00:32:37

BurntPizza (63 views)
2014-10-11 23:24:42

BurntPizza (36 views)
2014-10-11 23:10:45

BurntPizza (77 views)
2014-10-11 22:30:10
Understanding relations between setOrigin, setScale and setPosition in libGdx
by mbabuskov
2014-10-09 22:35:00

Definite guide to supporting multiple device resolutions on Android (2014)
by mbabuskov
2014-10-02 22:36:02

List of Learning Resources
by Longor1996
2014-08-16 10:40:00

List of Learning Resources
by SilverTiger
2014-08-05 19:33:27

Resources for WIP games
by CogWheelz
2014-08-01 16:20:17

Resources for WIP games
by CogWheelz
2014-08-01 16:19:50

List of Learning Resources
by SilverTiger
2014-07-31 16:29:50

List of Learning Resources
by SilverTiger
2014-07-31 16:26:06
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!