mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-06-26 00:23:55 -07:00
Adjust to rebase.
Took 28 minutes Took 7 seconds Took 2 minutes Took 8 minutes Took 13 seconds
This commit is contained in:
parent
75d59e2d82
commit
8447c73ec5
16 changed files with 50 additions and 48 deletions
|
|
@ -83,6 +83,8 @@ CardMenu::CardMenu(PlayerGraphicsItem *_player, const CardItem *_card, bool _sho
|
|||
aUnattach = makeAction(this, [actions, sel]() { actions->actUnattach(sel()); });
|
||||
aSetAnnotation = makeAction(this, [actions, sel]() { actions->actRequestSetAnnotationDialog(sel()); });
|
||||
aPlay = makeAction(this, [actions, sel]() { actions->actPlay(sel()); });
|
||||
aPlayAndIncreaseTax = makeAction(this, [actions, sel]() { actions->actPlayAndIncreaseTax(sel()); });
|
||||
aPlayAndIncreasePartnerTax = makeAction(this, [actions, sel]() { actions->actPlayAndIncreasePartnerTax(sel()); });
|
||||
aPlayFacedown = makeAction(this, [actions, sel]() { actions->actPlayFacedown(sel()); });
|
||||
aHide = makeAction(this, [actions, sel]() { actions->actHide(sel()); });
|
||||
aReduceLifeByPower = makeAction(this, [actions, sel]() { actions->actReduceLifeByPower(sel()); });
|
||||
|
|
@ -94,12 +96,6 @@ CardMenu::CardMenu(PlayerGraphicsItem *_player, const CardItem *_card, bool _sho
|
|||
aSelectRow = new QAction(this);
|
||||
aSelectColumn = new QAction(this);
|
||||
|
||||
aPlayAndIncreaseTax = new QAction(this);
|
||||
connect(aPlayAndIncreaseTax, &QAction::triggered, playerActions, &PlayerActions::actPlayAndIncreaseTax);
|
||||
aPlayAndIncreasePartnerTax = new QAction(this);
|
||||
connect(aPlayAndIncreasePartnerTax, &QAction::triggered, playerActions,
|
||||
&PlayerActions::actPlayAndIncreasePartnerTax);
|
||||
|
||||
connect(aAttach, &QAction::triggered, actions, &PlayerActions::actAttach);
|
||||
connect(aDrawArrow, &QAction::triggered, actions, &PlayerActions::actDrawArrow);
|
||||
connect(aSelectAll, &QAction::triggered, actions, &PlayerActions::actSelectAll);
|
||||
|
|
|
|||
|
|
@ -2,11 +2,11 @@
|
|||
|
||||
#include "../../../client/settings/cache_settings.h"
|
||||
#include "../../board/abstract_counter.h"
|
||||
#include "../../game/player/player_actions.h"
|
||||
#include "../../game/player/player_logic.h"
|
||||
#include "../../game_scene.h"
|
||||
#include "../../zones/command_zone.h"
|
||||
#include "../player_actions.h"
|
||||
#include "../player_graphics_item.h"
|
||||
#include "../player_logic.h"
|
||||
|
||||
#include <libcockatrice/utility/counter_ids.h>
|
||||
#include <libcockatrice/utility/zone_names.h>
|
||||
|
|
@ -21,7 +21,7 @@ CommandZoneMenu::CommandZoneMenu(PlayerLogic *_player, QMenu *playerMenu) : QMen
|
|||
|
||||
aViewZone = new QAction(this);
|
||||
connect(aViewZone, &QAction::triggered, this,
|
||||
[this]() { player->getGameScene()->toggleZoneView(player, ZoneNames::COMMAND, -1); });
|
||||
[this]() { emit player->requestZoneViewToggle(player, ZoneNames::COMMAND, -1, false); });
|
||||
|
||||
if (player->getPlayerInfo()->getLocalOrJudge()) {
|
||||
addAction(aViewZone);
|
||||
|
|
@ -106,10 +106,11 @@ void CommandZoneMenu::retranslateUi()
|
|||
|
||||
void CommandZoneMenu::actToggleMinimized()
|
||||
{
|
||||
CommandZone *zone = player->getGraphicsItem()->getCommandZoneGraphicsItem();
|
||||
// TODO
|
||||
/*CommandZone *zone = player->getGraphicsItem()->getCommandZoneGraphicsItem();
|
||||
if (zone) {
|
||||
zone->toggleMinimized();
|
||||
}
|
||||
}*/
|
||||
}
|
||||
|
||||
void CommandZoneMenu::updateTaxCounterActionStates()
|
||||
|
|
|
|||
|
|
@ -33,14 +33,15 @@ PlayerMenu::PlayerMenu(PlayerGraphicsItem *_player) : QObject(_player), player(_
|
|||
if (player->getLogic()->getPlayerInfo()->getLocalOrJudge()) {
|
||||
sideboardMenu = addManagedMenu<SideboardMenu>(player, playerMenu);
|
||||
|
||||
commandZoneMenu = addManagedMenu<CommandZoneMenu>(player, playerMenu);
|
||||
// TODO
|
||||
/*commandZoneMenu = addManagedMenu<CommandZoneMenu>(player, playerMenu);
|
||||
auto updateCommandZoneMenuVisibility = [this](bool has) {
|
||||
if (commandZoneMenu) {
|
||||
commandZoneMenu->menuAction()->setVisible(has);
|
||||
}
|
||||
};
|
||||
connect(player, &PlayerLogic::commandZoneSupportChanged, this, updateCommandZoneMenuVisibility);
|
||||
updateCommandZoneMenuVisibility(player->hasServerCommandZone());
|
||||
updateCommandZoneMenuVisibility(player->hasServerCommandZone());*/
|
||||
|
||||
customZonesMenu = addManagedMenu<CustomZoneMenu>(player);
|
||||
playerMenu->addSeparator();
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@
|
|||
#define COCKATRICE_PLAYER_MENU_H
|
||||
|
||||
#include "../../../interface/widgets/menus/tearoff_menu.h"
|
||||
#include "../player_logic.h"
|
||||
#include "../../game/player/player_logic.h"
|
||||
#include "command_zone_menu.h"
|
||||
#include "custom_zone_menu.h"
|
||||
#include "grave_menu.h"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue