protected function onConstruct() { parent::onConstruct(); $this->setSize(count(self::$modes) * 20 + 2, 36); $this->setTitle('Choose Game Mode'); // create layout for buttons ... $this->buttonsFrame = new Frame(1, -15, new Line()); $this->addComponent($this->buttonsFrame); foreach (self::$modes as $mode => $modeInfo) { $button = new ButtonMode($modeInfo[0], $modeInfo[1]); $button->setAction($this->createAction(array($this, 'onClickMode'), $mode)); $this->buttons[$mode] = $button; $this->buttonsFrame->addComponent($button); } }
function getThumbnail(ManagedWindow $window) { $login = $window->getRecipient(); if (isset($this->thumbnails[$login])) { foreach ($this->thumbnails[$login] as $thumbnail) { if ($thumbnail && $thumbnail->getWindow() === $window) { return $thumbnail; } } } return null; }
protected function onResize($oldX, $oldY) { parent::onResize($oldX, $oldY); $this->tabbedPane->setSize($this->sizeX - 2, $this->sizeY - 16); }
protected function onResize($oldX, $oldY) { parent::onResize($oldX, $oldY); $this->pager->setSize($this->sizeX - 4, $this->sizeY - 20); }