From 3c70ae51cfbd19479d8f5a6e6a3a3e862c819cf2 Mon Sep 17 00:00:00 2001 From: Gordon Pedersen Date: Thu, 20 Jul 2023 14:35:37 +1000 Subject: [PATCH] Added restart option to pause menu --- 🕹️cube-tube/app/scenes/paused.rb | 16 ++++++++++------ 🕹️cube-tube/app/text.rb | 1 + 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/🕹️cube-tube/app/scenes/paused.rb b/🕹️cube-tube/app/scenes/paused.rb index af5d926..07e5f9c 100644 --- a/🕹️cube-tube/app/scenes/paused.rb +++ b/🕹️cube-tube/app/scenes/paused.rb @@ -9,6 +9,10 @@ class PauseMenu < MenuScene key: :resume, on_select: ->(args) { Scene.pop(args) } }, + { + key: :restart, + on_select: ->(args) { Scene.switch(args, :intro, reset: true) } + }, { key: :settings, on_select: ->(args) { Scene.push(args, :settings, reset: true, reset_on_pop: true) } @@ -19,12 +23,12 @@ class PauseMenu < MenuScene } ] - if args.gtk.platform?(:desktop) - menu_options << { - key: :quit, - on_select: ->(args) { args.gtk.request_quit } - } - end + # if args.gtk.platform?(:desktop) + # menu_options << { + # key: :quit, + # on_select: ->(args) { args.gtk.request_quit } + # } + # end super args, opts, :paused, menu_options end diff --git a/🕹️cube-tube/app/text.rb b/🕹️cube-tube/app/text.rb index b2b9e20..e909272 100644 --- a/🕹️cube-tube/app/text.rb +++ b/🕹️cube-tube/app/text.rb @@ -16,6 +16,7 @@ TEXT = { paused: "Paused", quit: "Quit", resume: "Resume", + restart: "Restart", return_to_main_menu: "Main Menu", settings: "Settings", sfx: "Sound Effects",