game->isPaused()) { $this->scenes()->pop(); return; } $actions = $this->actions(); if ($actions->isPressed('back')) { $this->scenes()->pop('title'); } elseif ($actions->isPressed('start') || $actions->isPressed('jump')) { $this->scenes()->pop(); } } public function render(Renderer $r): void { // a dark veil over the frozen game (the word itself: Game::renderWindow, at window resolution) $r->fillRect(0, 0, $r->getWidth(), $r->getHeight(), [0, 0, 0, 110]); } public function isOverlay(): bool { return true; } }