Merge pull request #2199 from wincinderith/load-remote-fix
Disable "Load remote deck..." button in local game
This commit is contained in:
commit
e4127fead3
2 changed files with 6 additions and 0 deletions
|
@ -100,6 +100,8 @@ DeckViewContainer::DeckViewContainer(int _playerId, TabGame *parent)
|
|||
{
|
||||
loadLocalButton = new QPushButton;
|
||||
loadRemoteButton = new QPushButton;
|
||||
if (parentGame->getIsLocalGame())
|
||||
loadRemoteButton->setEnabled(false);
|
||||
readyStartButton = new ToggleButton;
|
||||
readyStartButton->setEnabled(false);
|
||||
sideboardLockButton = new ToggleButton;
|
||||
|
@ -307,6 +309,7 @@ TabGame::TabGame(TabSupervisor *_tabSupervisor, GameReplay *_replay)
|
|||
secondsElapsed(0),
|
||||
hostId(-1),
|
||||
localPlayerId(-1),
|
||||
isLocalGame(_tabSupervisor->getIsLocalGame()),
|
||||
spectator(true),
|
||||
gameStateKnown(false),
|
||||
resuming(false),
|
||||
|
@ -375,6 +378,7 @@ TabGame::TabGame(TabSupervisor *_tabSupervisor, QList<AbstractClient *> &_client
|
|||
roomGameTypes(_roomGameTypes),
|
||||
hostId(event.host_id()),
|
||||
localPlayerId(event.player_id()),
|
||||
isLocalGame(_tabSupervisor->getIsLocalGame()),
|
||||
spectator(event.spectator()),
|
||||
gameStateKnown(false),
|
||||
resuming(event.resuming()),
|
||||
|
|
|
@ -111,6 +111,7 @@ private:
|
|||
QMap<int, QString> roomGameTypes;
|
||||
int hostId;
|
||||
int localPlayerId;
|
||||
const bool isLocalGame;
|
||||
bool spectator;
|
||||
QMap<int, Player *> players;
|
||||
QMap<int, ServerInfo_User> spectators;
|
||||
|
@ -238,6 +239,7 @@ public:
|
|||
const QMap<int, Player *> &getPlayers() const { return players; }
|
||||
CardItem *getCard(int playerId, const QString &zoneName, int cardId) const;
|
||||
bool isHost() const { return hostId == localPlayerId; }
|
||||
bool getIsLocalGame() const { return isLocalGame; }
|
||||
int getGameId() const { return gameInfo.game_id(); }
|
||||
QString getTabText() const;
|
||||
bool getSpectator() const { return spectator; }
|
||||
|
|
Loading…
Reference in a new issue