restart = $params['restart'] ?? $this->restart; parent::enter($params); } public function isOverlay(): bool { return true; } protected function items(): array { return [ [Lang::t('RESUME'), null, fn () => $this->scenes()->pop()], [Lang::t('RESTART'), null, fn () => $this->scenes()->switchTo(PlayScene::class, $this->restart)], [Lang::t('OPTIONS'), null, fn () => $this->scenes()->push(OptionsScene::class)], [Lang::t('MAPS'), null, fn () => $this->scenes()->switchTo(MapSelectScene::class, $this->restart)], [Lang::t('CHOOSE YOUR SIDE'), null, fn () => $this->scenes()->switchTo(FactionSelectScene::class)], ]; } public function resume(mixed $result = null): void { $this->fonts->apply($this->engine); $this->refresh(); $this->layoutMenu(); } protected function back(): void { $this->scenes()->pop(); } public function update(float $dt): void { if ($this->actions()->isPressed('pause') && !$this->actions()->isPressed('back')) { $this->scenes()->pop(); return; } parent::update($dt); } }