1: <?php
2: /**
3: * ManiaLive - TrackMania dedicated server manager in PHP
4: *
5: * @copyright Copyright (c) 2009-2011 NADEO (http://www.nadeo.com)
6: * @license http://www.gnu.org/licenses/lgpl.html LGPL License 3
7: * @version $Revision: 364 $:
8: * @author $Author: martin.gwendal $:
9: * @date $Date: 2012-04-25 16:41:40 +0200 (mer., 25 avr. 2012) $:
10: */
11:
12: namespace ManiaLive\Gui\Windows;
13:
14: use ManiaLib\Gui\Elements\Bgs1InRace;
15: use ManiaLib\Gui\Elements\Label;
16:
17: final class Info extends \ManiaLive\Gui\Panel
18: {
19: private $text;
20:
21: protected function onConstruct()
22: {
23: parent::onConstruct();
24:
25: $this->text = new Label();
26: $this->text->setPosition(2, -17);
27: $this->text->enableAutonewline();
28: $this->addComponent($this->text);
29: }
30:
31: protected function onResize($oldX, $oldY)
32: {
33: parent::onResize($oldX, $oldY);
34: $this->text->setSize($this->sizeX - 4, $this->sizeY - 6);
35: }
36:
37: function setText($text)
38: {
39: $this->text->setText($text);
40: }
41: }
42:
43: ?>