diff --git a/android/assets/themes/darcula.theme b/android/assets/themes/darcula.theme new file mode 100644 index 0000000..14bc988 --- /dev/null +++ b/android/assets/themes/darcula.theme @@ -0,0 +1,26 @@ +{ + "name": "Darcula", + "price": 0, + "colors": { + "background": "282a36ff", + "foreground": "f8f8f2ff", + "buttons": [ + "8be9fdff", + "ff5555ff", + "ff79c6ff", + "ffb86cf" + ], + "empty_cell": "44475aff", + "cells": [ + "f8f8f2ff", "6272a4ff", "8be9fdff", + "50fa7bff", "ffb86cff", "ff79c6ff", "bd93f9ff", + "ff5555ff", "f1fa8cff" + ], + "current_score": "8be9fdff", + "high_score": "50fa7bff", + "bonus": "bd93f9ff", + "band": "6272a4ff", + "text": "f8f8f2ff" + }, + "cell_texture": "basic.png" +} diff --git a/android/assets/themes/solarized-dark.theme b/android/assets/themes/solarized-dark.theme new file mode 100644 index 0000000..7658374 --- /dev/null +++ b/android/assets/themes/solarized-dark.theme @@ -0,0 +1,26 @@ +{ + "name": "Solarized Dark", + "price": 0, + "colors": { + "background": "002b36ff", + "foreground": "fdf6e3ff", + "buttons": [ + "859900ff", + "268bd2ff", + "d33682ff", + "cb4b16ff" + ], + "empty_cell": "073642ff", + "cells": [ + "657b83ff", "b58900ff", "cb4b16ff", + "dc322fff", "d33682ff", "6c71c4ff", "268bd2ff", + "2aa198ff", "859900ff" + ], + "current_score": "586e75ff", + "high_score": "eee8d5ff", + "bonus": "586e75ff", + "band": "2aa198ff", + "text": "fdf6e3ff" + }, + "cell_texture": "circle.png" +} diff --git a/android/assets/themes/solarized-light.theme b/android/assets/themes/solarized-light.theme new file mode 100644 index 0000000..ba85582 --- /dev/null +++ b/android/assets/themes/solarized-light.theme @@ -0,0 +1,26 @@ +{ + "name": "Solarized Light", + "price": 0, + "colors": { + "background": "fdf6e3ff", + "foreground": "eee8d5ff", + "buttons": [ + "859900ff", + "268bd2ff", + "d33682ff", + "cb4b16ff" + ], + "empty_cell": "eee8d5ff", + "cells": [ + "657b83ff", "b58900ff", "cb4b16ff", + "dc322fff", "d33682ff", "6c71c4ff", "268bd2ff", + "2aa198ff", "859900ff" + ], + "current_score": "586e75ff", + "high_score": "657b83ff", + "bonus": "586e75ff", + "band": "b58900ff", + "text": "fdf6e3ff" + }, + "cell_texture": "circle.png" +} diff --git a/android/assets/themes/theme.list b/android/assets/themes/theme.list index 8ffea23..987fd3c 100644 --- a/android/assets/themes/theme.list +++ b/android/assets/themes/theme.list @@ -2,3 +2,6 @@ default dark bandw underwater +solarized-dark +solarized-light +darcula diff --git a/android/assets/ui/cells/circle.png b/android/assets/ui/cells/circle.png new file mode 100644 index 0000000..875ba9e Binary files /dev/null and b/android/assets/ui/cells/circle.png differ diff --git a/android/assets/ui/x0.75/cells/circle.png b/android/assets/ui/x0.75/cells/circle.png new file mode 100644 index 0000000..875ba9e Binary files /dev/null and b/android/assets/ui/x0.75/cells/circle.png differ diff --git a/android/assets/ui/x1.0/cells/circle.png b/android/assets/ui/x1.0/cells/circle.png new file mode 100644 index 0000000..0cae43c Binary files /dev/null and b/android/assets/ui/x1.0/cells/circle.png differ diff --git a/android/assets/ui/x1.25/cells/circle.png b/android/assets/ui/x1.25/cells/circle.png new file mode 100644 index 0000000..5668eef Binary files /dev/null and b/android/assets/ui/x1.25/cells/circle.png differ diff --git a/android/assets/ui/x1.5/cells/circle.png b/android/assets/ui/x1.5/cells/circle.png new file mode 100644 index 0000000..0cc02e4 Binary files /dev/null and b/android/assets/ui/x1.5/cells/circle.png differ diff --git a/android/assets/ui/x2.0/cells/circle.png b/android/assets/ui/x2.0/cells/circle.png new file mode 100644 index 0000000..e6cfb7a Binary files /dev/null and b/android/assets/ui/x2.0/cells/circle.png differ diff --git a/android/assets/ui/x4.0/cells/circle.png b/android/assets/ui/x4.0/cells/circle.png new file mode 100644 index 0000000..1660443 Binary files /dev/null and b/android/assets/ui/x4.0/cells/circle.png differ diff --git a/android/src/io/github/lonamiwebs/klooni/AndroidLauncher.java b/android/src/io/github/lonamiwebs/klooni/AndroidLauncher.java index 96b3c6a..7ebc7b9 100644 --- a/android/src/io/github/lonamiwebs/klooni/AndroidLauncher.java +++ b/android/src/io/github/lonamiwebs/klooni/AndroidLauncher.java @@ -4,7 +4,6 @@ import android.os.Bundle; import com.badlogic.gdx.backends.android.AndroidApplication; import com.badlogic.gdx.backends.android.AndroidApplicationConfiguration; -import io.github.lonamiwebs.klooni.Klooni; public class AndroidLauncher extends AndroidApplication { @Override diff --git a/core/src/io/github/lonamiwebs/klooni/Klooni.java b/core/src/io/github/lonamiwebs/klooni/Klooni.java index b60e7d2..62563cd 100644 --- a/core/src/io/github/lonamiwebs/klooni/Klooni.java +++ b/core/src/io/github/lonamiwebs/klooni/Klooni.java @@ -63,12 +63,7 @@ public class Klooni extends Game { //endregion //region Screen - - @Override - public void render() { - super.render(); - } - + // TransitionScreen will also dispose by default the previous screen public void transitionTo(Screen screen) { transitionTo(screen, true); diff --git a/core/src/io/github/lonamiwebs/klooni/Theme.java b/core/src/io/github/lonamiwebs/klooni/Theme.java index d366851..f15a83f 100644 --- a/core/src/io/github/lonamiwebs/klooni/Theme.java +++ b/core/src/io/github/lonamiwebs/klooni/Theme.java @@ -25,7 +25,7 @@ public class Theme { public Color background; public Color foreground; - public Color emptyCell; + private Color emptyCell; public Color currentScore; public Color highScore; @@ -34,7 +34,6 @@ public class Theme { public Color textColor; private Color[] cells; - private Color[] buttons; public static Skin skin; @@ -126,7 +125,7 @@ public class Theme { foreground = new Color((int)Long.parseLong(colors.getString("foreground"), 16)); JsonValue buttonColors = colors.get("buttons"); - buttons = new Color[buttonColors.size]; + Color[] buttons = new Color[buttonColors.size]; for (int i = 0; i < buttons.length; ++i) { buttons[i] = new Color((int)Long.parseLong(buttonColors.getString(i), 16)); if (buttonStyles[i] == null) { diff --git a/core/src/io/github/lonamiwebs/klooni/game/BaseScorer.java b/core/src/io/github/lonamiwebs/klooni/game/BaseScorer.java index c5017a6..8e5213c 100644 --- a/core/src/io/github/lonamiwebs/klooni/game/BaseScorer.java +++ b/core/src/io/github/lonamiwebs/klooni/game/BaseScorer.java @@ -18,7 +18,7 @@ public abstract class BaseScorer implements BinSerializable { //region Members - protected int currentScore; + int currentScore; final Label currentScoreLabel; final Label highScoreLabel; diff --git a/core/src/io/github/lonamiwebs/klooni/game/PieceHolder.java b/core/src/io/github/lonamiwebs/klooni/game/PieceHolder.java index 6b614f3..49d7705 100644 --- a/core/src/io/github/lonamiwebs/klooni/game/PieceHolder.java +++ b/core/src/io/github/lonamiwebs/klooni/game/PieceHolder.java @@ -223,7 +223,7 @@ public class PieceHolder implements BinSerializable { Gdx.input.getX(), Gdx.graphics.getHeight() - Gdx.input.getY()); // Y axis is inverted - if (Klooni.onDesktop) { + if (Klooni.onDesktop) { //FIXME(oliver): This is a bad assumption to make. There are desktops with touch input and non-desktops with mouse input. // Center the piece to the mouse mouse.sub(piece.getRectangle().width * 0.5f, piece.getRectangle().height * 0.5f); } else {