diff --git a/cockatrice/src/game.cpp b/cockatrice/src/game.cpp index 727005fa..f847981c 100644 --- a/cockatrice/src/game.cpp +++ b/cockatrice/src/game.cpp @@ -23,6 +23,8 @@ Game::Game(CardDatabase *_db, Client *_client, GameScene *_scene, QMenuBar *menu connect(aNextPhase, SIGNAL(triggered()), this, SLOT(actNextPhase())); aNextTurn = new QAction(this); connect(aNextTurn, SIGNAL(triggered()), this, SLOT(actNextTurn())); + aRemoveLocalArrows = new QAction(this); + connect(aRemoveLocalArrows, SIGNAL(triggered()), this, SLOT(actRemoveLocalArrows())); aTap = new QAction(this); aUntap = new QAction(this); aDoesntUntap = new QAction(this); @@ -39,6 +41,8 @@ Game::Game(CardDatabase *_db, Client *_client, GameScene *_scene, QMenuBar *menu gameMenu = menuBar->addMenu(QString()); gameMenu->addAction(aNextPhase); gameMenu->addAction(aNextTurn); + gameMenu->addSeparator(); + gameMenu->addAction(aRemoveLocalArrows); cardMenu = menuBar->addMenu(QString()); cardMenu->addAction(aTap); @@ -104,6 +108,8 @@ void Game::retranslateUi() aNextPhase->setShortcut(tr("Ctrl+Space")); aNextTurn->setText(tr("Next &turn")); aNextTurn->setShortcuts(QList() << QKeySequence(tr("Ctrl+Return")) << QKeySequence(tr("Ctrl+Enter"))); + aRemoveLocalArrows->setText(tr("&Remove all local arrows")); + aRemoveLocalArrows->setShortcut(tr("Ctrl+R")); cardMenu->setTitle(tr("C&ard")); aTap->setText(tr("&Tap")); @@ -419,6 +425,19 @@ void Game::actNextTurn() client->nextTurn(); } +void Game::actRemoveLocalArrows() +{ + for (int i = 0; i < players.size(); ++i) { + if (!players[i]->getLocal()) + continue; + QMapIterator arrowIterator(players[i]->getArrows()); + while (arrowIterator.hasNext()) { + ArrowItem *a = arrowIterator.next().value(); + players[i]->client->deleteArrow(a->getId()); + } + } +} + void Game::showCardMenu(QPoint p) { cardMenu->exec(p); diff --git a/cockatrice/src/game.h b/cockatrice/src/game.h index ced6a399..b385a0c9 100644 --- a/cockatrice/src/game.h +++ b/cockatrice/src/game.h @@ -28,7 +28,7 @@ private: QMenu *gameMenu, *cardMenu, *moveMenu; QAction *aTap, *aUntap, *aDoesntUntap, *aFlip, *aAddCounter, *aRemoveCounter, *aSetCounters, *aMoveToTopLibrary, *aMoveToBottomLibrary, *aMoveToGraveyard, *aMoveToExile, - *aNextPhase, *aNextTurn; + *aNextPhase, *aNextTurn, *aRemoveLocalArrows; DlgStartGame *dlgStartGame; CardDatabase *db; @@ -46,6 +46,7 @@ public slots: void actNextPhase(); void actNextTurn(); + void actRemoveLocalArrows(); private slots: void cardMenuAction(); diff --git a/cockatrice/translations/cockatrice_de.ts b/cockatrice/translations/cockatrice_de.ts index 9ac5ae1c..e22d3014 100644 --- a/cockatrice/translations/cockatrice_de.ts +++ b/cockatrice/translations/cockatrice_de.ts @@ -589,67 +589,77 @@ Ctrl+T - + &Game Spi&el - + Next &phase Nächste &Phase - + Ctrl+Space Ctrl+Space - + Next &turn Nächster &Zug - + Ctrl+Enter Ctrl+Enter - + Ctrl+Return Ctrl+Return - + + &Remove all local arrows + &Lokale Pfeile entfernen + + + + Ctrl+R + Ctrl+R + + + C&ard &Karte - + &top of library &auf die Bibliothek - + &bottom of library &unter die Bibliothek - + &graveyard in den &Friedhof - + Ctrl+Del Ctrl+Del - + &exile ins &Exil - + &Move to &Verschieben @@ -662,37 +672,37 @@ &Sagen - + &Tap &Tappen - + &Untap E&nttappen - + Toggle &normal untapping &Normales enttappen umschalten - + &Flip &Umdrehen - + &Add counter Zählm&arke hinzufügen - + &Remove counter Zählma&rke entfernen - + &Set counters... &Setze Zählmarken... @@ -745,7 +755,7 @@ Karten ziehen - + Number: Anzahl: @@ -766,7 +776,7 @@ Name: - + Set counters Setze Zählmarke @@ -1739,6 +1749,11 @@ Player "%1" Spieler "%1" + + + Take &mulligan + &Mulligan nehmen + &Hand @@ -1822,14 +1837,13 @@ Ctrl+E - Take &mulligan... - &Mulligan nehmen... + &Mulligan nehmen... Ctrl+M - Ctrl+M + Ctrl+M @@ -1954,22 +1968,22 @@ Neue Lebenspunkte insgesamt: - + Roll die Würfeln - + Number of sides: Anzahl der Seiten: - + Create token Token erstellen - + Name: Name: diff --git a/cockatrice/translations/cockatrice_en.ts b/cockatrice/translations/cockatrice_en.ts index 46413cef..00fd4cbd 100644 --- a/cockatrice/translations/cockatrice_en.ts +++ b/cockatrice/translations/cockatrice_en.ts @@ -451,112 +451,122 @@ Game - + Next &phase - + Ctrl+Space - + Next &turn - + Ctrl+Enter - + Ctrl+Return - + &Game - - - C&ard - - - - - &Tap - - - - - &Untap - - - Toggle &normal untapping + &Remove all local arrows - &Flip - - - - - &Add counter + Ctrl+R - &Remove counter + C&ard - &Set counters... + &Tap - &top of library + &Untap - &bottom of library + Toggle &normal untapping - &graveyard + &Flip - Ctrl+Del + &Add counter - &exile + &Remove counter + + + + + &Set counters... + &top of library + + + + + &bottom of library + + + + + &graveyard + + + + + Ctrl+Del + + + + + &exile + + + + &Move to - + Number: - + Set counters @@ -1217,239 +1227,249 @@ Player - - - + + + Move to &top of library - - - + + + Move to &bottom of library - + &View library - + F3 - + View &top cards of library... - + &View graveyard - + F4 - + &View sideboard - + Player "%1" - + &Hand - + &Library - + &Graveyard - + &Sideboard - + View top cards of library - + Number of cards: - + &Draw card - + &View exile - + &Exile - - + + Move to &hand - - + + Move to g&raveyard - - + + Move to &exile - + Ctrl+D - + D&raw cards... - + Ctrl+E - - - &Shuffle - - - - - Ctrl+S - - - &Counters + Take &mulligan + + + + + Ctrl+M - &Untap all permanents + &Shuffle - Ctrl+U - - - - - R&oll die... - - - - - Ctrl+I - - - - - &Create token... - - - - - Ctrl+T + Ctrl+S + &Counters + + + + + &Untap all permanents + + + + + Ctrl+U + + + + + R&oll die... + + + + + Ctrl+I + + + + + &Create token... + + + + + Ctrl+T + + + + S&ay - + F5 - + F6 - + F7 - + F8 - + F9 - + F10 - + Draw cards - + Number: - + Roll die - + Number of sides: - + Create token - + Name: