Solarus-Games English Forum

Solarus => Development => Topic started by: dpro_games on May 29, 2019, 10:08:06 PM

Title: Where the pause menu is launched in XD2 ?
Post by: dpro_games on May 29, 2019, 10:08:06 PM
Hello, I am searching where is the pause menu started in the scripts files of XD2 and how to launch it by myself ?
I'm currently trying to use the pause menu of XD2 with the some of the scripts of "Le defi de Zeldo". So I replaced the files for the menu and now, when I'm pausing the game, the game is paused but no menu are opening... Where do I need to say to the game where starting the pause menu ?

Thanks
Title: Re: Where the pause menu is launched in XD2 ?
Post by: Splyth on May 30, 2019, 05:02:05 PM
I don't have the code in front of me but I would check the
On_commamd_pressed or on_character_pressed fuctions
Title: Re: Where the pause menu is launched in XD2 ?
Post by: llamazing on May 31, 2019, 01:14:03 AM
You're going to have to be more specific about what steps you attempted to do...

This is how I interpret what you said; is it correct?
* You copied "scripts/menus/pause.lua" from XD2 and added it to your own quest
* You started the pause menu from your own quest, but nothing happens apart from pausing the game

If that's the case then it's because all pause.lua does is launch the various submenus (each screen you can scroll between). Try copying the following additional files to your quest and see if it works better:
* "scripts/menus/pause_inventory.lua"
* "scripts/menus/pause_map.lua"
* "scripts/menus/pause_options.lua"
* "scripts/menus/pause_quest_status.lua"

Or if that isn't the problem, then I'm guessing an error was printed to the console when you opened the pause menu. Please provide the content of that error message.
Title: Re: Where the pause menu is launched in XD2 ?
Post by: dpro_games on June 27, 2019, 12:57:38 PM
Thank you for the answers
I actually make it work I don't know how but that's cool ^^