mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-04-27 07:48:01 -07:00
protobuf client->server communication almost working
This commit is contained in:
parent
4eb9dfc5bf
commit
314f17091d
96 changed files with 1633 additions and 860 deletions
|
|
@ -15,6 +15,9 @@
|
|||
#include "settingscache.h"
|
||||
#include "gamescene.h"
|
||||
|
||||
#include "pb/command_stop_dump_zone.pb.h"
|
||||
#include "pb/command_shuffle.pb.h"
|
||||
|
||||
TitleLabel::TitleLabel()
|
||||
: QGraphicsWidget(), text(" ")
|
||||
{
|
||||
|
|
@ -156,11 +159,15 @@ void ZoneViewWidget::resizeToZoneContents()
|
|||
void ZoneViewWidget::closeEvent(QCloseEvent *event)
|
||||
{
|
||||
disconnect(zone, SIGNAL(beingDeleted()), this, 0);
|
||||
if (zone->getNumberCards() != -2)
|
||||
player->sendGameCommand(new Command_StopDumpZone(-1, player->getId(), zone->getName()));
|
||||
if (zone->getNumberCards() != -2) {
|
||||
Command_StopDumpZone cmd;
|
||||
cmd.set_player_id(player->getId());
|
||||
cmd.set_zone_name(zone->getName().toStdString());
|
||||
player->sendGameCommand(cmd);
|
||||
}
|
||||
if (shuffleCheckBox)
|
||||
if (shuffleCheckBox->isChecked())
|
||||
player->sendGameCommand(new Command_Shuffle);
|
||||
player->sendGameCommand(Command_Shuffle());
|
||||
emit closePressed(this);
|
||||
deleteLater();
|
||||
event->accept();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue