menu placeholder

This commit is contained in:
Administrator
2014-02-20 17:04:40 +01:00
parent 2d8dc8022e
commit 9a00f4e61a
3 changed files with 18 additions and 0 deletions
+1
View File
@@ -111,6 +111,7 @@ public class CanvasView extends View
} }
case GameStateInterface.GS_GAMEOVER: case GameStateInterface.GS_GAMEOVER:
{ {
Gamemenu.SetGameState(Foreground.GetGameState(), true);
Foreground = Gamemenu; Foreground = Gamemenu;
break; break;
} }
+16
View File
@@ -34,6 +34,12 @@ public class GameMenu extends GameStateInterface
ShowPauseMenu(canvas); ShowPauseMenu(canvas);
break; break;
} }
case GS_GAMEOVER:
{
ShowGameOverMenu(canvas);
SetGameState(GS_MENU_READY, false);
break;
}
} }
} }
@@ -83,6 +89,11 @@ public class GameMenu extends GameStateInterface
canvasView.postInvalidate(); canvasView.postInvalidate();
break; break;
} }
case GS_GAMEOVER:
{
canvasView.postInvalidate();
break;
}
} }
if (!isPostBack) if (!isPostBack)
@@ -168,6 +179,11 @@ public class GameMenu extends GameStateInterface
Rect(canvas, 0f, 160f, 0f, 90f, Color.RED); Rect(canvas, 0f, 160f, 0f, 90f, Color.RED);
} }
private void ShowGameOverMenu(Canvas canvas)
{
Rect(canvas, 0f, 160f, 0f, 90f, Color.parseColor("lime"));
}
// other logic // other logic
private void Rect(Canvas canvas, float Top, float Bottom, float Left, float Right, int Color) private void Rect(Canvas canvas, float Top, float Bottom, float Left, float Right, int Color)
{ {
+1
View File
@@ -1361,6 +1361,7 @@ public class GamePlay extends GameStateInterface
{ {
mp.start(); mp.start();
SetGameState(GS_PLAYING, false); SetGameState(GS_PLAYING, false);
canvasView.postInvalidate();
} }
private void InputsGamePlaying(float x, float y, boolean Released) private void InputsGamePlaying(float x, float y, boolean Released)