Added restart option to pause menu
This commit is contained in:
parent
4233a560dd
commit
3c70ae51cf
2 changed files with 11 additions and 6 deletions
|
@ -9,6 +9,10 @@ class PauseMenu < MenuScene
|
||||||
key: :resume,
|
key: :resume,
|
||||||
on_select: ->(args) { Scene.pop(args) }
|
on_select: ->(args) { Scene.pop(args) }
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
key: :restart,
|
||||||
|
on_select: ->(args) { Scene.switch(args, :intro, reset: true) }
|
||||||
|
},
|
||||||
{
|
{
|
||||||
key: :settings,
|
key: :settings,
|
||||||
on_select: ->(args) { Scene.push(args, :settings, reset: true, reset_on_pop: true) }
|
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)
|
# if args.gtk.platform?(:desktop)
|
||||||
menu_options << {
|
# menu_options << {
|
||||||
key: :quit,
|
# key: :quit,
|
||||||
on_select: ->(args) { args.gtk.request_quit }
|
# on_select: ->(args) { args.gtk.request_quit }
|
||||||
}
|
# }
|
||||||
end
|
# end
|
||||||
|
|
||||||
super args, opts, :paused, menu_options
|
super args, opts, :paused, menu_options
|
||||||
end
|
end
|
||||||
|
|
|
@ -16,6 +16,7 @@ TEXT = {
|
||||||
paused: "Paused",
|
paused: "Paused",
|
||||||
quit: "Quit",
|
quit: "Quit",
|
||||||
resume: "Resume",
|
resume: "Resume",
|
||||||
|
restart: "Restart",
|
||||||
return_to_main_menu: "Main Menu",
|
return_to_main_menu: "Main Menu",
|
||||||
settings: "Settings",
|
settings: "Settings",
|
||||||
sfx: "Sound Effects",
|
sfx: "Sound Effects",
|
||||||
|
|
Loading…
Reference in a new issue