Inloggen
NL
games/xencenter-xenadmin-xcp-jumphp / src / Form / AboutForm.php · commit fb1b7c9
<?phpnamespace App\Form;use JumPHP\Gui\Button;use JumPHP\Gui\Form;use JumPHP\Gui\Label;/** * Help > About. * * @property Label $version * @property Button $ok */final class AboutForm extends Form{    public function __construct(private \App\Model\Session $session)    {        parent::__construct();    }    /** XAPI's answers, events and the console go on while this dialog is open. */    protected function tick(float $dt): void    {        $this->session->tick($dt);    }    protected function loaded(array $params = []): void    {        $this->version->text = 'Version ' . $this->engine->config->get('version', '0.1.0') . (\JumPHP\Kernel\Platform::isWasm() ? ' · browser' : ' · desktop');    }    public function onOkClick(Button $sender): void    {        $this->close();    }}