Example usage for com.badlogic.gdx Version VERSION

List of usage examples for com.badlogic.gdx Version VERSION

Introduction

In this page you can find the example usage for com.badlogic.gdx Version VERSION.

Prototype

String VERSION

To view the source code for com.badlogic.gdx Version VERSION.

Click Source Link

Document

the current version of libgdx as a String in the major.minor.revision format

Usage

From source file:com.kotcrab.vis.editor.ui.dialog.AboutDialog.java

License:Apache License

public AboutDialog() {
    super("About");

    setModal(true);/*from   ww w . j  a v  a  2s.  com*/
    addCloseButton();
    closeOnEscape();
    TableUtils.setSpacingDefaults(this);

    VisTable contentTable = new VisTable(false);
    contentTable.defaults().expand().left();

    contentTable.add(new VisLabel(
            "VisEditor - game level editor\nCopyright 2014-2016 Pawe Pastuszak\nLicensed under Apache2 license"))
            .spaceBottom(8).row();
    contentTable.add(new VisLabel("Farseer Physics Engine - polygon decomposition algorithms")).spaceBottom(8)
            .row();
    contentTable.add(new VisLabel(
            "Thanks to all contributors and supporters,\nand thanks to you for using this software. <3",
            Align.center)).center().row();

    VisTextButton okButton;
    VisTextButton openAppDirectoryButton;

    add(contentTable).pad(3).colspan(3).expand().fill().row();
    VisLabel versionLabel = new VisLabel("Hover here to see\nlibraries versions", Align.center);
    new Tooltip.Builder("VisEditor " + App.VERSION + " \nBuild " + App.getBuildTimestamp() + "\nVisUI "
            + VisUI.VERSION + "\nLibGDX " + Version.VERSION, Align.left).target(versionLabel).build();
    add(versionLabel).expandX().fillX();
    add(openAppDirectoryButton = new VisTextButton("Open App Data Folder"));
    add(okButton = new VisTextButton("OK")).right();

    openAppDirectoryButton.addListener(new VisChangeListener(
            (event, actor) -> FileUtils.browse(FileUtils.toFileHandle(App.APP_FOLDER_PATH))));
    okButton.addListener(new VisChangeListener((event, actor) -> fadeOut()));
    pack();
    centerWindow();
}

From source file:com.kotcrab.vis.ui.VisUI.java

License:Apache License

private static void checkBeforeLoad() {
    if (skin != null)
        throw new GdxRuntimeException("VisUI cannot be loaded twice");
    if (skipGdxVersionCheck == false && Version.VERSION.equals(TARGET_GDX_VERSION) == false) {
        Gdx.app.log("VisUI",
                "Warning, using invalid libGDX version for VisUI " + VERSION + ".\n" + "You are using libGDX "
                        + Version.VERSION + " but you need " + TARGET_GDX_VERSION + ". This may cause "
                        + "unexpected problems and runtime exceptions.");
    }/*  w ww .  j  a v a2  s  .c o  m*/
}

From source file:org.brian.blueirisviewer.ui.AboutWnd.java

License:Open Source License

@Override
public void onCreate(Skin skin, Window window, Table table) {
    window.setTitle("About BlueIrisView");

    Table scrollTable = new Table(skin);
    scrollTable.columnDefaults(0).align(Align.left);
    scrollTable.pad(10, 10, 10, 30);// w w w  .ja va2 s  .c  o  m

    ScrollPane scrollPane = new ScrollPane(scrollTable, skin);
    scrollPane.setFadeScrollBars(false);
    scrollPane.setScrollingDisabled(true, false);
    table.add(scrollPane).colspan(2).align(Align.center);
    table.row();

    scrollTable.add("BlueIrisView Version 2.8.1");
    scrollTable.row();

    scrollTable.add().height(10);
    scrollTable.row();

    scrollTable.add("by Brian Pearce - 2018");
    scrollTable.row();

    scrollTable.add().height(20);
    scrollTable.row();

    scrollTable.add("Powered by libGDX " + Version.VERSION);
    scrollTable.row();

    scrollTable.add().height(10);
    scrollTable.row();

    texLibGDXImage = new Texture(Gdx.files.internal("data/libgdx_about.png"));
    Image imgLibGDX = new Image(texLibGDXImage);
    scrollTable.add(imgLibGDX);
    scrollTable.row();

    scrollTable.add().height(20);
    scrollTable.row();

    scrollTable.add(
            "BlueIrisView uses the XStream library for settings serialization.\n\nXStream's license follows:");
    scrollTable.row();

    scrollTable.add().height(10);
    scrollTable.row();

    Label lblXStreamLicense = new Label(xStreamLicense, skin);
    scrollTable.add(lblXStreamLicense);
    scrollTable.row();

    scrollTable.add().height(20);
    scrollTable.row();

    scrollTable.add(new Label("-----------------------------------", skin));
    scrollTable.row();

    scrollTable.add().height(10);
    scrollTable.row();

    scrollTable.add(
            "BlueIrisView uses the json-simple library.\n\njson-simple is licensed with Apache License, Version 2.0 ");
    scrollTable.row();

    scrollTable.add().height(5);
    scrollTable.row();

    scrollTable.add(new Label("http://www.apache.org/licenses/LICENSE-2.0", skin));
    scrollTable.row();

    scrollTable.add().height(10);
    scrollTable.row();

    scrollTable.add().height(20);
    scrollTable.row();

    scrollTable.add(new Label("-----------------------------------", skin));
    scrollTable.row();

    scrollTable.add().height(10);
    scrollTable.row();

    scrollTable.add(new Label(
            "BlueIrisView optionally uses the libjpeg-turbo library to reduce CPU usage on Windows.", skin));
    scrollTable.row();
    scrollTable.add().height(5);
    scrollTable.row();
    scrollTable
            .add(new Label("this software is based in part on the work of the Independent JPEG Group", skin));
    scrollTable.row();
    scrollTable.add().height(5);
    scrollTable.row();
    scrollTable.add(new Label(
            "Redistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions are met:\n\n- Redistributions of source code must retain the above copyright notice,\n  this list of conditions and the following disclaimer.\n- Redistributions in binary form must reproduce the above copyright notice,\n  this list of conditions and the following disclaimer in the documentation\n  and/or other materials provided with the distribution.\n- Neither the name of the libjpeg-turbo Project nor the names of its\n  contributors may be used to endorse or promote products derived from this\n  software without specific prior written permission.\n\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\",\nAND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\nIMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\nARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE\nLIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\nCONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\nSUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\nINTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\nCONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\nARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\nPOSSIBILITY OF SUCH DAMAGE.",
            skin));
    scrollTable.row();

    scrollTable.add().height(10);
    scrollTable.row();

    final CheckBox cbSaveErrorLogToDisk = new CheckBox("  Log Errors To Disk", skin);
    cbSaveErrorLogToDisk.setChecked(BlueIrisViewer.bivSettings.logErrorsToDisk);
    cbSaveErrorLogToDisk.addListener(new ChangeListener() {
        @Override
        public void changed(ChangeEvent event, Actor actor) {
            if (BlueIrisViewer.bivSettings.logErrorsToDisk)
                Logger.debug("Disabling File Logging", AboutWnd.this);
            BlueIrisViewer.bivSettings.logErrorsToDisk = cbSaveErrorLogToDisk.isChecked();
            BlueIrisViewer.bivSettings.Save();
            if (BlueIrisViewer.bivSettings.logErrorsToDisk)
                Logger.debug("Enabled File Logging", AboutWnd.this);
        }
    });
    table.add(cbSaveErrorLogToDisk).align(Align.left);

    final TextButton btnClose = new TextButton("Close", skin);
    btnClose.addListener(new ChangeListener() {
        @Override
        public void changed(ChangeEvent event, Actor actor) {
            hide();
        }
    });
    table.add(btnClose).align(Align.right);
    table.row();
}