1: <?php
2: /**
3: * ManiaLib - Lightweight PHP framework for Manialinks
4: *
5: * @see http://code.google.com/p/manialib/
6: * @copyright Copyright (c) 2009-2011 NADEO (http://www.nadeo.com)
7: * @license http://www.gnu.org/licenses/lgpl.html LGPL License 3
8: * @version $Revision: 590 $:
9: * @author $Author: maximeraoust $:
10: * @date $Date: 2011-12-27 19:40:38 +0100 (mar., 27 déc. 2011) $:
11: */
12:
13: namespace ManiaLib\Gui\Cards\Dialogs;
14:
15: class TwoButtons extends OneButton
16: {
17:
18: /**
19: * @var \ManiaLib\Gui\Elements\Button
20: */
21: public $button2;
22:
23: function __construct($sizeX = 65, $sizeY = 25)
24: {
25: parent::__construct($sizeX, $sizeY);
26: $this->titleBg->setSubStyle(\ManiaLib\Gui\Elements\Bgs1::BgTitle3_1);
27:
28: $this->button->setPosition(-15, 0, 0);
29:
30: $this->button2 = new \ManiaLib\Gui\Elements\Button;
31: $this->button2->setPosition(15, 0, 0);
32: $this->button2->setAlign('left', 'bottom');
33: $this->addCardElement($this->button2);
34: }
35:
36: function preFilter()
37: {
38: parent::preFilter();
39: $this->button->setHalign('right');
40: $this->button2->setPositionY(5 - $this->sizeY);
41: $this->button->setPositionX(-5);
42: $this->button2->setPositionX(5);
43: }
44:
45: }
46:
47: ?>