|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectunc.cdva.renderingengine.gui.UIManager
public class UIManager
This manager takes care of the UI. It creates the windows removes the windows, update the UI elements, etc... Implemented as a singleton
| Method Summary | |
|---|---|
void |
addFireReticleMenu(Id id)
Display a dialog to let a user fire the gun |
void |
addReticleMenu(UIEvent event)
Display a dialog to set the user input value for a problem |
java.lang.String |
createScoreString(long score,
int size)
Transform a number into a string of the specified length by adding as many 0 before the number |
void |
endGame(UIEvent event)
Invoked when you set the game ends |
void |
endLevel(UIEvent event)
Invoked when a level ends |
void |
freezeFireWindows(UIEvent event)
Invoked when you fire, and block the other windows |
void |
gameMenu()
Load the GUI elements of the Game Menu |
static UIManager |
getInstance(org.fenggui.Display display,
java.awt.Dimension screenResolution,
FengGUIEventRouter fengGUIEventRouter)
Initialize UIManager and return the singleton |
java.lang.String |
getMusicFolder()
|
void |
mainMenu(UIEvent uiEvent)
Load the GUI element of the Main Menu |
void |
optionMenu()
Load the GUI element of the Option Menu |
void |
setHighScoreLabel(UIEvent event,
long highScore)
Invoked when you set the high score label |
void |
setLevelLabel(UIEvent event,
long level)
Invoked when you set the level label |
void |
setMusicFolder(UIEvent event,
java.lang.String musicFolder)
|
void |
setScoreLabel(UIEvent ui,
long score)
Invoked when you set the score label |
protected void |
showSoundOptionMenu()
Load and show the sound option dialog |
void |
unfreezeFireWindows(UIEvent event)
Invoked when you fire, and block the other windows |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static UIManager getInstance(org.fenggui.Display display,
java.awt.Dimension screenResolution,
FengGUIEventRouter fengGUIEventRouter)
display - root element of the GUIscreenResolution - current screen resolutionfengGUIEventRouterGameEvent - source used to send events to the
GameEventProcessor
public void mainMenu(UIEvent uiEvent)
mainMenu in interface UIEventListeneruiEvent - UIEvent sent by an UIEvent sourceUIEventpublic void optionMenu()
public void gameMenu()
protected void showSoundOptionMenu()
public void addReticleMenu(UIEvent event)
addReticleMenu in interface UIEventListenerUIEventpublic void addFireReticleMenu(Id id)
id - id of the current problem
public void setHighScoreLabel(UIEvent event,
long highScore)
UIEventListener
setHighScoreLabel in interface UIEventListenerhighScore - new hi-scoreUIEventListener.setHighScoreLabel(unc.cdva.events.uievents.UIEvent,long)
public void setLevelLabel(UIEvent event,
long level)
UIEventListener
setLevelLabel in interface UIEventListenerlevel - new level labelUIEventListener.setLevelLabel(unc.cdva.events.uievents.UIEvent,long)
public void setScoreLabel(UIEvent ui,
long score)
UIEventListener
setScoreLabel in interface UIEventListenerscore - new score labelUIEventListener.setScoreLabel(unc.cdva.events.uievents.UIEvent,long)
public java.lang.String createScoreString(long score,
int size)
score - value of the scoresize - size of the resulting string
public void endGame(UIEvent event)
UIEventListener
endGame in interface UIEventListenerUIEventListener.endGame(unc.cdva.events.uievents.UIEvent)public void endLevel(UIEvent event)
UIEventListener
endLevel in interface UIEventListenerUIEventListener.endLevel(unc.cdva.events.uievents.UIEvent)public java.lang.String getMusicFolder()
public void setMusicFolder(UIEvent event,
java.lang.String musicFolder)
musicFolder - the musicFolder to setpublic void freezeFireWindows(UIEvent event)
UIEventListener
freezeFireWindows in interface UIEventListenerUIEventListener.freezeFireWindows(unc.cdva.events.uievents.UIEvent)public void unfreezeFireWindows(UIEvent event)
UIEventListener
unfreezeFireWindows in interface UIEventListenerUIEventListener.unfreezeFireWindows(unc.cdva.events.uievents.UIEvent)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||