function onDialogClosed($login, \ManiaLive\Gui\Window $dialog)
 {
     if ($dialog->getAnswer() == Dialog::YES) {
         if (Storage::getInstance()->serverStatus->code == 4) {
             $config = \ManiaLive\DedicatedApi\Config::getInstance();
             Connection::factory($config->host, $config->port)->restartMap();
             $this->hide();
         } else {
             $dialog->showModal();
         }
     }
 }
Example #2
0
 function destroy()
 {
     parent::destroy();
     foreach ($this->onKey as $key => $callback) {
         $this->removeCallback($key);
     }
 }
 function destroy()
 {
     $this->destroyComponents();
     parent::destroy();
 }
Example #4
0
 function destroy()
 {
     $this->clearItems();
     parent::destroy();
 }
Example #5
0
 function onPlayerDisconnect($login, $disconnectionReason)
 {
     $this->groupAll->remove($login);
     $this->groupPlayers->remove($login);
     $this->groupSpectators->remove($login);
     Window::Erase($login);
     CustomUI::Erase($login);
     if (array_key_exists($login, $this->modals)) {
         foreach ($this->modals[$login] as $dialog) {
             $this->onModalClosed($login, $dialog);
         }
         if ($this->modalShown[$login]) {
             $this->onModalClosed($login, $this->modalShown[$login]);
         }
     }
     unset($this->hidingGui[$login]);
     unset($this->modals[$login]);
     unset($this->modalShown[$login]);
     unset($this->managedWindow[$login]);
     unset($this->thumbnails[$login]);
 }
Example #6
0
 function destroy()
 {
     parent::destroy();
     $this->logo->destroy();
     $this->status->destroy();
 }
Example #7
0
 function destroy()
 {
     $this->window = null;
     $this->windowContent->clearComponents();
     parent::destroy();
 }