Java-Gaming.org
Java4K winners:
[
by our judges
|
by the community
]
Featured games (67)
games approved by the League of Dukes
Games in Showcase (∞)
games submitted by our members
News
: Read the
Java Gaming Resources
, or peek at
the official Java tutorials
Home
Help
Search
Login
Register
Java-Gaming.org
>
Game Development
>
Game Play & Game Design
>
Interfaces
Pages: [
1
]
Print
Interfaces
(Read 1012 times)
0 Members and 2 Guests are viewing this topic.
Mads
JGO Ninja
Posts: 674
Medals: 16
Directly directional
Interfaces
«
on:
2011-03-28 09:04:15
»
How do you usually go about interfaces and menu-screens? I tend to create an array of these objects, and forward clicks out to each of them being shown, but I think thats a weird way of doing it.
http://www.JavaDaemon.com/
Mickelukas
JGO Ninja
Posts: 731
Medals: 25
Java guru wanabee
Re: Interfaces
«
Reply #1 on:
2011-03-28 09:53:44
»
I do the same but only send the clicks after having done a contain() to the rect of the element
Mike
My game:
State of Profit
Forum
Discussion thread @ JGO
ra4king
JGO Kernel
Posts: 3155
Medals: 196
I'm the King!
Re: Interfaces
«
Reply #2 on:
2011-03-29 23:19:40
»
I have a framework for a menu system.
I have a Menus class that has an ArrayList of MenuPage's. MenuPage has an ArrayList of MenuItem's.
Menus register the mouse and motion listeners and it delegates the events to the current MenuPage shown, which loops through all the MenuItem's, using item.getBounds().contains(int x,int y), which then delegates it to its handler.
Hope that helped
-Roi
Doodle Jump online!
Follow me on Twitter!
Pages: [
1
]
Print
Jump to:
Please select a destination:
-----------------------------
Games Center
-----------------------------
=> Featured Games
=> Showcase
=> Contests
===> LWJGL16k - 2011
===> 4K Game Competition - 2012
===> JGO Comp Petite
===> Finished Contests
=====> 4K Game Competition - 2011
=====> 4K Game Competition - 2010
=====> 4K Game Competition - 2009
=====> 4K Game Competition - 2008
=====> 4K Game Competition - 2007
=====> 4K Game Competition - 2006
=====> 4K Game Competition - 2005
=====> Tiny Game 2010
=====> JGO Comp 2009
=====> 16K LWJGL Competition - 2005
=====> Java Technology Game Development Contest - 2004
-----------------------------
Discussions
-----------------------------
=> General Discussions
===> Suggestions
=> Business and Project Discussions
===> Jobs and Resumes
===> Community & Volunteer Projects
=> Miscellaneous Topics
-----------------------------
Game Development
-----------------------------
=> Newbie & Debugging Questions
=> Articles & tutorials
=> Game Play & Game Design
=> Game Mechanics
===> Artificial Intelligence
=> Networking & Multiplayer
=> Performance Tuning
=> Shared Code
-----------------------------
Java Game APIs & Engines
-----------------------------
=> Engines, Libraries and Tools
===> Java 3D
===> JInput
===> jMonkeyEngine
===> Xith3D Forums
===> Tools Discussion
=> Java 2D
===> JavaFX
=> OpenGL Development
===> JOGL Development
===> LWJGL Development
=> Java Sound & OpenAL
===> JOAL Development
=> Java on Mobile Devices
===> Android
===> J2ME
Loading...