Adds saved game deletion. Refs #1090

Documents a few things related to saved games.

This was SVN commit r11233.
This commit is contained in:
historic_bruno
2012-03-04 05:27:17 +00:00
parent 4cb7972ec2
commit d60df4b127
5 changed files with 115 additions and 8 deletions
+6
View File
@@ -351,6 +351,11 @@ std::vector<CScriptValRooted> GetSavedGames(void* cbdata)
return SavedGames::GetSavedGames(guiManager->GetScriptInterface());
}
bool DeleteSavedGame(void* UNUSED(cbdata), std::wstring name)
{
return SavedGames::DeleteSavedGame(name);
}
void OpenURL(void* UNUSED(cbdata), std::string url)
{
sys_open_url(url);
@@ -588,6 +593,7 @@ void GuiScriptingInit(ScriptInterface& scriptInterface)
// Saved games
scriptInterface.RegisterFunction<CScriptVal, std::wstring, &StartSavedGame>("StartSavedGame");
scriptInterface.RegisterFunction<std::vector<CScriptValRooted>, &GetSavedGames>("GetSavedGames");
scriptInterface.RegisterFunction<bool, std::wstring, &DeleteSavedGame>("DeleteSavedGame");
scriptInterface.RegisterFunction<void, &SaveGame>("SaveGame");
scriptInterface.RegisterFunction<void, &QuickSave>("QuickSave");
scriptInterface.RegisterFunction<void, &QuickLoad>("QuickLoad");