bugfixes and design changes

This commit is contained in:
Baipyrus 2022-11-07 13:27:02 +01:00
parent 2cf5332c50
commit 687d555a49

View File

@ -53,10 +53,10 @@ namespace RPI_Matrix {
canvas.DrawText(font, 0, 24, col, " ) SnakeGame");
canvas.DrawText(font, 0, 32, col, " ) FlappyBird");
canvas.DrawText(font, 0, 40, col, " ) Tetris");
canvas.DrawText(font, 0, 48, col, " ) Debug");
canvas.DrawText(font, 0, 56, col, " ) Debug");
canvas.DrawText(font, 0, 64, col, " ) Beenden");
// Cursor is a '#' at (0, 24 + i * 8) where i may be [0, 1, 2, 3, 5]
int nx = selectionIndex + ((selectionIndex == 4) ? 1 : 0);
int nx = selectionIndex + ((selectionIndex >= 3) ? 1 : 0);
canvas.DrawText(font, 0, 24 + nx * 8, col, "#");
canvas = matrix.SwapOnVsync(canvas);
@ -141,12 +141,11 @@ namespace RPI_Matrix {
while (debugMenu) {
// Display Games and Cursor on Matrix
canvas.Clear();
canvas.DrawText(font, 0, 8, col, "Einstellung:");
canvas.DrawText(font, 0, 24, col, $" ) PTB Logo {(Tetris.Tetris.ptbLogo ? "I" : "O")}");
canvas.DrawText(font, 0, 40, col, " ) Zurück");
canvas.DrawText(font, 0, 8, col, $" ) PTB Logo {(Tetris.Tetris.ptbLogo ? "I" : "O")}");
canvas.DrawText(font, 0, 24, col, " ) Zurück");
// Cursor is a '#' at (0, 24 + i * 8) where i may be [0, 2]
int nx = debugIndex + ((debugIndex == 1) ? 1 : 0);
canvas.DrawText(font, 0, 24 + nx * 8, col, "#");
canvas.DrawText(font, 0, 8 + nx * 8, col, "#");
canvas = matrix.SwapOnVsync(canvas);
// Handle key presses for selecting a game
@ -184,7 +183,8 @@ namespace RPI_Matrix {
}
// Wait for next frame and keep count
Thread.Sleep(100);
if (debugMenu)
Thread.Sleep(100);
}
}
@ -267,16 +267,14 @@ namespace RPI_Matrix {
case "01-00-01-04":
// Code for L-Button Press
// If in Tetris, rotate the current Block counter-Clockwise
if (isTetris) {
if (isTetris)
Tetris.Tetris.rotateCounterClockwise();
}
break;
case "01-00-01-05":
// Code for R-Button Press
// If in Tetris, rotate the current Block Clockwise
if (isTetris) {
if (isTetris)
Tetris.Tetris.rotateClockwise();
}
break;
case "01-00-01-09":
// Code for Start-Button Press