ManiaLib 1.0b1 API Reference

Source for file BulletCard.class.php

Documentation is available at BulletCard.class.php

  1. <?php
  2. /**
  3.  * @author Maxime Raoust
  4.  * @copyright 2009-2010 NADEO
  5.  * @package ManiaLib
  6.  */
  7.  
  8. /**
  9.  * Bullet
  10.  * Bullet to make nice lists
  11.  * @package ManiaLib
  12.  * @subpackage GUIToolkit_Cards
  13.  */
  14. class BulletCard extends Quad
  15. {
  16.     /**
  17.      * @var Icon 
  18.      */
  19.     public $bullet;
  20.     /**
  21.      * @var Label 
  22.      */
  23.     public $title;
  24.     
  25.     function __construct($sizeX 50$sizeY 5)
  26.     {
  27.         $this->sizeX $sizeX;
  28.         $this->sizeY $sizeY;
  29.         $this->setSubStyle(Bgs1::BgList);
  30.         
  31.         $this->bullet = new Icon(8);
  32.         $this->bullet->setValign('center');
  33.         $this->bullet->setPosition(0.5-0.10);
  34.         
  35.         $this->title = new Label();
  36.         $this->title->setValign('center');
  37.         $this->title->setPosition(00.10);
  38.         $this->title->setStyle(Label::TextTitle3);
  39.     }
  40.     
  41.     /**
  42.      * @ignore
  43.      */
  44.     function postFilter()
  45.     {
  46.         $this->title->setPositionX(9.5);
  47.         $this->title->setSizeX($this->getSizeX($this->title->getPosX(2);
  48.         
  49.         $arr GuiTools::getAlignedPos ($this"left""center");
  50.         $x $arr["x"];
  51.         $y $arr["y"];
  52.         
  53.         Manialink::beginFrame($x$y$this->posZ+1);
  54.         {
  55.             $this->bullet->save();
  56.             $this->title->save();
  57.         }
  58.         Manialink::endFrame();
  59.     }
  60. }
  61. ?>