Example usage for com.badlogic.gdx.scenes.scene2d.ui ScrollPane setFadeScrollBars

List of usage examples for com.badlogic.gdx.scenes.scene2d.ui ScrollPane setFadeScrollBars

Introduction

In this page you can find the example usage for com.badlogic.gdx.scenes.scene2d.ui ScrollPane setFadeScrollBars.

Prototype

public void setFadeScrollBars(boolean fadeScrollBars) 

Source Link

Document

When true the scrollbars don't reduce the scrollable size and fade out after some time of not being used.

Usage

From source file:com.peppercarrot.runninggame.stages.CreditsTable.java

public CreditsTable() {
    super();// w  w  w.j a v  a 2 s  . com

    Table content = new Table(Assets.I.skin);
    ScrollPane scroll = new ScrollPane(content, Assets.I.skin);
    scroll.setScrollingDisabled(true, false);
    scroll.setFadeScrollBars(false);

    top();
    padTop(30);
    padBottom(60);
    int paddingScrollPane = 10;
    content.padLeft(paddingScrollPane);
    content.padRight(paddingScrollPane);
    Texture texture;
    texture = new Texture(Gdx.files.internal("logo_original_webcomic.png"), true);
    texture.setFilter(TextureFilter.MipMapLinearNearest, TextureFilter.Nearest);
    Image originalLogo = new Image(texture);
    texture = new Texture(Gdx.files.internal("Pepper_And_Carrot_Running_Game.png"), true);
    texture.setFilter(TextureFilter.MipMapLinearNearest, TextureFilter.Nearest);
    Image gameLogo = new Image(texture);

    Label label1 = new Label(
            "This game is open-source and a derivative of universe of the webcomic"
                    + " Pepper&Carrot created by David Revoy and licensed under CC-BY 4.0",
            Assets.I.skin, "default");
    label1.setWrap(true);
    /*
    Label label2 = new Label("Visit original Pepper&Carrot website. (Link in this Version is deactivated)", Assets.I.skin, "default");
    label2.setWrap(true);
    */
    TextButton webComicLink = new TextButton("Visit original" + '\n' + "Pepper&Carrot" + '\n' + "website",
            Assets.I.skin);
    webComicLink.addListener(new ClickListener() {
        public void clicked(InputEvent event, float x, float y) {
            Gdx.net.openURI("http://www.peppercarrot.com/");
            event.cancel();
        }
    });

    TextButton gitHubLink = new TextButton("This game" + '\n' + "can be found" + '\n' + "on GitHub",
            Assets.I.skin);
    gitHubLink.addListener(new ClickListener() {
        public void clicked(InputEvent event, float x, float y) {
            Gdx.net.openURI("https://github.com/WinterLicht/PepperAndCarrotRunningGame");
            event.cancel();
        }
    });
    /*
    Label label3 = new Label("This game is open source and can be found on GitHub. (Link in this Version is deactivated)", Assets.I.skin, "default");
    label3.setWrap(true);
    */
    content.add(label1).width(700).colspan(2);
    content.row();
    content.add(webComicLink).width(280).padTop(30).left();
    content.add(originalLogo).width(originalLogo.getWidth()).padTop(30).right();
    content.row();
    content.add(gitHubLink).width(280).padTop(30).left();
    content.add(gameLogo).width(gameLogo.getWidth()).padTop(30).right();
    content.row();

    add(scroll);
}

From source file:com.ray3k.libraryinvaders.states.MenuState.java

License:Open Source License

private void showCharacterDialog() {
    Dialog dialog = new Dialog("", skin);

    Label label = new Label("Choose a character...", skin);
    dialog.getContentTable().add(label);

    dialog.getContentTable().row();/*  ww w  .j  av a  2s.  c  o  m*/
    Table table = new Table();
    ScrollPane scrollPane = new ScrollPane(table, skin);
    scrollPane.setFadeScrollBars(false);
    dialog.getContentTable().add(scrollPane).grow();

    final ButtonGroup<ImageTextButton> buttons = new ButtonGroup<ImageTextButton>();
    for (String name : getCore().getImagePacks().get(DATA_PATH + "/characters")) {
        Drawable drawable = new TextureRegionDrawable(getCore().getAtlas().findRegion(name));
        Image image = new Image(drawable);
        ImageTextButton imageTextButton = new ImageTextButton(name, skin, "list");
        imageTextButton.getImageCell().setActor(image);
        imageTextButton.getLabelCell().left().expandX();
        table.add(imageTextButton).growX();
        buttons.add(imageTextButton);

        table.row();
    }

    dialog.getContentTable().row();
    TextButton textButton = new TextButton("OK", skin);
    dialog.getContentTable().add(textButton);

    textButton.addListener(new ChangeListener() {
        @Override
        public void changed(ChangeListener.ChangeEvent event, Actor actor) {
            getCore().getAssetManager().get(Core.DATA_PATH + "/sfx/menu.wav", Sound.class).play();
            ((GameState) getCore().getStateManager().getState("game"))
                    .setSelectedCharacter(buttons.getChecked().getText().toString());

            Gdx.input.setInputProcessor(null);
            Action changeStateAction = new Action() {
                @Override
                public boolean act(float delta) {
                    getCore().getStateManager().loadState("game");
                    return true;
                }
            };
            root.addAction(new SequenceAction(new DelayAction(.5f), changeStateAction));
        }
    });

    dialog.show(stage);
    dialog.setSize(600.0f, 500.0f);
    dialog.setPosition(stage.getWidth() / 2.0f, stage.getHeight() / 2.0f, Align.center);
    stage.setScrollFocus(scrollPane);
}

From source file:com.ray3k.skincomposer.RootTable.java

License:Open Source License

private void addPreview(Table top, InputListener scrollPaneListener) {
    Label label = new Label("Preview", getSkin(), "title");
    top.add(label);/*  w ww  .j  a va2s .co  m*/

    top.row();
    previewTable = new Table(getSkin());
    previewTable.setBackground("white");
    ScrollPane scrollPane = new ScrollPane(previewTable, getSkin());
    scrollPane.setFadeScrollBars(false);
    scrollPane.setFlickScroll(false);
    scrollPane.addListener(scrollPaneListener);
    top.add(scrollPane).grow().padTop(10.0f).padBottom(10.0f);

    refreshPreview();
}

From source file:com.ray3k.skincomposer.RootTable.java

License:Open Source License

private void addPreviewProperties(Table bottom, InputListener scrollPaneListener) {
    Label label = new Label("Preview Properties", getSkin(), "title");
    bottom.add(label);//from www .ja v  a2  s.c om

    bottom.row();
    previewPropertiesTable = new Table();
    previewPropertiesTable.defaults().pad(5.0f);

    ScrollPane scrollPane = new ScrollPane(previewPropertiesTable, getSkin());
    scrollPane.setFadeScrollBars(false);
    scrollPane.setFlickScroll(false);
    scrollPane.addListener(scrollPaneListener);
    bottom.add(scrollPane).grow().padTop(10.0f).padBottom(10.0f);

    refreshPreviewProperties();
}

From source file:de.longri.cachebox3.develop.tools.skin_editor.actors.OptionsPane.java

License:Apache License

/**
 *
 *//*from ww w .  j  a  v a  2s  .com*/
public OptionsPane(final SkinEditorGame game, PreviewPane previewPane) {
    super();

    //this.setDebug(true);

    this.game = game;
    this.previewPane = previewPane;

    left();
    top();
    setBackground(game.skin.getDrawable("default-pane"));

    styleLabelCell = add(new Label("Styles", game.skin, "title")).pad(5);
    styleLabelCell.row();
    styleLabelCellPrefHeight = styleLabelCell.getPrefHeight();
    listStyles = new List<String>(game.skin, "dimmed");
    listStyles.setItems(listItems);
    ScrollPane styleScrollPane = new ScrollPane(listStyles, game.skin);
    styleScrollPane.setFlickScroll(false);
    styleScrollPane.setFadeScrollBars(false);
    styleScrollPane.setScrollbarsOnTop(true);
    styleScrollPane.setScrollBarPositions(false, true);
    styleScrollPane.setScrollingDisabled(true, false);
    styleCell = add(styleScrollPane).height(200).expandX().fillX().pad(5);
    styleCell.row();

    // Add buttons
    Table tableStylesButtons = new Table();
    TextButton buttonNewStyle = new TextButton("New Style", game.skin);
    TextButton buttonDeleteStyle = new TextButton("Delete Style", game.skin);
    tableStylesButtons.add(buttonNewStyle).pad(5);
    tableStylesButtons.add(buttonDeleteStyle).pad(5);
    styleButtonCell = add(tableStylesButtons);
    styleButtonCell.row();
    styleButtonCellPrefHeight = styleButtonCell.getPrefHeight();

    // Callbacks
    listStyles.addListener(new ChangeListener() {

        @Override
        public void changed(ChangeEvent event, Actor actor) {

            String key = (String) listStyles.getSelected();
            if (key != null) {
                Gdx.app.log("OptionsPane", "Selected style: " + key);
                currentStyle = styles.get(key);
                updateTableFields(key);
            }
        }

    });

    buttonNewStyle.addListener(new ChangeListener() {

        @Override
        public void changed(ChangeEvent event, Actor actor) {
            createNewStyle();
        }

    });

    buttonDeleteStyle.addListener(new ChangeListener() {

        @Override
        public void changed(ChangeEvent event, Actor actor) {
            showDeleteDialog();
        }

    });

    // Initialize table

    add(new Label("Fields", game.skin, "title")).pad(5).padTop(10).row();

    tableFields = new Table(game.skin);
    tableFields.setBackground(game.skin.getDrawable("dialogDim"));
    tableFields.left().top();

    ScrollPane scroll2 = new ScrollPane(tableFields, game.skin);
    scroll2.setFlickScroll(false);
    scroll2.setFadeScrollBars(false);
    scroll2.setScrollbarsOnTop(true);
    scroll2.setScrollBarPositions(false, true);
    scroll2.setScrollingDisabled(true, false);
    add(scroll2).pad(5).expand().fill();

    this.layout();
}

From source file:de.longri.cachebox3.develop.tools.skin_editor.ColorPickerDialog.java

License:Apache License

/**
 *
 *///from ww w.  j  av a2s  .  co  m
public ColorPickerDialog(final SkinEditorGame game, final Field field) {

    super("Color Picker", game.skin);

    this.game = game;
    this.field = field;

    tableColors = new Table(game.skin);
    tableColors.left().top().pad(5);
    tableColors.defaults().pad(5);
    colors = game.skinProject.getAll(SkinColor.class);

    updateTable();

    TextButton buttonNewColor = new TextButton("New Color", game.skin);
    buttonNewColor.addListener(new ChangeListener() {

        @Override
        public void changed(ChangeEvent event, Actor actor) {

            // Need to steal focus first with this hack (Thanks to Z-Man)
            Frame frame = new Frame();
            frame.setUndecorated(true);
            frame.setOpacity(0);
            frame.setLocationRelativeTo(null);
            frame.setVisible(true);
            frame.toFront();
            frame.setVisible(false);
            frame.dispose();

            // Call swing color picker
            java.awt.Color color = JColorChooser.showDialog(null, "Pick your color", java.awt.Color.WHITE);
            if (color != null) {

                String colorName = JOptionPane.showInputDialog("Name your color");

                if ((colorName != null) && (colorName.isEmpty() == false)) {
                    // Verify if the color name is already in use
                    if (colors.containsKey(colorName) == true) {
                        game.showMsgDlg("Error", "Color name already in use!", game.screenMain.stage);
                    } else {
                        // Add the color (asuming RGBA)
                        float[] components = color.getComponents(null);
                        SkinColor newColor = new SkinColor(components[0], components[1], components[2],
                                components[3]);
                        newColor.skinName = colorName;
                        colors.put(colorName, newColor);
                        game.screenMain.saveToSkin();

                        // update table
                        updateTable();
                    }
                }
            }

        }

    });

    TextButton buttonNoColor = new TextButton("Empty Color", game.skin);
    buttonNoColor.addListener(new ChangeListener() {

        @Override
        public void changed(ChangeEvent event, Actor actor) {

            try {
                field.set(game.screenMain.paneOptions.currentStyle, null);
            } catch (Exception e) {
                e.printStackTrace();
            }

            game.screenMain.saveToSkin();

            hide();
            game.screenMain.panePreview.refresh();
            game.screenMain.paneOptions.updateSelectedTableFields();

        }

    });

    ScrollPane scrollPane = new ScrollPane(tableColors, game.skin);
    scrollPane.setFlickScroll(false);
    scrollPane.setFadeScrollBars(false);
    scrollPane.setScrollbarsOnTop(true);

    getContentTable().add(scrollPane).width(540).height(320).pad(20);
    getButtonTable().add(buttonNewColor);
    if (field != null) {
        getButtonTable().add(buttonNoColor);
    }
    getButtonTable().padBottom(15);
    button("Cancel", false);
    key(com.badlogic.gdx.Input.Keys.ESCAPE, false);

}

From source file:de.longri.cachebox3.develop.tools.skin_editor.FontPickerDialog.java

License:Apache License

/**
 * //from www.ja va2  s.c  o  m
 */
public FontPickerDialog(final SkinEditorGame game, Field field) {

    super("Bitmap Font Picker", game.skin);

    this.game = game;
    this.field = field;

    tableFonts = new Table(game.skin);
    tableFonts.left().top().pad(5);
    tableFonts.defaults().pad(5);

    fonts = game.skinProject.getAll(BitmapFont.class);

    updateTable();

    TextButton buttonNewFont = new TextButton("New Font", game.skin);
    buttonNewFont.addListener(new ChangeListener() {

        @Override
        public void changed(ChangeEvent event, Actor actor) {

            showNewFontDialog();

        }

    });

    ScrollPane scrollPane = new ScrollPane(tableFonts, game.skin);
    scrollPane.setFlickScroll(false);
    scrollPane.setFadeScrollBars(false);
    scrollPane.setScrollbarsOnTop(true);

    getContentTable().add(scrollPane).width(720).height(420).pad(20);
    getButtonTable().add(buttonNewFont);
    getButtonTable().padBottom(15);
    button("Cancel", false);
    key(com.badlogic.gdx.Input.Keys.ESCAPE, false);

}

From source file:it.alcacoop.backgammon.layers.DiceStatsScreen.java

License:Open Source License

public void initTable() {
    StatManager mgr = StatManager.getInstance();
    table.clear();/*from   ww w . j a va 2s. c o  m*/

    float w1 = stage.getWidth() * 0.30f;
    float w2 = stage.getWidth() * 0.13f;

    table.setWidth(stage.getWidth() * 0.9f);
    table.setHeight(stage.getHeight() * 0.9f);
    table.setX((stage.getWidth() - table.getWidth()) / 2);
    table.setY((stage.getHeight() - table.getHeight()) / 2);

    table.add(new Label("DICE STATISTICS", GnuBackgammon.skin));

    table.row();
    table.add().fill().expand().height(stage.getHeight() / 40);

    Table controls = new Table();
    if (GnuBackgammon.Instance.ss != 2)
        controls.setBackground(GnuBackgammon.skin.getDrawable("list"));
    controls.row();
    controls.add(new Label("SELECT LEVEL:", GnuBackgammon.skin)).fill();
    controls.add(sb).fill().padLeft(stage.getWidth() / 85);
    if (GnuBackgammon.Instance.ss != 2) {
        Label note = new Label("For less than 2000 rolls data have\n large variation from expected values",
                GnuBackgammon.skin);
        note.setAlignment(Align.right, Align.right);
        controls.add(note).expand().fill();
    }

    table.row();
    table.add(controls).left().fill().expand();

    Table data_table = new Table();
    data_table.row().width(w1 + 3 * w2);

    Table t0 = new Table();
    t0.add().expand().width(w1);
    Label l = new Label("YOU", GnuBackgammon.skin);
    l.setAlignment(0, 1);
    t0.add(l).uniform().center().width(w2);
    t0.add(new Label("CPU", GnuBackgammon.skin)).uniform().center();
    t0.add(new Label("EXPT", GnuBackgammon.skin)).uniform().center();
    data_table.add(t0).fill();

    data_table.row();
    data_table.add(new Label("GENERAL", GnuBackgammon.skin, "even")).left().padBottom(stage.getHeight() / 50);
    Table t1 = new Table();
    t1.setBackground(GnuBackgammon.skin.getDrawable("even"));
    for (int i = 0; i < 4; i++) {
        t1.row();
        t1.add().expand().width(w1 * 0.15f);
        t1.add(new Label(dataStrings[i][0], GnuBackgammon.skin)).expand().width(w1 * 0.85f);
        Label l1 = new Label(mgr.getRollStat(i, statLevel, 0), GnuBackgammon.skin);
        l1.setAlignment(0, 1);
        t1.add(l1).uniform().center().width(w2);
        t1.add(new Label(mgr.getRollStat(i, statLevel, 1), GnuBackgammon.skin)).uniform().center();
        t1.add(new Label(dataStrings[i][1], GnuBackgammon.skin)).uniform().center();
    }
    data_table.row();
    data_table.add(t1).colspan(4).fill();

    data_table.row().padTop(stage.getHeight() / 20);
    data_table.add(new Label("DOUBLE IN A ROW", GnuBackgammon.skin, "even")).left()
            .padBottom(stage.getHeight() / 50);
    Table t2 = new Table();
    t2.setBackground(GnuBackgammon.skin.getDrawable("even"));
    for (int i = 4; i < 8; i++) {
        t2.row();
        t2.add().expand().width(w1 * 0.15f);
        t2.add(new Label(dataStrings[i][0], GnuBackgammon.skin)).expand().width(w1 * 0.85f);
        Label l1 = new Label(mgr.getRollStat(i, statLevel, 0), GnuBackgammon.skin);
        l1.setAlignment(0, 1);
        t2.add(l1).uniform().center().width(w2);
        t2.add(new Label(mgr.getRollStat(i, statLevel, 1), GnuBackgammon.skin)).uniform().center();
        t2.add(new Label(dataStrings[i][1], GnuBackgammon.skin)).uniform().center();
    }
    data_table.row();
    data_table.add(t2).colspan(4).fill();

    data_table.row().padTop(stage.getHeight() / 20);
    data_table.add(new Label("ENTER AGAINST", GnuBackgammon.skin, "even")).left()
            .padBottom(stage.getHeight() / 50);
    Table t3 = new Table();
    t3.setBackground(GnuBackgammon.skin.getDrawable("even"));
    for (int i = 8; i < dataStrings.length; i++) {
        t3.row();
        t3.add().expand().width(w1 * 0.15f);
        t3.add(new Label(dataStrings[i][0], GnuBackgammon.skin)).expand().width(w1 * 0.85f);
        Label l1 = new Label(mgr.getRollStat(i, statLevel, 0), GnuBackgammon.skin);
        l1.setAlignment(0, 1);
        t3.add(l1).uniform().center().width(w2);
        t3.add(new Label(mgr.getRollStat(i, statLevel, 1), GnuBackgammon.skin)).uniform().center();
        t3.add(new Label(dataStrings[i][1], GnuBackgammon.skin)).uniform().center();
    }
    data_table.row();
    data_table.add(t3).colspan(4).fill();

    ScrollPane sp = new ScrollPane(data_table, GnuBackgammon.skin);
    sp.setFadeScrollBars(false);

    Table wrapper = new Table();
    wrapper.setBackground(GnuBackgammon.skin.getDrawable("list"));
    wrapper.add().expand().fill();
    wrapper.add(sp).expand().fill();
    wrapper.add().expand().fill();
    wrapper.addActor(resetBtn);
    resetBtn.setPosition(table.getWidth() - 1.8f * resetBtn.getWidth(), resetBtn.getHeight() / 2);

    table.row();
    table.add(wrapper).expand().fill();

    table.row();
    table.add().fill().expand().height(stage.getHeight() / 40);

    table.row();
    table.add(backBtn).width(stage.getWidth() / 4).fill().expand().height(stage.getHeight() / 8);
}

From source file:it.alcacoop.backgammon.ui.UIDialog.java

License:Open Source License

public static void getHelpDialog(Boolean cb) {
    Stage stage = GnuBackgammon.Instance.currentScreen.getStage();
    instance.visible = true;// w w w  .  ja  va 2  s . c o m
    instance.evt = Events.NOOP;
    instance.quitWindow = false;
    instance.leaveWindow = false;
    instance.optionsWindow = false;
    instance.dicesWindow = false;
    instance.remove();
    Label l = new Label(
            "GAME TYPE\n" + "You can choose two game type, and several options:\n"
                    + "Backgammon - usual starting position\n"
                    + "Nackgammon - Nack's starting position, attenuates lucky starting roll\n"
                    + "Doubling Cube: use or not the doubling cube, with or without Crawford rule\n\n"
                    + "START TURN\n" + "If cube isn't available, dices are rolled automatically,\n"
                    + "else you must click on 'Double' or 'Roll' button\n\n" + "MOVING MECHANIC\n"
                    + "You can choose two moves mechanic (Options->Move Logic):\n"
                    + "TAP - once you rolled dices, select the piece you would move.\n"
                    + "If legal moves for that piece are available, they will be shown.\n"
                    + "Click an available point and the piece will move there.\n"
                    + "AUTO - click on a piece and it moves automatically to destination point.\n"
                    + "Bigger dice is played first. You can change dice order clicking on dices\n\n"
                    + "You can cancel your moves in current hand just clicking the UNDO button\n"
                    + "in the game options menu popup.\n\n" + "END TURN\n"
                    + "When you finish your turn, click again the dices to take back them and change turn.\n",
            GnuBackgammon.skin);
    l.setWrap(true);

    ScrollPane sc = new ScrollPane(l, GnuBackgammon.skin);
    sc.setFadeScrollBars(false);
    sc.setOverscroll(false, false);

    float height = stage.getHeight() * 0.85f;
    float width = stage.getWidth() * 0.9f;

    instance.clear();
    instance.row().padTop(width / 25);
    instance.add(sc).colspan(3).expand().fill().align(Align.center).padTop(width / 25).padLeft(width / 35)
            .padRight(width / 35);

    instance.row().pad(width / 25);
    instance.add();
    instance.add(instance.bContinue).fill().expand().height(height * 0.15f).width(width / 4);
    instance.add();

    instance.setWidth(width);
    instance.setHeight(height);
    instance.setX((stage.getWidth() - width) / 2);
    instance.setY((stage.getHeight() - height) / 2);

    stage.addActor(instance);
    instance.setY(stage.getHeight());
    instance.addAction(
            Actions.sequence(
                    MyActions
                            .sequence(Actions.parallel(Actions.color(new Color(1, 1, 1, alpha), 0.2f),
                                    Actions.moveTo((stage.getWidth() - width) / 2,
                                            (stage.getHeight() - height) / 2, 0.2f))),
                    Actions.run(new Runnable() {
                        @Override
                        public void run() {
                            Gdx.graphics.setContinuousRendering(true);
                        }
                    })));
}

From source file:it.alcacoop.backgammon.ui.UIDialog.java

License:Open Source License

public static void getAboutDialog(Boolean cb) {
    Stage stage = GnuBackgammon.Instance.currentScreen.getStage();
    instance.visible = true;/*  w  w w  .  j  ava  2s  .  c o m*/
    instance.evt = Events.NOOP;
    instance.quitWindow = false;
    instance.leaveWindow = false;
    instance.optionsWindow = false;
    instance.dicesWindow = false;
    instance.remove();

    final String gnuBgLink = "http://www.gnubg.org";
    final String gplLink = "http://www.gnu.org/licenses/gpl.html";
    final String githubLink1 = "https://github.com/alcacoop/it.alcacoop.backgammon";
    final String githubLink2 = "https://github.com/alcacoop/libgnubg-android";
    final String wikipediaLink = "http://en.wikipedia.org/wiki/Backgammon#Rules";

    Table t = new Table();
    t.add(new Label("ABOUT BACKGAMMON MOBILE", GnuBackgammon.skin)).expand();
    t.row();
    t.add(new Label(" ", GnuBackgammon.skin)).fill().expand();
    t.row();
    t.add(new Label("Backgammon Mobile is based on GNUBackgammon (gnubg)", GnuBackgammon.skin));
    Label link1 = new Label(gnuBgLink, GnuBackgammon.skin);
    link1.addListener(new ClickListener() {
        public void clicked(InputEvent event, float x, float y) {
            GnuBackgammon.Instance.snd.playMoveStart();
            GnuBackgammon.Instance.nativeFunctions.openURL(gnuBgLink);
        };
    });
    t.row();
    t.add(link1);
    t.row();
    t.add(new Label(" ", GnuBackgammon.skin)).fill().expand();
    t.row();
    t.add(new Label("Its source code is released under a GPLv3 License", GnuBackgammon.skin));
    Label link2 = new Label(gplLink, GnuBackgammon.skin);
    link2.addListener(new ClickListener() {
        public void clicked(InputEvent event, float x, float y) {
            GnuBackgammon.Instance.snd.playMoveStart();
            GnuBackgammon.Instance.nativeFunctions.openURL(gplLink);
        };
    });
    t.row();
    t.add(link2);
    t.row();
    t.add(new Label(" ", GnuBackgammon.skin)).fill().expand();
    t.row();
    t.add(new Label("and is available on GitHub at:", GnuBackgammon.skin));
    Label link3 = new Label(githubLink1, GnuBackgammon.skin);
    link3.addListener(new ClickListener() {
        public void clicked(InputEvent event, float x, float y) {
            GnuBackgammon.Instance.snd.playMoveStart();
            GnuBackgammon.Instance.nativeFunctions.openURL(githubLink1);
        };
    });
    Label link4 = new Label(githubLink2, GnuBackgammon.skin);
    link4.addListener(new ClickListener() {
        public void clicked(InputEvent event, float x, float y) {
            GnuBackgammon.Instance.snd.playMoveStart();
            GnuBackgammon.Instance.nativeFunctions.openURL(githubLink2);
        };
    });
    t.row();
    t.add(link3);
    t.row();
    t.add(link4);
    t.row();
    t.add(new Label(" ", GnuBackgammon.skin)).fill().expand();
    t.row();
    t.add(new Label("You can find a detailed description of game rules on Wikipedia:", GnuBackgammon.skin));
    Label link5 = new Label(wikipediaLink, GnuBackgammon.skin);
    link5.addListener(new ClickListener() {
        public void clicked(InputEvent event, float x, float y) {
            GnuBackgammon.Instance.snd.playMoveStart();
            GnuBackgammon.Instance.nativeFunctions.openURL(wikipediaLink);
        };
    });
    t.row();
    t.add(link5);
    t.row();
    t.add(new Label(" ", GnuBackgammon.skin)).fill().expand();
    t.row();
    t.add(new Label("If you enjoy our game support us rating on the Play Store", GnuBackgammon.skin));
    t.row();
    t.add(new Label(" ", GnuBackgammon.skin)).fill().expand();
    t.row();
    t.add(new Label("Copyright 2012 - Alca Soc. Coop.", GnuBackgammon.skin));

    ScrollPane sc = new ScrollPane(t, GnuBackgammon.skin);
    sc.setFadeScrollBars(false);
    sc.setOverscroll(false, false);

    float height = stage.getHeight() * 0.85f;
    float width = stage.getWidth() * 0.95f;

    instance.clear();
    instance.row().padTop(width / 25);
    instance.add(sc).colspan(3).expand().fill().align(Align.center).padTop(width / 25).padLeft(width / 35)
            .padRight(width / 35);

    instance.row().pad(width / 25);
    instance.add();
    instance.add(instance.bContinue).fill().expand().height(height * 0.15f).width(width / 4);
    instance.add();

    instance.setWidth(width);
    instance.setHeight(height);
    instance.setX((stage.getWidth() - width) / 2);

    stage.addActor(instance);
    instance.setY(stage.getHeight());
    instance.addAction(
            Actions.sequence(
                    MyActions
                            .sequence(Actions.parallel(Actions.color(new Color(1, 1, 1, alpha), 0.2f),
                                    Actions.moveTo((stage.getWidth() - width) / 2,
                                            (stage.getHeight() - height) / 2, 0.2f))),
                    Actions.run(new Runnable() {
                        @Override
                        public void run() {
                            Gdx.graphics.setContinuousRendering(true);
                        }
                    })));
}