Defined colors for item backgrounds

This commit is contained in:
Collin Smith 2019-03-03 23:57:28 -08:00
parent 32d1761e77
commit 4f6966b900
3 changed files with 11 additions and 12 deletions

View File

@ -34,6 +34,11 @@ public class Colors {
public Color modal50 = new Color(0, 0, 0, 0.50f);
public Color modal75 = new Color(0, 0, 0, 0.75f);
public Color invBlue = new Color(0.1f, 0.1f, 0.5f, 0.3f);
public Color invGreen = new Color(0.1f, 0.5f, 0.1f, 0.3f);
public Color invRed = new Color(0.5f, 0.1f, 0.1f, 0.3f);
public Color invWhite = new Color(0.5f, 0.5f, 0.5f, 0.3f);
public Colors() {}
public void load() {

View File

@ -81,10 +81,8 @@ public class InventoryPanel extends WidgetGroup implements Disposable {
fill = new Texture(solidColorPixmap);
solidColorPixmap.dispose();
backgroundColorG = Color.GREEN.cpy();
backgroundColorG.a = 0.25f;
backgroundColorR = Color.RED.cpy();
backgroundColorR.a = 0.25f;
backgroundColorR = Diablo.colors.invRed;
backgroundColorG = Diablo.colors.invGreen;
btnExit = new Button(new Button.ButtonStyle() {{
Diablo.assets.load(buysellbtnDescriptor);

View File

@ -69,14 +69,10 @@ public class ItemGrid extends Group {
fill = new Texture(solidColorPixmap);
solidColorPixmap.dispose();
backgroundColorR = Color.RED.cpy();
backgroundColorR.a = 0.20f;
backgroundColorG = Color.GREEN.cpy();
backgroundColorG.a = 0.20f;
backgroundColorB = Color.BLUE.cpy();
backgroundColorB.a = 0.20f;
backgroundColorW = Color.WHITE.cpy();
backgroundColorW.a = 0.20f;
backgroundColorR = Diablo.colors.invRed;
backgroundColorG = Diablo.colors.invGreen;
backgroundColorB = Diablo.colors.invBlue;
backgroundColorW = Diablo.colors.invWhite;
setTouchable(Touchable.enabled);
setSize(width * boxWidth, height * boxHeight);