Merge branch 'master' of https://github.com/LonamiWebs/Klooni1010
# Conflicts: # gradle/wrapper/gradle-wrapper.properties Also added Solarized Dark theme.
BIN
android/assets/share.png
Normal file
After Width: | Height: | Size: 134 KiB |
26
android/assets/themes/bandw.theme
Normal file
|
@ -0,0 +1,26 @@
|
|||
{
|
||||
"name": "Black et White",
|
||||
"price": 20,
|
||||
"colors": {
|
||||
"background": "0a0a0aff",
|
||||
"foreground": "202020ff",
|
||||
"buttons": [
|
||||
"f0f0f0ff",
|
||||
"f0f0f0ff",
|
||||
"f0f0f0ff",
|
||||
"f0f0f0ff"
|
||||
],
|
||||
"empty_cell": "000000ff",
|
||||
"cells": [
|
||||
"f2f2f2ff", "f2f2f2ff", "f2f2f2ff",
|
||||
"f2f2f2ff", "f2f2f2ff", "f2f2f2ff", "f2f2f2ff",
|
||||
"f2f2f2ff", "f2f2f2ff"
|
||||
],
|
||||
"current_score": "b3b3b3ff",
|
||||
"high_score": "f9f9f9ff",
|
||||
"bonus": "f9f9f9ff",
|
||||
"band": "f0f0f0ff",
|
||||
"text": "0a0a0aff"
|
||||
},
|
||||
"cell_texture": "basic.png"
|
||||
}
|
|
@ -3,6 +3,7 @@
|
|||
"price": 0,
|
||||
"colors": {
|
||||
"background": "333333ff",
|
||||
"foreground": "ddddddff",
|
||||
"buttons": [
|
||||
"03c13dff",
|
||||
"007da4ff",
|
||||
|
@ -18,7 +19,8 @@
|
|||
"current_score": "c83737ff",
|
||||
"high_score": "d400aaff",
|
||||
"bonus": "e3e3e3ff",
|
||||
"band": "2b5ccfff"
|
||||
"band": "2b5ccfff",
|
||||
"text": "ffffffff"
|
||||
},
|
||||
"cell_texture": "basic.png"
|
||||
}
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
"price": 0,
|
||||
"colors": {
|
||||
"background": "ffffffff",
|
||||
"foreground": "ffffffff",
|
||||
"buttons": [
|
||||
"00ff33ff",
|
||||
"ffd700ff",
|
||||
|
@ -18,7 +19,8 @@
|
|||
"current_score": "ffcc00ff",
|
||||
"high_score": "65d681ff",
|
||||
"bonus": "4d4d4dff",
|
||||
"band": "87ceebff"
|
||||
"band": "87ceebff",
|
||||
"text": "111111ff"
|
||||
},
|
||||
"cell_texture": "basic.png"
|
||||
}
|
||||
|
|
26
android/assets/themes/solarized-dark.theme
Normal file
|
@ -0,0 +1,26 @@
|
|||
{
|
||||
"name": "Underwater",
|
||||
"price": 50,
|
||||
"colors": {
|
||||
"background": "0044aaff",
|
||||
"foreground": "d7f4e3ff",
|
||||
"buttons": [
|
||||
"37c871ff",
|
||||
"2a7fffff",
|
||||
"00ccffff",
|
||||
"5f5fd3ff"
|
||||
],
|
||||
"empty_cell": "0066ffff",
|
||||
"cells": [
|
||||
"37c871ff", "2ad4ffff", "0000d4ff",
|
||||
"00ffccff", "5599ffff", "87cddeff", "80b3ffff",
|
||||
"00ff66ff", "00d4aaff"
|
||||
],
|
||||
"current_score": "aaccffff",
|
||||
"high_score": "2aff80ff",
|
||||
"bonus": "aaeeffff",
|
||||
"band": "3771c8ff",
|
||||
"text": "002255ff"
|
||||
},
|
||||
"cell_texture": "bubble.png"
|
||||
}
|
|
@ -1,2 +1,4 @@
|
|||
default
|
||||
dark
|
||||
bandw
|
||||
underwater
|
||||
|
|
26
android/assets/themes/underwater.theme
Normal file
|
@ -0,0 +1,26 @@
|
|||
{
|
||||
"name": "Underwater",
|
||||
"price": 50,
|
||||
"colors": {
|
||||
"background": "0044aaff",
|
||||
"foreground": "d7f4e3ff",
|
||||
"buttons": [
|
||||
"37c871ff",
|
||||
"2a7fffff",
|
||||
"00ccffff",
|
||||
"5f5fd3ff"
|
||||
],
|
||||
"empty_cell": "0066ffff",
|
||||
"cells": [
|
||||
"37c871ff", "2ad4ffff", "0000d4ff",
|
||||
"00ffccff", "5599ffff", "87cddeff", "80b3ffff",
|
||||
"00ff66ff", "00d4aaff"
|
||||
],
|
||||
"current_score": "aaccffff",
|
||||
"high_score": "2aff80ff",
|
||||
"bonus": "aaeeffff",
|
||||
"band": "3771c8ff",
|
||||
"text": "002255ff"
|
||||
},
|
||||
"cell_texture": "bubble.png"
|
||||
}
|
Before Width: | Height: | Size: 210 B After Width: | Height: | Size: 337 B |
BIN
android/assets/ui/cells/bubble.png
Normal file
After Width: | Height: | Size: 823 B |
BIN
android/assets/ui/cells/circle.png
Normal file
After Width: | Height: | Size: 1.3 KiB |
BIN
android/assets/ui/x0.75/cells/basic.png
Normal file
After Width: | Height: | Size: 337 B |
BIN
android/assets/ui/x0.75/cells/bubble.png
Normal file
After Width: | Height: | Size: 823 B |
BIN
android/assets/ui/x0.75/cells/circle.png
Normal file
After Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 1.1 KiB |
BIN
android/assets/ui/x1.0/cells/basic.png
Normal file
After Width: | Height: | Size: 421 B |
BIN
android/assets/ui/x1.0/cells/bubble.png
Normal file
After Width: | Height: | Size: 1.1 KiB |
BIN
android/assets/ui/x1.0/cells/circle.png
Normal file
After Width: | Height: | Size: 2.3 KiB |
BIN
android/assets/ui/x1.0/cells/round.png
Normal file
After Width: | Height: | Size: 302 B |
Before Width: | Height: | Size: 1.9 KiB After Width: | Height: | Size: 1.5 KiB |
BIN
android/assets/ui/x1.25/cells/basic.png
Normal file
After Width: | Height: | Size: 505 B |
BIN
android/assets/ui/x1.25/cells/bubble.png
Normal file
After Width: | Height: | Size: 1.4 KiB |
BIN
android/assets/ui/x1.25/cells/circle.png
Normal file
After Width: | Height: | Size: 2.8 KiB |
BIN
android/assets/ui/x1.25/cells/round.png
Normal file
After Width: | Height: | Size: 380 B |
Before Width: | Height: | Size: 2.4 KiB After Width: | Height: | Size: 2 KiB |
BIN
android/assets/ui/x1.5/cells/basic.png
Normal file
After Width: | Height: | Size: 655 B |
BIN
android/assets/ui/x1.5/cells/bubble.png
Normal file
After Width: | Height: | Size: 1.6 KiB |
BIN
android/assets/ui/x1.5/cells/circle.png
Normal file
After Width: | Height: | Size: 3.7 KiB |
BIN
android/assets/ui/x1.5/cells/round.png
Normal file
After Width: | Height: | Size: 422 B |
Before Width: | Height: | Size: 2.9 KiB After Width: | Height: | Size: 2.5 KiB |
BIN
android/assets/ui/x2.0/cells/basic.png
Normal file
After Width: | Height: | Size: 779 B |
BIN
android/assets/ui/x2.0/cells/bubble.png
Normal file
After Width: | Height: | Size: 2.1 KiB |
BIN
android/assets/ui/x2.0/cells/circle.png
Normal file
After Width: | Height: | Size: 4.9 KiB |
BIN
android/assets/ui/x2.0/cells/round.png
Normal file
After Width: | Height: | Size: 491 B |
Before Width: | Height: | Size: 3.9 KiB After Width: | Height: | Size: 3.5 KiB |
BIN
android/assets/ui/x4.0/cells/basic.png
Normal file
After Width: | Height: | Size: 1.5 KiB |
BIN
android/assets/ui/x4.0/cells/bubble.png
Normal file
After Width: | Height: | Size: 4.7 KiB |
BIN
android/assets/ui/x4.0/cells/circle.png
Normal file
After Width: | Height: | Size: 12 KiB |
BIN
android/assets/ui/x4.0/cells/round.png
Normal file
After Width: | Height: | Size: 1 KiB |
Before Width: | Height: | Size: 8.1 KiB After Width: | Height: | Size: 7.5 KiB |
|
@ -22,8 +22,8 @@ android {
|
|||
minSdkVersion 8
|
||||
targetSdkVersion 25
|
||||
|
||||
versionCode 400
|
||||
versionName "0.4"
|
||||
versionCode 500
|
||||
versionName "0.5"
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -6,10 +6,11 @@ import com.badlogic.gdx.backends.android.AndroidApplication;
|
|||
import com.badlogic.gdx.backends.android.AndroidApplicationConfiguration;
|
||||
|
||||
public class AndroidLauncher extends AndroidApplication {
|
||||
@Override
|
||||
protected void onCreate (Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
AndroidApplicationConfiguration config = new AndroidApplicationConfiguration();
|
||||
initialize(new Klooni(), config);
|
||||
}
|
||||
@Override
|
||||
protected void onCreate (Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
final AndroidApplicationConfiguration config = new AndroidApplicationConfiguration();
|
||||
final AndroidShareChallenge shareChallenge = new AndroidShareChallenge(this);
|
||||
initialize(new Klooni(shareChallenge), config);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,51 @@
|
|||
package io.github.lonamiwebs.klooni;
|
||||
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.net.Uri;
|
||||
import android.os.Handler;
|
||||
import android.widget.Toast;
|
||||
|
||||
import java.io.File;
|
||||
|
||||
class AndroidShareChallenge extends ShareChallenge {
|
||||
|
||||
private final Handler handler;
|
||||
private final Context context;
|
||||
|
||||
AndroidShareChallenge(final Context context) {
|
||||
handler = new Handler();
|
||||
this.context = context;
|
||||
}
|
||||
|
||||
@Override
|
||||
File getShareImageFilePath() {
|
||||
return new File(context.getExternalCacheDir(), "share_challenge.png");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void shareScreenshot(final boolean ok) {
|
||||
handler.post(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
if (!ok) {
|
||||
Toast.makeText(context, "Failed to create the file", Toast.LENGTH_SHORT).show();
|
||||
return;
|
||||
}
|
||||
|
||||
final String text = "Check out my score at 1010 Klooni!";
|
||||
final Uri pictureUri = Uri.fromFile(getShareImageFilePath());
|
||||
final Intent shareIntent = new Intent();
|
||||
shareIntent.setAction(Intent.ACTION_SEND);
|
||||
shareIntent.setType("image/png");
|
||||
|
||||
shareIntent.putExtra(android.content.Intent.EXTRA_SUBJECT, "");
|
||||
shareIntent.putExtra(Intent.EXTRA_TEXT, text);
|
||||
shareIntent.putExtra(Intent.EXTRA_STREAM, pictureUri);
|
||||
|
||||
context.startActivity(Intent.createChooser(shareIntent, "Challenge your friends..."));
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|