* @see com.google.gwt.maeglin89273.game.mengine.page.Page#onScreen()
*/
@Override
public void onScreen() {
buttons[0]=new BackButton(new Point(55,getGameHeight()-60), 50);
buttons[1]=new RefreshButton(new Point(getGameWidth()/2,getGameHeight()-60),50);
table=new LeaderboardTable(new Point(getGameWidth()/2,getGameHeight()/2));
progressLabel=new GameLabel(new Point(getGameWidth()/2,108), TextAlign.CENTER, TextBaseline.MIDDLE,
"", ASBOTXConfigs.Color.BORDER_DARK_GRAY, ASBOTXConfigs.getCGFont(12));
totalLabel=new GameLabel(new Point(getGameWidth()-3,108), TextAlign.RIGHT, TextBaseline.MIDDLE,
"Total "+game.getLocalPlayer().getTotal(), ASBOTXConfigs.Color.BORDER_DARK_GRAY,
ASBOTXConfigs.getCGFont(12));
//put the components on root
for(int i=0;i<buttons.length;i++){
root.addComponentOnLayer(buttons[i]);
}
root.addComponentOnLayer(table);
root.addComponentOnLayer(progressLabel);
root.addComponentOnLayer(totalLabel);
root.addLayer(new ImageLayer(MEngine.getAssetManager().getSpriteSheet("images/leaderboard.png"),
new Point(0,0), getGameWidth(), getGameHeight()));
//connect to the server
table.showText("Connecting...");
reconnect();
}