コード例 #1
0
 function onConstruct()
 {
     $this->setLayer(\ManiaLive\Gui\Window::LAYER_CUT_SCENE);
     $ui = new Elements\Bgs1(320, 180);
     $ui->setAlign('center', 'center');
     $ui->setSubStyle(Elements\Bgs1::BgDialogBlur);
     $this->addComponent($ui);
     $ui = new Elements\Bgs1(163, 63);
     $ui->setAlign('center', 'center');
     $ui->setSubStyle(Elements\Bgs1::BgShadow);
     $this->addComponent($ui);
     $ui = new Elements\Quad(160, 60);
     $ui->setAlign('center', 'center');
     $ui->setBgcolor('eeef');
     $this->addComponent($ui);
     $this->questionLabel = new Elements\Label(160);
     $this->questionLabel->setAlign('center', 'center2');
     $this->questionLabel->setPosY(5);
     $this->questionLabel->enableAutonewline();
     $this->questionLabel->setStyle(Elements\Label::TextInfoMedium);
     $this->addComponent($this->questionLabel);
     $this->yesButton = new Elements\Button();
     $this->yesButton->setAlign('left', 'bottom');
     $this->yesButton->setPosition(-45, -25);
     $this->yesButton->setTextid('yes');
     $this->addComponent($this->yesButton);
     $this->noButton = new Elements\Button();
     $this->noButton->setAlign('right', 'bottom');
     $this->noButton->setPosition(45, -25);
     $this->noButton->setTextid('no');
     $this->addComponent($this->noButton);
 }