Java 类com.badlogic.gdx.scenes.scene2d.ui.TextButton.TextButtonStyle 实例源码

项目:cachebox3.0    文件:NinePatchEditorDialog.java   
private void reviewTablePreview() {
    tablePreview.clear();
    //tablePreview.debug();
    tablePreview.center().left();

    TextButtonStyle stylePreview = new TextButton.TextButtonStyle();
    stylePreview.font = game.skin.getFont("default-font");
    buttonPreview1 = new TextButton("1x Button", stylePreview);
    buttonPreview1.setSize(imgWidth, imgHeight);
    cellPreview1 = tablePreview.add(buttonPreview1).width(buttonPreview1.getWidth()).height(buttonPreview1.getHeight()).padBottom(15);
    tablePreview.row();

    buttonPreview2 = new TextButton("2x Button", stylePreview);
    buttonPreview2.setSize(imgWidth * 2.0f, imgHeight * 2.0f);
    cellPreview2 = tablePreview.add(buttonPreview2).width(buttonPreview2.getWidth()).height(buttonPreview2.getHeight()).padBottom(15);
    tablePreview.row();

    buttonPreview3 = new TextButton("3x Button", stylePreview);
    buttonPreview3.setSize(imgWidth * 3.0f, imgHeight * 3.0f);
    cellPreview3 = tablePreview.add(buttonPreview3).width(buttonPreview3.getWidth()).height(buttonPreview3.getHeight()).padBottom(15);
    tablePreview.row();

}
项目:Chemtris    文件:ButtonLoader.java   
public static TextButton makeRight(){
    TextButtonStyle style = new TextButtonStyle();
    style.up = skinOne.getDrawable("right");
    style.down = skinOne.getDrawable("rightpress");
    style.over = skinOne.getDrawable("rightpress");
    style.font = FontLoader.font(1f);

    TextButton right = new TextButton("",style);

    float w = Gdx.graphics.getWidth() / 14;
    float h = Gdx.graphics.getHeight() / 12;

    right.setWidth(w);
    right.setHeight(h);
    right.setPosition(w + w / 4 + h + w, h - h / 4 + w / 3 + h);

    return right;
}
项目:Chemtris    文件:ButtonLoader.java   
public static TextButton makeLeft(){
    TextButtonStyle style = new TextButtonStyle();
    style.up = skinOne.getDrawable("left");
    style.down = skinOne.getDrawable("leftpress");
    style.over = skinOne.getDrawable("leftpress");
    style.font = FontLoader.font(1f);

    TextButton left = new TextButton("",style);

    float w = Gdx.graphics.getWidth() / 14;
    float h = Gdx.graphics.getHeight() / 12;

    left.setWidth(w);
    left.setHeight(h);
    left.setPosition(0, h - h / 4 + w / 3 + h);

    return left;
}
项目:Chemtris    文件:ButtonLoader.java   
public static TextButton makeDesc(){
    TextButtonStyle style = new TextButtonStyle();
    style.up = skinTwo.getDrawable("descend1");
    style.down = skinTwo.getDrawable("descend2");
    style.over = skinTwo.getDrawable("descend2");
    style.font = FontLoader.font(1f);

    TextButton dsc = new TextButton("",style);

    float w = Gdx.graphics.getWidth() / 14;
    float h = Gdx.graphics.getHeight() / 12;

    dsc.setWidth(w);
    dsc.setHeight(h);
    dsc.setPosition(w / 2 + w/2 + h/10 + h/2, h - h / 4 + w / 3 + h);

    return dsc;
}
项目:Chemtris    文件:ButtonLoader.java   
public static TextButton rx(){

        TextButtonStyle style = new TextButtonStyle();
        style.up = skinTwo.getDrawable("rotatex");
        style.down = skinTwo.getDrawable("rotatexpress");
        style.over = skinTwo.getDrawable("rotatexpress");
        style.font = FontLoader.font(1f);

        TextButton b = new TextButton("",style);

        float w = Gdx.graphics.getWidth() / 14;
        float h = Gdx.graphics.getHeight() / 12;
        b.setHeight(h);
        b.setWidth(w);

        b.setPosition(Gdx.graphics.getWidth()-w - 3f*w, h - h / 4 + w / 3 + h);

        return b;
    }
项目:Chemtris    文件:ButtonLoader.java   
public static TextButton ry(){

        TextButtonStyle style = new TextButtonStyle();
        style.up = skinTwo.getDrawable("rotatey");
        style.down = skinTwo.getDrawable("rotateypress");
        style.over = skinTwo.getDrawable("rotateypress");
        style.font = FontLoader.font(1f);

        TextButton b = new TextButton("",style);

        float w = Gdx.graphics.getWidth() / 14;
        float h = Gdx.graphics.getHeight() / 12;

        b.setHeight(h);
        b.setWidth(w);
        b.setPosition(Gdx.graphics.getWidth()-w - 1.75f* w, h - h / 4 + w / 3 + h);

        return b;
    }
项目:Chemtris    文件:ButtonLoader.java   
public static TextButton rz(){

        TextButtonStyle style = new TextButtonStyle();
        style.up = skinTwo.getDrawable("rotatez");
        style.down = skinTwo.getDrawable("rotatezpress");
        style.over = skinTwo.getDrawable("rotatezpress");
        style.font = FontLoader.font(1f);

        TextButton b = new TextButton("",style);

        float w = Gdx.graphics.getWidth() / 14;
        float h = Gdx.graphics.getHeight() / 12;

        b.setHeight(h);
        b.setWidth(w);
        b.setPosition(Gdx.graphics.getWidth()-w - .5f* w, h - h / 4 + w / 3 + h);

        return b;
    }
项目:Chemtris    文件:ButtonLoader.java   
public static TextButton cam(){

        TextButtonStyle style = new TextButtonStyle();
        style.up = skinTwo.getDrawable("cam1");
        style.down = skinTwo.getDrawable("cam2");
        style.over = skinTwo.getDrawable("cam2");
        style.font = FontLoader.font(1f);

        TextButton b = new TextButton("",style);

        float w = Gdx.graphics.getWidth() / 14;
        float h = Gdx.graphics.getHeight() / 12;

        b.setHeight(h);
        b.setWidth(w);
        b.setPosition(Gdx.graphics.getWidth()-w - w,
                h + 7* h + h);

        return b;
    }
项目:Chemtris    文件:ButtonLoader.java   
public static TextButton question(){
    TextButtonStyle circle = makeCircleStyle();
    //set button font
    circle.font = FontLoader.font(.65f);
    //make button
    TextButton play = new TextButton("?", circle);
    float w = Gdx.graphics.getWidth() / 14;
    float h = Gdx.graphics.getHeight() / 12;

    //set button size and position
    play.setHeight(h);
    play.setWidth(w);
    play.setPosition(0, Gdx.graphics.getHeight()-play.getHeight()-play.getHeight()/5);
    //return button
    return play;
}
项目:Chemtris    文件:ButtonLoader.java   
public static TextButton quit(){
    TextButtonStyle circle = makeCircleStyle();
    //set button font
    circle.font = FontLoader.font(.65f);
    //make button
    TextButton play = new TextButton("quit", circle);
    float w = Gdx.graphics.getWidth() / 14;
    float h = Gdx.graphics.getHeight() / 12;

    //set button size and position
    play.setHeight(h);
    play.setWidth(w);
    play.setPosition(Gdx.graphics.getWidth()-w - w,
            h + 5.5f* h + h);
    //return button
    return play;
}
项目:Chemtris    文件:ButtonLoader.java   
public static TextButton yes(){
    TextButtonStyle circle = makeCircleStyle();
    //set button font
    circle.font = FontLoader.font(.65f);
    //make button
    TextButton play = new TextButton("Y", circle);
    float w = Gdx.graphics.getWidth() / 14;
    float h = Gdx.graphics.getHeight() / 12;

    //set button size and position
    play.setHeight(h);
    play.setWidth(w);
    play.setPosition(Gdx.graphics.getWidth()-w - w + w/15,
            h + 3.5f* h + h);
    //return button
    return play;
}
项目:Chemtris    文件:ButtonLoader.java   
public static TextButton no(){
    TextButtonStyle circle = makeCircleStyle();
    //set button font
    circle.font = FontLoader.font(.65f);
    //make button
    TextButton play = new TextButton("N", circle);
    float w = Gdx.graphics.getWidth() / 14;
    float h = Gdx.graphics.getHeight() / 12;

    //set button size and position
    play.setHeight(h);
    play.setWidth(w);
    play.setPosition(Gdx.graphics.getWidth()-w - 2.5f* w,
            h + 3.5f* h + h);
    //return button
    return play;
}
项目:DropTheCube-LD32    文件:BasicGUI.java   
public void init(){
    stage = new Stage(new ScreenViewport());
    Gdx.input.setInputProcessor(stage);

    mainTable = new Table();
    mainTable.setBounds(0, 0, Gdx.graphics.getWidth(), Gdx.graphics.getHeight());

    stage.addActor(mainTable);

    font = new BitmapFont(Gdx.files.internal("font2.fnt"));

    blueTextButtonStyle = new TextButtonStyle();
    blueTextButtonStyle.up = TextureUtils.createDrawable(new Color(52f / 255f, 73f / 255f, 94f / 255f, 1.0f), 300, 75);
    blueTextButtonStyle.down = TextureUtils.createDrawable(new Color(44f / 255f, 62f / 255f, 80f / 255f, 1.0f), 300, 75);
    blueTextButtonStyle.over = TextureUtils.createDrawable(new Color(60f / 255f, 84f / 255f, 108f / 255f, 1.0f), 300, 75);
    blueTextButtonStyle.font = font;
    blueTextButtonStyle.fontColor = Color.BLACK;

    labelStyle = new LabelStyle();
    labelStyle.background = blueTextButtonStyle.up;
    labelStyle.font = font;
    labelStyle.fontColor = Color.WHITE;
}
项目:Ritterhelm    文件:StageButton.java   
public StageButton(final Ritterhelm helm, String label, String buttonID, int x, int y){

        this.helm = helm;

        skin = helm.skin;
        font = helm.font;
        buttonAtlas = helm.buttonAtlas;
        skin.addRegions(buttonAtlas);

        stageButtonStyle = new TextButtonStyle();
        stageButtonStyle.font = font;
        stageButtonStyle.up = skin.getDrawable(buttonID);

        stageButton = new TextButton(label,stageButtonStyle);
        stageButton.setPosition(x, y);

    }
项目:GDXJam    文件:MainMenuScreen.java   
private void addExit() {
    NinePatchDrawable draw = new NinePatchDrawable(Assets.hotkey.button);

    TextButtonStyle style = new ImageTextButtonStyle();
    style.up = draw;
    style.down = draw.tint(Color.DARK_GRAY);
    style.checked = draw;
    style.font = Assets.fonts.font;

    TextButton btn = new TextButton("Exit", style);
    btn.addListener(new ClickListener() {
        @Override
        public void clicked(InputEvent event, float x, float y) {
            super.clicked(event, x, y);
            Gdx.app.exit();
        }
    });
    table.add(btn);
    table.row();
}
项目:GDXJam    文件:MainMenuScreen.java   
public void add(String title, final AbstractScreen screen) {
    NinePatchDrawable draw = new NinePatchDrawable(Assets.hotkey.button);

    TextButtonStyle style = new ImageTextButtonStyle();
    style.up = draw;
    style.down = draw.tint(Color.DARK_GRAY);
    style.checked = draw;
    style.font = Assets.fonts.font;

    TextButton btn = new TextButton(title, style);
    btn.addListener(new ClickListener() {
        @Override
        public void clicked(InputEvent event, float x, float y) {
            super.clicked(event, x, y);
            GameManager.setScreen(screen);
        }
    });
    table.add(btn);
    table.row();

}
项目:OdysseeDesMaths    文件:MenuPrincipal.java   
public MenuPrincipal(OdysseeDesMaths jeu) {
    this.jeu = jeu;

    this.currentState = State.NORMAL;
    this.viewport = new StretchViewport(WIDTH, HEIGHT);
    this.stage = new Stage(viewport);
    this.tableau = new Table();
    this.skin = new Skin();
    this.skin.addRegions(Assets.getManager().get(Assets.UI_MAIN, TextureAtlas.class));
    this.skin.addRegions(Assets.getManager().get(Assets.UI_ORANGE, TextureAtlas.class));
    this.skin.add("background", Assets.getManager().get(Assets.MAIN_MENU_BACKGROUND, Texture.class));

    //propriétés relatives à la police
    this.ftfp = new FreeTypeFontParameter();
    this.menuFont = new BitmapFont();
    this.fontButton = new BitmapFont();

    this.playButtonStyle = new TextButtonStyle();
    this.gameTitleStyle = new LabelStyle();
    this.audioButtons = new AudioButtons();

    this.createUI();
}
项目:bomberman-libgdx    文件:MenuButtonFactory.java   
/**
 * Constructor apply default button style
 */
public MenuButtonFactory() {
    pixmap = new Pixmap(100, 100, Format.RGBA8888);
    pixmap.setColor(Color.WHITE);
    pixmap.fill();
    skin = new Skin();
    skin.add("white", new Texture(pixmap));
    textButtonStyle = new TextButtonStyle();
    textButtonStyle.up = skin.newDrawable("white", Color.DARK_GRAY);
    textButtonStyle.down = skin.newDrawable("white", Color.DARK_GRAY);
    textButtonStyle.over = skin.newDrawable("white", Color.LIGHT_GRAY);
    textButtonStyle.checked = skin.newDrawable("white", Color.BLACK);
    textButtonStyle.font = new BitmapFont(
            Gdx.files.internal("data/font.fnt"),
            Gdx.files.internal("data/font.png"), false);
    textButtonStyle.font.setScale(1.6f);
}
项目:sokobug    文件:MainMenuScreen.java   
@Override
public void show() {
    if (firstStart) {
        game.soundManager = new SoundManager(game.assetManager);
        game.soundManager.startPlayingMusic();
        firstStart = false;
    }

    if (game.soundManager.isMuted()) {
        sound.setStyle(game.assetManager.get(Resources.UI_BUTTONS_JSON.getPath(), Skin.class).get("soundOff",
                TextButtonStyle.class));
    } else {
        sound.setStyle(game.assetManager.get(Resources.UI_BUTTONS_JSON.getPath(), Skin.class).get("soundOn",
                TextButtonStyle.class));
    }

    Gdx.input.setInputProcessor(multiplexer);
}
项目:tafl    文件:HudFactory.java   
private static void addButton(TaflGame game, Object text, Skin skin, LocaleService ls, ChangeListener listener, Dialog dialog) {

        Sprite up = game.graphicsService.getSprite(Assets.GraphicFiles.ATLAS_PIECES, Assets.ButtonGraphics.BLANK);
        Sprite down = game.graphicsService.getSprite(Assets.GraphicFiles.ATLAS_PIECES, Assets.ButtonGraphics.BLANK_PRESSED);

        TextButtonStyle style = new TextButtonStyle();
        style.fontColor = Constants.ScreenConstants.TEXT_COLOR;
        style.font = game.graphicsService.getFont(game.deviceSettings.hudFont);
        style.up = new TextureRegionDrawable(new TextureRegion(up));
        style.down = new TextureRegionDrawable(new TextureRegion(down));

        TextButton button = new TextButton(ls.get(text), style);

        button.addListener(listener);
        dialog.button(button);
        dialog.getButtonTable().row();
    }
项目:Elementorum    文件:ChooseLevel.java   
public ChooseLevel(){
    super("MainMenu");
    mainStage = new Stage();
    TextureAtlas buttonAtlas = new TextureAtlas("gfx/buttons.pack");
    Skin buttonSkin = new Skin(buttonAtlas);

    Gdx.input.setInputProcessor(mainStage);

    buttonFont = new BitmapFont();
    buttonFont.scale(0.5f);

    buttonStyle = new TextButtonStyle();
    buttonStyle.up = buttonSkin.getDrawable("button_green");

    createButtons();
}
项目:Elementorum    文件:MainMenu.java   
public MainMenu() {
    super("MainMenu");
    mainStage = new Stage();
    TextureAtlas buttonAtlas = new TextureAtlas("ui/Buttons.pack");
    Skin buttonSkin = new Skin(buttonAtlas);

    Gdx.input.setInputProcessor(mainStage);

    buttonFont = new BitmapFont();
    buttonFont.scale(1.25f);

    buttonStyle = new TextButtonStyle();
    buttonStyle.up = buttonSkin.getDrawable("Button2");
    buttonStyle.font = buttonFont;

    createButtons();
}
项目:BlockJump    文件:GameScreen.java   
public void createPauseMenu() {
    pauseMenuStage = new Stage();
    // pauseMenuStage.setViewport(fit);

    pauseMenuTable = new Table();
    pauseMenuTable.setFillParent(true);
    pauseMenuStage.addActor(pauseMenuTable);

    TextButtonStyle style = new TextButtonStyle();
    style.up = new TextureRegionDrawable(buttons[0]); // 1080 x 300
    style.down = new TextureRegionDrawable(buttons[0]);
    style.font = new BitmapFont();

    resumeButton = new Button(style);
    pauseMenuTable.add(resumeButton);

    resumeButton.addListener(new ChangeListener() {
        @Override
        public void changed(ChangeEvent event, Actor actor) {
            resumeCall();
        }
    });
}
项目:gdx-skineditor    文件:NinePatchEditorDialog.java   
private void reviewTablePreview() {
    tablePreview.clear();
    //tablePreview.debug();
    tablePreview.center().left();

    TextButtonStyle stylePreview = new TextButton.TextButtonStyle();
    stylePreview.font = game.skin.getFont("default-font");
    buttonPreview1 = new TextButton("1x Button", stylePreview);
    buttonPreview1.setSize(imgWidth, imgHeight);
    cellPreview1 = tablePreview.add(buttonPreview1).width(buttonPreview1.getWidth()).height(buttonPreview1.getHeight()).padBottom(15);
    tablePreview.row();

    buttonPreview2 = new TextButton("2x Button", stylePreview);
    buttonPreview2.setSize(imgWidth * 2.0f, imgHeight * 2.0f);
    cellPreview2 = tablePreview.add(buttonPreview2).width(buttonPreview2.getWidth()).height(buttonPreview2.getHeight()).padBottom(15);
    tablePreview.row();

    buttonPreview3 = new TextButton("3x Button", stylePreview);
    buttonPreview3.setSize(imgWidth * 3.0f, imgHeight * 3.0f);
    cellPreview3 = tablePreview.add(buttonPreview3).width(buttonPreview3.getWidth()).height(buttonPreview3.getHeight()).padBottom(15);
    tablePreview.row();

}
项目:geometri-destroyer    文件:LevelScreen.java   
public LevelButton(final int num) {
    final TextButtonStyle style = new TextButtonStyle();
    style.font = FontManager.getNormalFont();
    style.up = new TextureRegionDrawable(SpriteManager.getSprite(SpriteManager.Sprites.BLANK));
    style.down = new TextureRegionDrawable(SpriteManager.getSprite(SpriteManager.Sprites.BLANK));
    style.fontColor = new Color(0.9f, 0.5f, 0.5f, 1);
    style.downFontColor = new Color(0, 0.4f, 0, 1);

    button = new TextButton("Level " + num, style);
    button.addListener(new LevelButtonListener() {
        @Override
        protected void action() {
            LevelScreen.this.core.game.setLevel(num);
            LevelScreen.this.core.setScreen(LevelScreen.this.core.game);
        }
    });
    this.addActor(button);
}
项目:ead    文件:TextButtonProcessor.java   
@Override
public Component getComponent(TextButton component) {
    Skin skin = gameAssets.getSkin();
    TextButtonComponent button = gameLoop
            .createComponent(TextButtonComponent.class);
    button.setVariablesManager(variablesManager);
    button.setControl(new com.badlogic.gdx.scenes.scene2d.ui.TextButton("",
            new TextButtonStyle(skin.get(component.getStyle(),
                    TextButtonStyle.class))));
    button.setText(gameAssets.getI18N().m(component.getText()));

    I18nTextComponent textComponent = gameLoop
            .createComponent(I18nTextComponent.class);
    textComponent.setI18nKey(component.getText());
    textComponent.setTextSetter(button);
    return new MultiComponent(button, textComponent);
}
项目:it.alcacoop.fourinaline    文件:IconButton.java   
public IconButton(String text, TextureRegion icon, TextButtonStyle tl, boolean leftImage, boolean rightImage, boolean centerText) {
  super(tl);
  label = new Label(text, new LabelStyle(tl.font, tl.fontColor));
  label.setAlignment(Align.center);
  this.style = tl;
  if (leftImage && icon != null) {
    Image icon1 = new Image(icon);
    add(icon1).expandY();
  }

  if (centerText)
    add(label).expand().fill();

  if (rightImage && icon != null) {
    Image icon2 = new Image(icon);
    add(icon2).expandY();
  }


  _IconButton();
}
项目:it.alcacoop.fourinaline    文件:IconButton.java   
public IconButton(String text, TextureRegion icon, TextButtonStyle tl) {
  super(tl);
  this.style = tl;
  label = new Label(text, new LabelStyle(tl.font, tl.fontColor));
  label.setAlignment(Align.center);

  if (icon != null) {
    Image icon1 = new Image(icon);
    add(icon1).expandY();
  }

  add(label).expand().fill();

  if (icon != null) {
    Image icon2 = new Image(icon);
    add(icon2).expandY();
  }

  _IconButton();
}
项目:ingress-indonesia-dev    文件:O.java   
public final void a(Skin paramSkin, Stage paramStage)
{
  N.a(this.a, new TextButton.TextButtonStyle());
  N.a(this.a).down = paramSkin.getDrawable("nav-button-clear-down");
  N.a(this.a).up = paramSkin.getDrawable("nav-button-clear");
  N.a(this.a).font = paramSkin.getFont("default-font");
  Table localTable1 = new Table(paramSkin);
  localTable1.top().pad(6.6F * this.a.a);
  localTable1.row();
  localTable1.add(N.a(this.a, new Label("", paramSkin)));
  a(paramSkin, localTable1);
  Table localTable2 = new Table();
  localTable2.setFillParent(true);
  N.a(this.a, new aa(paramSkin, (int)paramStage.getWidth(), J.a, ag.MOD_ITEMS));
  N.a(this.a).a();
  localTable2.add(N.a(this.a));
  localTable2.row();
  localTable2.add(new ScrollPane(localTable1)).n().f().e(2.0F);
  paramStage.addActor(localTable2);
}
项目:ingress-indonesia-dev    文件:ConfirmModalDialog.java   
protected final Table a(Skin paramSkin, Stage paramStage, int paramInt)
{
  Label.LabelStyle localLabelStyle1 = (Label.LabelStyle)paramSkin.get("large", Label.LabelStyle.class);
  Label.LabelStyle localLabelStyle2 = (Label.LabelStyle)paramSkin.get("default", Label.LabelStyle.class);
  paramSkin.get("default", TextButton.TextButtonStyle.class);
  ActionButton localActionButton1 = new ActionButton(this.d, null, paramSkin);
  ActionButton localActionButton2 = new ActionButton(this.e, null, paramSkin);
  localActionButton1.a(new s(this, localActionButton1, localActionButton2));
  localActionButton2.a(new t(this, localActionButton1, localActionButton2));
  Label localLabel = new Label(this.a, localLabelStyle1);
  Table localTable = new Table();
  e locale = e.b(0.08F);
  localTable.defaults().d(locale).k();
  localTable.add(localLabel).j().n().b(Integer.valueOf(2));
  localTable.row();
  localTable.add(new Label(this.b, localLabelStyle2)).o().b(Integer.valueOf(2));
  localTable.row();
  localTable.add(localActionButton1).a(e.a(0.3F)).i().g(locale);
  localTable.add(localActionButton2).a(e.a(0.3F)).i().g(locale);
  return localTable;
}
项目:ingress-indonesia-dev    文件:InvitesReminderDialog.java   
protected final Table a(Skin paramSkin, Stage paramStage, int paramInt)
{
  Label.LabelStyle localLabelStyle1 = (Label.LabelStyle)paramSkin.get("default-blue", Label.LabelStyle.class);
  Label.LabelStyle localLabelStyle2 = (Label.LabelStyle)paramSkin.get("default-yellow", Label.LabelStyle.class);
  String str = p.a().A().e();
  Table localTable1 = new Table();
  localTable1.add(new Label("You have ", localLabelStyle1));
  localTable1.add(new Label(str, localLabelStyle2));
  localTable1.add(new Label(" unused invites.", localLabelStyle1));
  float f = 0.04F * paramStage.getWidth();
  f localf = new f("Recruit", (TextButton.TextButtonStyle)paramSkin.get("default", TextButton.TextButtonStyle.class));
  Table localTable2 = new Table();
  localf.addListener(new v(this));
  localTable2.add(localf).a(com.a.a.e.a(0.4F)).n().i().k(f).i(f).j(f);
  Table localTable3 = new Table();
  localTable3.add(localTable1);
  localTable3.row();
  localTable3.add(localTable2).o().g();
  return localTable3;
}
项目:ingress-indonesia-dev    文件:aq.java   
private void a(Table paramTable, Skin paramSkin, String paramString1, String paramString2, String paramString3, ai paramai, String paramString4)
{
  f localf = new f(paramString1, (TextButton.TextButtonStyle)paramSkin.get(paramString2, TextButton.TextButtonStyle.class));
  localf.addListener(new ar(this, paramai));
  paramTable.add(localf).a(FactionChoiceStyles.BUTTON_WIDTH).a(Integer.valueOf(8)).o().g();
  paramTable.row();
  if ((!br.b(this.d)) && (this.e == paramai))
  {
    StringBuilder localStringBuilder = new StringBuilder().append(paramString4).append("\n");
    Object[] arrayOfObject = new Object[1];
    arrayOfObject[0] = this.d;
    paramString4 = String.format("[%s is a member of this faction]", arrayOfObject);
  }
  Label localLabel = new Label(paramString4, (Label.LabelStyle)paramSkin.get(paramString3, Label.LabelStyle.class));
  localLabel.setWidth(paramTable.getWidth());
  localLabel.setWrap(true);
  localLabel.setAlignment(10);
  localLabel.pack();
  paramTable.add(localLabel).n().g().j().h(15.0F).j(30.0F);
}
项目:ingress-indonesia-dev    文件:cf.java   
public final void a(Skin paramSkin, Stage paramStage)
{
  this.k = ((Label.LabelStyle)paramSkin.get("mission-list", Label.LabelStyle.class));
  this.l = ((Label.LabelStyle)paramSkin.get("mission-list-disabled", Label.LabelStyle.class));
  this.d = ((TextButton.TextButtonStyle)paramSkin.get("mission-list", TextButton.TextButtonStyle.class));
  this.e = ((TextButton.TextButtonStyle)paramSkin.get("mission-list-completed", TextButton.TextButtonStyle.class));
  this.f = ((TextButton.TextButtonStyle)paramSkin.get("mission-list-selected", TextButton.TextButtonStyle.class));
  this.g = ((Button.ButtonStyle)paramSkin.get("default", TextButton.TextButtonStyle.class));
  this.h = ((Button.ButtonStyle)paramSkin.get("disabled", Button.ButtonStyle.class));
  this.o = paramSkin.getDrawable("nav-button-clear");
  this.b = new Table();
  this.b.setWidth(paramStage.getWidth());
  this.b.setHeight(paramStage.getHeight());
  cc.a(this.a, new aa(paramSkin, (int)paramStage.getWidth(), cc.b(this.a), com.nianticproject.ingress.common.ui.widget.ag.c));
  this.b.add(cc.c(this.a));
  this.b.row();
  this.c = new Table();
  this.c.setWidth(-10 + (int)paramStage.getWidth());
  ScrollPane localScrollPane = new ScrollPane(this.c, new ScrollPane.ScrollPaneStyle());
  localScrollPane.setScrollY(0.0F);
  localScrollPane.setScrollingDisabled(true, false);
  this.b.add(localScrollPane).g().o().p().j().a(5.0F, 5.0F, 5.0F, 5.0F);
  paramStage.addActor(this.b);
}
项目:ingress-indonesia-dev    文件:cs.java   
public void a(Skin paramSkin, Stage paramStage)
{
  this.d = paramStage;
  TextButton.TextButtonStyle localTextButtonStyle1 = (TextButton.TextButtonStyle)paramSkin.get("player-compass", TextButton.TextButtonStyle.class);
  int j = (int)localTextButtonStyle1.font.getSpaceWidth();
  this.e = new f("", localTextButtonStyle1);
  this.e.padLeft(j);
  this.e.padRight(j);
  this.e.addListener(new ct(this));
  TextButton.TextButtonStyle localTextButtonStyle2 = (TextButton.TextButtonStyle)paramSkin.get("player-compass-clear", TextButton.TextButtonStyle.class);
  this.f = new f(this.h, localTextButtonStyle2);
  this.f.padLeft(j);
  this.f.padRight(j);
  this.f.setVisible(false);
  this.f.addListener(new cu(this));
  TextureRegion localTextureRegion = paramSkin.getRegion("nav-beacon");
  Image localImage = new Image(localTextureRegion);
  localImage.setScaling(Scaling.none);
  this.i = new Table();
  this.i.add(localImage).b(localTextureRegion.getRegionWidth()).c(localTextureRegion.getRegionHeight());
  a(this.a.d());
}
项目:ingress-indonesia-dev    文件:bt.java   
protected final Actor b(Skin paramSkin, Stage paramStage)
{
  this.h = new Table();
  float f1 = paramStage.getWidth();
  float f2 = paramStage.getHeight();
  float f3 = f1 - this.b - this.d;
  float f4 = f2 - this.c - this.e;
  float f5 = this.b;
  float f6 = this.e;
  this.h.setX(f5);
  this.h.setY(f6);
  this.h.setWidth(f3);
  this.h.setHeight(f4);
  Table localTable1 = new Table();
  localTable1.setBackground(new az(new NinePatchDrawable(paramSkin.getPatch("remote-portal-bracket")), 16744494));
  Table localTable2 = new Table();
  this.i = new TextButton("REMOTE PORTAL VIEW", (TextButton.TextButtonStyle)paramSkin.get("remote-portal", TextButton.TextButtonStyle.class));
  this.i.setTouchable(Touchable.disabled);
  localTable2.add(this.i).n().j().k();
  this.h.stack(new Actor[] { localTable1, localTable2 }).n().f();
  return this.h;
}
项目:Chemtris    文件:ButtonLoader.java   
public static TextButtonStyle makeBoxStyle(){
    //make text button style
    TextButtonStyle style = new TextButtonStyle();
    //setup button textures
    style.up = skinOne.getDrawable("box");
    style.down = skinOne.getDrawable("boxpress");
    style.over = skinOne.getDrawable("boxpress");
    //setup font color
    style.fontColor = Color.WHITE;
    style.downFontColor = Color.GRAY;
    style.overFontColor = Color.GRAY;

    return style;
}
项目:Chemtris    文件:ButtonLoader.java   
public static TextButtonStyle makeCircleStyle(){
    //make circle style
    TextButtonStyle style = new TextButtonStyle();
    style.up = skinOne.getDrawable("circle");
    style.down = skinOne.getDrawable("cp");
    style.over = skinOne.getDrawable("cp");
    //setup font color
    style.fontColor = Color.WHITE;
    style.downFontColor = Color.GRAY;
    style.overFontColor = Color.GRAY;

    return style;
}
项目:Chemtris    文件:ButtonLoader.java   
public static TextButton makePlay(){
    //get button style
    TextButtonStyle style = makeBoxStyle();
    //set button font
    style.font = FontLoader.font(1.5f);
    //make button
    TextButton play = new TextButton("Play", style);
    //set button size and position
    play.setHeight(Gdx.graphics.getHeight()/4.5f);
    play.setWidth(Gdx.graphics.getWidth()/4.5f);
    play.setPosition(Gdx.graphics.getWidth()/2-play.getWidth()/2,
            Gdx.graphics.getHeight()/2-Gdx.graphics.getHeight()/8);
    //return button
    return play;
}
项目:Chemtris    文件:ButtonLoader.java   
public static TextButton levelss(){
    TextButtonStyle box = makeBoxStyle();
    box.font = FontLoader.font(.8f);

    TextButton levels = new TextButton("Levels",box);
    levels.setWidth(Gdx.graphics.getWidth()/7);
    levels.setHeight(Gdx.graphics.getHeight()/8);
    levels.setPosition(Gdx.graphics.getWidth()/2 + Gdx.graphics.getWidth()/10, Gdx.graphics.getHeight()/4);

    return levels;
}
项目:lets-code-game    文件:Styles.java   
public void styleSkin(Skin skin, TextureAtlas atlas) {
    BitmapFont font = new BitmapFont(Gdx.files.internal("data/lucida-console-21.fnt"), false);
    skin.add("default", font);

    skin.add("lt-blue", new Color(.6f, .8f, 1f, 1f));
    skin.add("lt-green", new Color(.6f, .9f, .6f, 1f));
    skin.add("dark-blue", new Color(.1f, .3f, 1f, 1f));
    skin.add("button-text", Color.valueOf("DDFF35FF"));

    NinePatchDrawable btn1up = new NinePatchDrawable(atlas.createPatch("patchThick"));
    NinePatchDrawable btn1down = new NinePatchDrawable(atlas.createPatch("patchThickDown"));
    NinePatch window1patch = atlas.createPatch("window1");
    skin.add("btn1up", btn1up);
    skin.add("btn1down", btn1down);
    skin.add("window1", window1patch);
    skin.add("white-pixel", atlas.findRegion("white-pixel"), TextureRegion.class);

    LabelStyle lbs = new LabelStyle();
    lbs.font = font;
    lbs.fontColor = Color.WHITE;
    skin.add("default", lbs);

    TextButtonStyle tbs = new TextButtonStyle(btn1up, btn1down, btn1down, font);
    tbs.fontColor = skin.getColor("button-text");
    tbs.pressedOffsetX = Math.round(1f * Gdx.graphics.getDensity());
    tbs.pressedOffsetY = tbs.pressedOffsetX * -1f;
    skin.add("default", tbs);
}