Merge #21 (new themes, update gradle)
26
android/assets/themes/darcula.theme
Normal file
|
@ -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"
|
||||||
|
}
|
26
android/assets/themes/solarized-dark.theme
Normal file
|
@ -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"
|
||||||
|
}
|
26
android/assets/themes/solarized-light.theme
Normal file
|
@ -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"
|
||||||
|
}
|
|
@ -2,3 +2,6 @@ default
|
||||||
dark
|
dark
|
||||||
bandw
|
bandw
|
||||||
underwater
|
underwater
|
||||||
|
solarized-dark
|
||||||
|
solarized-light
|
||||||
|
darcula
|
||||||
|
|
BIN
android/assets/ui/cells/circle.png
Normal file
After Width: | Height: | Size: 1.3 KiB |
BIN
android/assets/ui/x0.75/cells/circle.png
Normal file
After Width: | Height: | Size: 1.3 KiB |
BIN
android/assets/ui/x1.0/cells/circle.png
Normal file
After Width: | Height: | Size: 2.3 KiB |
BIN
android/assets/ui/x1.25/cells/circle.png
Normal file
After Width: | Height: | Size: 2.8 KiB |
BIN
android/assets/ui/x1.5/cells/circle.png
Normal file
After Width: | Height: | Size: 3.7 KiB |
BIN
android/assets/ui/x2.0/cells/circle.png
Normal file
After Width: | Height: | Size: 4.9 KiB |
BIN
android/assets/ui/x4.0/cells/circle.png
Normal file
After Width: | Height: | Size: 12 KiB |
|
@ -4,7 +4,6 @@ import android.os.Bundle;
|
||||||
|
|
||||||
import com.badlogic.gdx.backends.android.AndroidApplication;
|
import com.badlogic.gdx.backends.android.AndroidApplication;
|
||||||
import com.badlogic.gdx.backends.android.AndroidApplicationConfiguration;
|
import com.badlogic.gdx.backends.android.AndroidApplicationConfiguration;
|
||||||
import io.github.lonamiwebs.klooni.Klooni;
|
|
||||||
|
|
||||||
public class AndroidLauncher extends AndroidApplication {
|
public class AndroidLauncher extends AndroidApplication {
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -64,11 +64,6 @@ public class Klooni extends Game {
|
||||||
|
|
||||||
//region Screen
|
//region Screen
|
||||||
|
|
||||||
@Override
|
|
||||||
public void render() {
|
|
||||||
super.render();
|
|
||||||
}
|
|
||||||
|
|
||||||
// TransitionScreen will also dispose by default the previous screen
|
// TransitionScreen will also dispose by default the previous screen
|
||||||
public void transitionTo(Screen screen) {
|
public void transitionTo(Screen screen) {
|
||||||
transitionTo(screen, true);
|
transitionTo(screen, true);
|
||||||
|
|
|
@ -25,7 +25,7 @@ public class Theme {
|
||||||
|
|
||||||
public Color background;
|
public Color background;
|
||||||
public Color foreground;
|
public Color foreground;
|
||||||
public Color emptyCell;
|
private Color emptyCell;
|
||||||
|
|
||||||
public Color currentScore;
|
public Color currentScore;
|
||||||
public Color highScore;
|
public Color highScore;
|
||||||
|
@ -34,7 +34,6 @@ public class Theme {
|
||||||
public Color textColor;
|
public Color textColor;
|
||||||
|
|
||||||
private Color[] cells;
|
private Color[] cells;
|
||||||
private Color[] buttons;
|
|
||||||
|
|
||||||
public static Skin skin;
|
public static Skin skin;
|
||||||
|
|
||||||
|
@ -126,7 +125,7 @@ public class Theme {
|
||||||
foreground = new Color((int)Long.parseLong(colors.getString("foreground"), 16));
|
foreground = new Color((int)Long.parseLong(colors.getString("foreground"), 16));
|
||||||
|
|
||||||
JsonValue buttonColors = colors.get("buttons");
|
JsonValue buttonColors = colors.get("buttons");
|
||||||
buttons = new Color[buttonColors.size];
|
Color[] buttons = new Color[buttonColors.size];
|
||||||
for (int i = 0; i < buttons.length; ++i) {
|
for (int i = 0; i < buttons.length; ++i) {
|
||||||
buttons[i] = new Color((int)Long.parseLong(buttonColors.getString(i), 16));
|
buttons[i] = new Color((int)Long.parseLong(buttonColors.getString(i), 16));
|
||||||
if (buttonStyles[i] == null) {
|
if (buttonStyles[i] == null) {
|
||||||
|
|
|
@ -18,7 +18,7 @@ public abstract class BaseScorer implements BinSerializable {
|
||||||
|
|
||||||
//region Members
|
//region Members
|
||||||
|
|
||||||
protected int currentScore;
|
int currentScore;
|
||||||
|
|
||||||
final Label currentScoreLabel;
|
final Label currentScoreLabel;
|
||||||
final Label highScoreLabel;
|
final Label highScoreLabel;
|
||||||
|
|
|
@ -223,7 +223,7 @@ public class PieceHolder implements BinSerializable {
|
||||||
Gdx.input.getX(),
|
Gdx.input.getX(),
|
||||||
Gdx.graphics.getHeight() - Gdx.input.getY()); // Y axis is inverted
|
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
|
// Center the piece to the mouse
|
||||||
mouse.sub(piece.getRectangle().width * 0.5f, piece.getRectangle().height * 0.5f);
|
mouse.sub(piece.getRectangle().width * 0.5f, piece.getRectangle().height * 0.5f);
|
||||||
} else {
|
} else {
|
||||||
|
|