function onDraw() { switch ($this->state) { case static::STATE_READY: $subStyle = '0F0D'; break; case static::STATE_IN_MATCH: $subStyle = 'FF0D'; break; case static::STATE_BLOCKED: $subStyle = '000D'; break; case static::STATE_NOT_READY: $subStyle = 'F00D'; break; default: $subStyle = ''; } $this->icon->setSize(1, $this->sizeY); $this->icon->setPosition(0, -$this->sizeY / 2); $this->label->setPosition(8, -$this->sizeY / 2); $this->echelonFrame->setPosition($this->sizeX - 1, 0.5); $this->countryFlag->setPosition(2, -$this->sizeY / 2); $this->bg->setSize($this->sizeX, $this->sizeY); $this->hiddenLabel->setText($this->login); $echelon = PlayerInfo::ComputeEchelon($this->ladderPoints); $this->icon->setBgcolor($subStyle); $this->countryFlag->setImage($this->zoneFlagURL, true); $this->echelonLabel->setText($echelon); $this->echelonQuad->setImage(sprintf('file://Media/Manialinks/Common/Echelons/echelon%d.dds', $echelon), true); }
/** * Sets the size of the navigation icons */ function setSize($iconSize = 5, $nullValue = null) { $this->arrowNext->setSize($iconSize, $iconSize); $this->arrowPrev->setSize($iconSize, $iconSize); $this->arrowFastNext->setSize($iconSize, $iconSize); $this->arrowFastPrev->setSize($iconSize, $iconSize); $this->arrowLast->setSize($iconSize, $iconSize); $this->arrowFirst->setSize($iconSize, $iconSize); }