Show a shutdown button upon death (closes #23), update to v0.6.1
BIN
android/assets/ui/x0.75/power_off.png
Normal file
After Width: | Height: | Size: 1.2 KiB |
BIN
android/assets/ui/x1.0/power_off.png
Normal file
After Width: | Height: | Size: 1.6 KiB |
BIN
android/assets/ui/x1.25/power_off.png
Normal file
After Width: | Height: | Size: 2 KiB |
BIN
android/assets/ui/x1.5/power_off.png
Normal file
After Width: | Height: | Size: 2.4 KiB |
BIN
android/assets/ui/x2.0/power_off.png
Normal file
After Width: | Height: | Size: 3.3 KiB |
BIN
android/assets/ui/x4.0/power_off.png
Normal file
After Width: | Height: | Size: 7.2 KiB |
|
@ -22,8 +22,8 @@ android {
|
||||||
minSdkVersion 8
|
minSdkVersion 8
|
||||||
targetSdkVersion 25
|
targetSdkVersion 25
|
||||||
|
|
||||||
versionCode 600
|
versionCode 610
|
||||||
versionName "0.6"
|
versionName "0.6.1"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -16,7 +16,7 @@ allprojects {
|
||||||
apply plugin: "eclipse"
|
apply plugin: "eclipse"
|
||||||
apply plugin: "idea"
|
apply plugin: "idea"
|
||||||
|
|
||||||
version = '0.6'
|
version = '0.6.1'
|
||||||
ext {
|
ext {
|
||||||
appName = "1010! Klooni"
|
appName = "1010! Klooni"
|
||||||
gdxVersion = '1.9.5'
|
gdxVersion = '1.9.5'
|
||||||
|
|
|
@ -28,7 +28,7 @@ public class SkinLoader {
|
||||||
private static String[] ids = {
|
private static String[] ids = {
|
||||||
"play", "play_saved", "star", "stopwatch", "palette", "home", "replay",
|
"play", "play_saved", "star", "stopwatch", "palette", "home", "replay",
|
||||||
"share", "sound_on", "sound_off", "snap_on", "snap_off", "issues", "credits",
|
"share", "sound_on", "sound_off", "snap_on", "snap_off", "issues", "credits",
|
||||||
"web", "back", "ok", "cancel"
|
"web", "back", "ok", "cancel", "power_off"
|
||||||
};
|
};
|
||||||
|
|
||||||
private static float bestMultiplier;
|
private static float bestMultiplier;
|
||||||
|
|
|
@ -53,6 +53,7 @@ class PauseMenuStage extends Stage {
|
||||||
private final Band band;
|
private final Band band;
|
||||||
private final BaseScorer scorer;
|
private final BaseScorer scorer;
|
||||||
private final SoftButton playButton;
|
private final SoftButton playButton;
|
||||||
|
private final SoftButton customButton; // Customize & "Shut down"
|
||||||
|
|
||||||
//endregion
|
//endregion
|
||||||
|
|
||||||
|
@ -98,22 +99,14 @@ class PauseMenuStage extends Stage {
|
||||||
|
|
||||||
table.row();
|
table.row();
|
||||||
|
|
||||||
// Palette button (buy colors)
|
// Palette button OR shutdown game (if game over)
|
||||||
final SoftButton paletteButton = new SoftButton(1, "palette_texture");
|
customButton = new SoftButton(1, "palette_texture");
|
||||||
table.add(paletteButton).space(16);
|
table.add(customButton).space(16);
|
||||||
|
customButton.addListener(customChangeListener);
|
||||||
paletteButton.addListener(new ChangeListener() {
|
|
||||||
@Override
|
|
||||||
public void changed(ChangeEvent event, Actor actor) {
|
|
||||||
// Don't dispose because then it needs to take us to the previous screen
|
|
||||||
game.transitionTo(new CustomizeScreen(game, game.getScreen()), false);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
// Continue playing OR share (if game over) button
|
// Continue playing OR share (if game over) button
|
||||||
playButton = new SoftButton(2, "play_texture");
|
playButton = new SoftButton(2, "play_texture");
|
||||||
table.add(playButton).space(16);
|
table.add(playButton).space(16);
|
||||||
|
|
||||||
playButton.addListener(playChangeListener);
|
playButton.addListener(playChangeListener);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -139,6 +132,14 @@ class PauseMenuStage extends Stage {
|
||||||
scorer.resume();
|
scorer.resume();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private final ChangeListener customChangeListener = new ChangeListener() {
|
||||||
|
@Override
|
||||||
|
public void changed(ChangeEvent event, Actor actor) {
|
||||||
|
// Don't dispose because then it needs to take us to the previous screen
|
||||||
|
game.transitionTo(new CustomizeScreen(game, game.getScreen()), false);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
private final ChangeListener playChangeListener = new ChangeListener() {
|
private final ChangeListener playChangeListener = new ChangeListener() {
|
||||||
@Override
|
@Override
|
||||||
public void changed(ChangeEvent event, Actor actor) {
|
public void changed(ChangeEvent event, Actor actor) {
|
||||||
|
@ -166,13 +167,22 @@ class PauseMenuStage extends Stage {
|
||||||
}
|
}
|
||||||
|
|
||||||
void showGameOver(final String gameOverReason, final boolean timeMode) {
|
void showGameOver(final String gameOverReason, final boolean timeMode) {
|
||||||
|
// Allow the players to exit the game (issue #23)
|
||||||
|
customButton.removeListener(customChangeListener);
|
||||||
|
customButton.updateImage("power_off_texture");
|
||||||
|
customButton.addListener(new ChangeListener() {
|
||||||
|
@Override
|
||||||
|
public void changed(ChangeEvent event, Actor actor) {
|
||||||
|
Gdx.app.exit();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
if (game.shareChallenge != null) {
|
if (game.shareChallenge != null) {
|
||||||
playButton.removeListener(playChangeListener);
|
playButton.removeListener(playChangeListener);
|
||||||
playButton.updateImage("share_texture");
|
playButton.updateImage("share_texture");
|
||||||
playButton.addListener(new ChangeListener() {
|
playButton.addListener(new ChangeListener() {
|
||||||
public void changed(ChangeEvent event, Actor actor) {
|
public void changed(ChangeEvent event, Actor actor) {
|
||||||
// Don't dispose because then it needs to take us to the previous screen
|
// Don't dispose because then it needs to take us to the previous screen
|
||||||
|
|
||||||
game.transitionTo(new ShareScoreScreen(
|
game.transitionTo(new ShareScoreScreen(
|
||||||
game, game.getScreen(), scorer.getCurrentScore(), timeMode), false);
|
game, game.getScreen(), scorer.getCurrentScore(), timeMode), false);
|
||||||
}
|
}
|
||||||
|
|
|
@ -15,7 +15,7 @@
|
||||||
viewBox="0 0 500.00001 500.00001"
|
viewBox="0 0 500.00001 500.00001"
|
||||||
id="svg2"
|
id="svg2"
|
||||||
version="1.1"
|
version="1.1"
|
||||||
inkscape:version="0.92.1 r15371"
|
inkscape:version="0.92.1 r"
|
||||||
sodipodi:docname="buttons.svg">
|
sodipodi:docname="buttons.svg">
|
||||||
<defs
|
<defs
|
||||||
id="defs4">
|
id="defs4">
|
||||||
|
@ -125,14 +125,14 @@
|
||||||
borderopacity="1"
|
borderopacity="1"
|
||||||
inkscape:pageopacity="0"
|
inkscape:pageopacity="0"
|
||||||
inkscape:pageshadow="2"
|
inkscape:pageshadow="2"
|
||||||
inkscape:zoom="4.6421393"
|
inkscape:zoom="0.82062205"
|
||||||
inkscape:cx="162.81422"
|
inkscape:cx="328.41208"
|
||||||
inkscape:cy="251.69867"
|
inkscape:cy="62.530961"
|
||||||
inkscape:document-units="px"
|
inkscape:document-units="px"
|
||||||
inkscape:current-layer="layer1"
|
inkscape:current-layer="layer1"
|
||||||
showgrid="false"
|
showgrid="false"
|
||||||
inkscape:window-width="1366"
|
inkscape:window-width="1366"
|
||||||
inkscape:window-height="742"
|
inkscape:window-height="739"
|
||||||
inkscape:window-x="0"
|
inkscape:window-x="0"
|
||||||
inkscape:window-y="0"
|
inkscape:window-y="0"
|
||||||
inkscape:window-maximized="1"
|
inkscape:window-maximized="1"
|
||||||
|
@ -1133,5 +1133,27 @@
|
||||||
style="opacity:1;fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:1.1729759;stroke-linecap:square;stroke-linejoin:bevel;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
style="opacity:1;fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:1.1729759;stroke-linecap:square;stroke-linejoin:bevel;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||||
inkscape:connector-curvature="0" />
|
inkscape:connector-curvature="0" />
|
||||||
</g>
|
</g>
|
||||||
|
<g
|
||||||
|
id="power_off">
|
||||||
|
<rect
|
||||||
|
y="848.36218"
|
||||||
|
x="-1.7763568e-15"
|
||||||
|
height="64.000313"
|
||||||
|
width="64.000313"
|
||||||
|
id="rect4660"
|
||||||
|
style="fill:none;fill-opacity:1;stroke:none;stroke-width:2.16577601;stroke-opacity:1" />
|
||||||
|
<path
|
||||||
|
sodipodi:nodetypes="ssssssssssss"
|
||||||
|
inkscape:connector-curvature="0"
|
||||||
|
id="path4662"
|
||||||
|
d="m 45.036191,857.69924 c 5.203104,-3.79965 9.388151,4.33734 11.779635,8.22107 5.165057,8.38797 5.975717,19.35861 0.89549,28.1922 -5.366639,9.33161 -15.15808,16.39433 -26.245535,15.66611 C 18.331227,908.91594 5.6536704,899.49369 3.3341588,886.10284 1.6199931,876.20673 4.6666459,866.10771 11.962852,858.7082 c 5.148946,-5.22185 9.55443,0.629 5.270728,5.67046 -3.365214,3.9605 -6.611104,7.9085 -7.177727,13.23675 -1.1402987,10.72284 5.741703,21.44966 16.073318,24.33824 11.932388,3.33614 25.142774,-5.26317 27.283423,-17.41893 1.239676,-7.03955 -2.535275,-14.29484 -6.245168,-19.54582 -1.440336,-2.03865 -4.832856,-5.31676 -2.131235,-7.28966 z"
|
||||||
|
style="fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:0.93750006px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
|
||||||
|
<path
|
||||||
|
sodipodi:nodetypes="sssssssssss"
|
||||||
|
inkscape:connector-curvature="0"
|
||||||
|
id="path4664"
|
||||||
|
d="m 28.96558,851.96616 c 0.835392,-0.69063 1.986545,-1.09077 3.070271,-1.07103 1.047321,0.0191 2.170527,0.41835 2.927466,1.14243 0.977909,0.93545 1.646441,2.3596 1.642238,3.71288 l -0.0714,22.99133 c -0.0026,0.83573 -0.291448,1.74078 -0.85682,2.35626 -0.958108,1.04302 -2.439879,1.8216 -3.855688,1.78503 -1.479356,-0.0382 -3.055098,-0.87499 -3.927089,-2.07064 -0.484195,-0.66392 -0.425936,-1.60594 -0.428411,-2.42766 l -0.0714,-23.70534 c -0.0031,-1.04505 0.765383,-2.04738 1.570833,-2.71326 z"
|
||||||
|
style="fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:0.93750006px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
|
||||||
|
</g>
|
||||||
</g>
|
</g>
|
||||||
</svg>
|
</svg>
|
||||||
|
|
Before Width: | Height: | Size: 73 KiB After Width: | Height: | Size: 75 KiB |
|
@ -25,6 +25,7 @@ ids = [
|
||||||
'palette',
|
'palette',
|
||||||
'play',
|
'play',
|
||||||
'play_saved',
|
'play_saved',
|
||||||
|
'power_off',
|
||||||
'replay',
|
'replay',
|
||||||
'share',
|
'share',
|
||||||
'snap_off',
|
'snap_off',
|
||||||
|
|