/** * @param string $login If null, set message for all non ready players */ protected function setNotReadyLabel($login = null) { $players = $login === null ? Services\PlayerInfo::GetNotReady() : array(Services\PlayerInfo::Get($login)); foreach ($players as $player) { $this->gui->removeLabel($player->login); if (!array_key_exists($player->login, $this->blockedPlayers)) { $message = null; if (count(Services\PlayerInfo::GetReady()) == 0 && $this->backupNeeded) { $message = $this->gui->getNoReadyPlayers(); } $this->setShortKey($player->login, array($this, 'onPlayerReady')); if ($message) { $this->gui->updateWaitingScreenLabel($message, $player->login); } } else { $this->resetShortKey($player->login); } } }