Examples of GameLabel


Examples of com.google.gwt.maeglin89273.game.mengine.component.GameLabel

   
    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
   
View Full Code Here

Examples of com.google.gwt.maeglin89273.game.mengine.component.GameLabel

    private final String font=ASBOTXConfigs.getCGFont(15);
    private final String boldFont=ASBOTXConfigs.getCGBoldFont(15);
   
    public LeaderboardTable(Point p) {
      super(p, getGameWidth(),300);
      bigLabel=new GameLabel(p, TextAlign.CENTER, TextBaseline.MIDDLE,"",
          ASBOTXConfigs.Color.GRAY, ASBOTXConfigs.getCGFont(45));
      hightlightOffset=getTopY()+15;
    }
View Full Code Here

Examples of com.google.gwt.maeglin89273.game.mengine.component.GameLabel

      super(buttonPos, bounds,bounds,new SpriteBlock(3*(200+SpriteBlock.SPACING),
          chooseSpriteBlockY(ASBOTXConfigs.Utility.switchStatus(game.getLoginInfo().getStatus())),
          200,200,ASBOTXConfigs.Utility.getButtonsSpriteSheet()));
     
      if(game.getLoginInfo().isConnectionSuccess()){
        this.label=new GameLabel(labelPos,align, TextBaseline.MIDDLE,
            game.getLoginInfo().getStatus()==LoginInfo.Status.LOGGED_IN?game.getLocalPlayer().getID():"",
            labelColor, ASBOTXConfigs.getCGFont(12));
      }else{
        setEnabled(false);
      }
View Full Code Here

Examples of com.google.gwt.maeglin89273.game.mengine.component.GameLabel

  @Override
  public void onScreen() {
    final ASBOTXGame game=(ASBOTXGame)getGame();
    game.initLocalPlayer();
    layers=new GroupLayer();
    layers.addComponentOnLayer(new GameLabel(new Point(getGameWidth()/2,getGameHeight()/2),
        TextAlign.CENTER, TextBaseline.MIDDLE, "Loading...", ASBOTXConfigs.Color.WHITE,
        ASBOTXConfigs.getCGFont(26)));
    layers.addComponentOnLayer(new LoadingBar(35));
    layers.addComponentOnLayer(new Glass(getGameWidth(), getGameHeight()));
   
View Full Code Here

Examples of com.google.gwt.maeglin89273.game.mengine.component.GameLabel

public class StepBoard extends GeneralComponent{
  private final GameLabel titleLabel;
  private final SpriteBlock block;
  public StepBoard(Point leftTopCorner,double centerX) {
    super(leftTopCorner, 200, 420);
    this.titleLabel=new GameLabel(new Point(centerX,30),
        TextAlign.CENTER,TextBaseline.MIDDLE,null, ASBOTXConfigs.Color.GRAY, ASBOTXConfigs.getCGFont(32));
    this.block=new SpriteBlock(0,0,200,420,MEngine.getAssetManager().getSpriteSheet("images/tutorial_steps.png"));
  }
View Full Code Here

Examples of com.google.gwt.maeglin89273.game.mengine.component.GameLabel

   
    ScoreBoard(Point center) {
      super(center, 540,375);
     
      this.block=new SpriteBlock(0,0,720,500,MEngine.getAssetManager().getSpriteSheet("images/boards.png"));
      this.title=new GameLabel(new Point(getLeftX()+15,getTopY()+25), TextAlign.LEFT, TextBaseline.TOP,
          level.toString(), ASBOTXConfigs.Color.TRANSLUCENT_DARK_GRAY, ASBOTXConfigs.getCGFont(35));
      double buttonsY=getBottomY()-20;
      Point leftButtonPos=new Point(getX()-BUTTONS_SPACING,buttonsY);
      Point centerButtonPos=new Point(getX(),buttonsY);
      Point rightButtonPos=new Point(getX()+BUTTONS_SPACING,buttonsY);
     
     
      switch(status){
        case NEW_HIGH_SCORE:
         
          scoreLabels=new GameLabel[]{new GameLabel(new Point(getX(),getY()-40), TextAlign.CENTER, TextBaseline.MIDDLE,
              "New High Score!", ASBOTXConfigs.Color.LIGHT_BLUE,ASBOTXConfigs.Color.DARK_BLUE,0.5f, ASBOTXConfigs.getCGFont(45)),
              new GameLabel(new Point(getX(),getY()+50), TextAlign.CENTER, TextBaseline.MIDDLE,
                  Integer.toString(score),ASBOTXConfigs.Color.LIGHT_YELLOW, ASBOTXConfigs.Color.YELLOW_BORDER,2, ASBOTXConfigs.getCGFont(70))};
          buttons=new GameButton[]{new LevelMenuButton(leftButtonPos,BUTTONS_BOUNDS),
               new ReplayButton(centerButtonPos,BUTTONS_BOUNDS),
               new NextLevelButton(rightButtonPos,BUTTONS_BOUNDS)};
          break;
        case GENERAL:
          scoreLabels=new GameLabel[]{new GameLabel(new Point(getX(),getY()-30), TextAlign.CENTER, TextBaseline.MIDDLE,
              "High Score "+localPlayer.getScoreAt(level), ASBOTXConfigs.Color.LIGHT_BLUE,ASBOTXConfigs.Color.DARK_BLUE,0.5f, ASBOTXConfigs.getCGFont(45)),
                        new GameLabel(new Point(getX(),getY()+50), TextAlign.CENTER, TextBaseline.MIDDLE,
                  "Score "+score, ASBOTXConfigs.Color.GRAY,ASBOTXConfigs.Color.DARK_GRAY,1, ASBOTXConfigs.getCGFont(45))};
          buttons=new GameButton[]{new LevelMenuButton(leftButtonPos,BUTTONS_BOUNDS),
                       new ReplayButton(centerButtonPos,BUTTONS_BOUNDS),
                       new NextLevelButton(rightButtonPos,BUTTONS_BOUNDS)};
          break;
        case LEVEL_FAILED:
          scoreLabels=new GameLabel[]{new GameLabel(new Point(getX(),getY()+20), TextAlign.CENTER, TextBaseline.MIDDLE,
                        "Level Failed!", ASBOTXConfigs.Color.BLACK, ASBOTXConfigs.getCGFont(45))};
          buttons=new GameButton[]{new LevelMenuButton(leftButtonPos,BUTTONS_BOUNDS),
                new ReplayButton(rightButtonPos,BUTTONS_BOUNDS)};
                       
      }
View Full Code Here

Examples of com.google.gwt.maeglin89273.game.mengine.component.GameLabel

     */
    public IDEnteredBoard(Point p) {
      super(p, 450, 150);
      block=new SpriteBlock(0,500+SpriteBlock.SPACING,720,240,MEngine.getAssetManager().getSpriteSheet("images/boards.png"));
      button=new SubmitButton(getPositionAt(PositionType.SOUTH));
      idLabel=new GameLabel(new Point(getX(),getY()), TextAlign.CENTER, TextBaseline.MIDDLE, "", ASBOTXConfigs.Color.BLACK, ASBOTXConfigs.getCGFont(28));
      messageLabel=new GameLabel(new Point(getX(),getBottomY()-40), TextAlign.CENTER, TextBaseline.MIDDLE, "", ASBOTXConfigs.Color.ORANGE, ASBOTXConfigs.getCGBoldFont(12));
    }
View Full Code Here

Examples of com.google.gwt.maeglin89273.game.mengine.component.GameLabel

    for(GameButton button:buttons){
      root.addComponentOnLayer(button);
    }
     
    root.addLayer(new ImageLayer(MEngine.getAssetManager().getSpriteSheet("images/welcome_bg.png"), new Point(0,0), getGameWidth(), getGameHeight()));
    root.addComponentOnLayer(new GameLabel(new Point(getGameWidth()-5,3), TextAlign.RIGHT, TextBaseline.TOP, ASBOTXConfigs.VERSION, ASBOTXConfigs.Color.TEXT, ASBOTXConfigs.getCGFont(12)));
    root.addComponentOnLayer(creator.getWorld());
  }
View Full Code Here

Examples of com.google.gwt.maeglin89273.game.mengine.component.GameLabel

    root.draw(context);
  }
  @Override
  public void onScreen() {
    Point center=new Point(getGameWidth()/2,getGameHeight()/2);
    clickLabel=new GameLabel(new Point(center.getX(),center.getY()+32), TextAlign.CENTER, TextBaseline.MIDDLE, "click here to continue", ASBOTXConfigs.Color.WHITE, clickTextFont);
    root=new GroupLayer();
    if(level.hasHint()){
      this.button=new HintButton(new Point(center.getX(),center.getY()+225));
      root.addComponentOnLayer(button);
    }
    root.addComponentOnLayer(new GameLabel(center, TextAlign.CENTER, TextBaseline.MIDDLE, "Pause", ASBOTXConfigs.Color.WHITE, pauseTextFont));
    root.addComponentOnLayer(clickLabel);
    root.addComponentOnLayer(new Glass(getGameWidth(),getGameHeight()));
    root.addLayer(new Layer(){

      @Override
View Full Code Here

Examples of com.google.gwt.maeglin89273.game.mengine.component.GameLabel

  /* (non-Javadoc)
   * @see com.google.gwt.maeglin89273.game.mengine.page.Page#onScreen()
   */
  @Override
  public void onScreen() {
    layers.addComponentOnLayer(new GameLabel(new Point(getGameWidth()/2,60),TextAlign.CENTER,TextBaseline.MIDDLE,
                             world.getTitle(),ASBOTXConfigs.Color.GRAY,ASBOTXConfigs.getCGFont(32)));
   
    board=new ButtonBoard(400,getGameWidth()/2-200,110);
    back=new BackButton(new Point(30,30),25);
    layers.addComponentOnLayer(board);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.