ronrihoo / libGDX-Table-Background-Color

An arbitrary solution for setting the background color of libGDX Tables.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

libGDX-Table-Background-Color

An arbitrary solution for setting the background color of libGDX Tables.

Example Usage

BackgroundColor backgroundColor = new BackgroundColor("white_color_texture.png");
backgroundColor.setColor(2, 179, 228, 255); // r, g, b, a
table.setBackground(backgroundColor);

Where table is an instance of a libGDX Table, com.badlogic.gdx.scenes.scene2d.ui.Table, and "white_color_texture.png" is an arbitrary name of a PNG file located in the project's root resource directory, which is /android/assets/ by default.

Purpose of this Repository

This repo is used for the following solution:

https://stackoverflow.com/questions/39081993/libgdx-scene2d-set-background-color-of-table/46084724#46084724

-and is a back-up to:

http://www.snip2code.com/Snippet/2615417

Contribution

Feel free to make pull requests. The purpose of this repository is to help others. There are no emotions attached here.

About

An arbitrary solution for setting the background color of libGDX Tables.


Languages

Language:Java 100.0%