tetris: ctrl+L for refresh

pull/426/head
nick black 4 years ago
parent 752c29e648
commit ae792bbd5c
No known key found for this signature in database
GPG Key ID: 5F43400C21CBFACC

@ -31,7 +31,7 @@ void DrawBoard() {
}
channels_set_fg_alpha(&channels, CELL_ALPHA_TRANSPARENT);
board_->set_base(channels, 0, "");
scoreplane_ = std::make_unique<ncpp::Plane>(2, 20, y - BOARD_HEIGHT, 2, nullptr);
scoreplane_ = std::make_unique<ncpp::Plane>(2, 30, y - BOARD_HEIGHT, 2, nullptr);
if(!scoreplane_){
throw TetrisNotcursesErr("Plane()");
}

@ -107,6 +107,7 @@ int main(void) {
case NCKEY_LEFT: case 'h': t.MoveLeft(); break;
case NCKEY_RIGHT: case 'l': t.MoveRight(); break;
case NCKEY_DOWN: case 'j': t.MoveDown(); break;
case 'L': if(ni.ctrl){ notcurses_refresh(nc); } break;
case 'z': t.RotateCcw(); break;
case 'x': t.RotateCw(); break;
default:

Loading…
Cancel
Save