Free (CC0) UI elements to be used in your LibGdx games

Description

Here are some UI elements you can use for your apps / games

They are in atlas format for use with LibGdx

capture_2014-05-05_14-30-22_0673

They are based on Kenney.nl work, I’ve reworked them to remove anti-aliasing (make them more “pixel art” looking), add some new elements (new buttons, windows,…) and make them compatible with LibGdx UI (widget format, nine patch,…)

capture_2014-05-05_14-59-44_0328capture_2014-05-05_17-37-30_

License

These elements are licensed CC0, it means you can do anything you want  with them (use them in commercial projects, sell them, make derivations,…) without giving attribution or anything.

But I would strongly suggest you to credit Kenney.nl for his awesome work, and you can also credit me if you feel like it (www.microbasic.net or twitter @Haedri)

Download

This pack is WIP, it can be updated at any time (on this webpage)

Current version (2014-05-05):

  • 6 buttons styles
  • 3 window styles
  • Sliders, scrollbars, text input, combo box, check box,…
  • Multiple icons
  • 7 color themes

Download it here

 

ui-green

Notes

White theme

The white theme is to be used in conjunction with other themes, a white button inside a white window will not render well.

Usage

Just load the atlas

        TextureAtlas atlas = new TextureAtlas(Gdx.files.internal("ui-blue.atlas"));

And use the drawable

Alternatively you can use skin to ease the process, for example:

            final CheckBoxStyle t = new CheckBoxStyle();
            t.font = mySkin.getFont("default");
            t.fontColor =new Color(0, 0, 0, 1f);
            t.disabledFontColor = new Color(0, 0, 0, 0.4f);
            t.checkboxOff = mySkin.getDrawable( "checkbox_off");
            t.checkboxOn = mySkin.getDrawable( "checkbox_on");
            mySkin.add("default", t);

I have some specific functions to load skin theme on the fly and that allow mixing themes very easily, I might publish them later, stay tuned.

New color themes

Adding a new color theme is just a matter of switching 4 colors in the PNG file and renaming files accordingly.

If you have changed colors feel free to contact me (@haedri) so that I can update the pack.

Comments are closed.