2018-04-24 06:12:08 -07:00
|
|
|
/* Copyright (C) 2018 Wildfire Games.
|
2010-01-09 11:20:14 -08:00
|
|
|
* This file is part of 0 A.D.
|
|
|
|
|
*
|
|
|
|
|
* 0 A.D. is free software: you can redistribute it and/or modify
|
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
|
|
* the Free Software Foundation, either version 2 of the License, or
|
|
|
|
|
* (at your option) any later version.
|
|
|
|
|
*
|
|
|
|
|
* 0 A.D. is distributed in the hope that it will be useful,
|
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
|
*
|
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
|
* along with 0 A.D. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
#include "precompiled.h"
|
|
|
|
|
|
|
|
|
|
#include "scriptinterface/ScriptInterface.h"
|
|
|
|
|
|
2014-11-12 17:26:22 -08:00
|
|
|
#include "graphics/scripting/JSInterface_GameView.h"
|
2014-01-04 02:14:53 -08:00
|
|
|
#include "gui/IGUIObject.h"
|
2017-09-11 17:54:49 -07:00
|
|
|
#include "gui/scripting/JSInterface_GUIManager.h"
|
2014-01-04 02:14:53 -08:00
|
|
|
#include "gui/scripting/JSInterface_GUITypes.h"
|
2014-04-20 13:03:57 -07:00
|
|
|
#include "i18n/scripting/JSInterface_L10n.h"
|
2013-11-16 10:38:40 -08:00
|
|
|
#include "lobby/scripting/JSInterface_Lobby.h"
|
2017-09-11 17:29:10 -07:00
|
|
|
#include "network/scripting/JSInterface_Network.h"
|
2013-09-29 11:56:50 -07:00
|
|
|
#include "ps/scripting/JSInterface_ConfigDB.h"
|
2013-09-21 07:48:19 -07:00
|
|
|
#include "ps/scripting/JSInterface_Console.h"
|
2017-09-11 19:25:28 -07:00
|
|
|
#include "ps/scripting/JSInterface_Debug.h"
|
2017-09-11 18:38:46 -07:00
|
|
|
#include "ps/scripting/JSInterface_Game.h"
|
2017-09-11 20:11:33 -07:00
|
|
|
#include "ps/scripting/JSInterface_Main.h"
|
2014-08-25 09:02:54 -07:00
|
|
|
#include "ps/scripting/JSInterface_Mod.h"
|
2018-04-24 06:12:08 -07:00
|
|
|
#include "ps/scripting/JSInterface_ModIo.h"
|
2017-09-11 16:22:28 -07:00
|
|
|
#include "ps/scripting/JSInterface_SavedGame.h"
|
2014-01-04 02:14:53 -08:00
|
|
|
#include "ps/scripting/JSInterface_VFS.h"
|
2015-09-21 10:00:21 -07:00
|
|
|
#include "ps/scripting/JSInterface_VisualReplay.h"
|
2013-09-21 01:24:45 -07:00
|
|
|
#include "renderer/scripting/JSInterface_Renderer.h"
|
2017-09-11 18:53:46 -07:00
|
|
|
#include "simulation2/scripting/JSInterface_Simulation.h"
|
2014-01-04 02:14:53 -08:00
|
|
|
#include "soundmanager/scripting/JSInterface_Sound.h"
|
2010-01-09 11:20:14 -08:00
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
* This file defines a set of functions that are available to GUI scripts, to allow
|
|
|
|
|
* interaction with the rest of the engine.
|
|
|
|
|
* Functions are exposed to scripts within the global object 'Engine', so
|
|
|
|
|
* scripts should call "Engine.FunctionName(...)" etc.
|
|
|
|
|
*/
|
|
|
|
|
void GuiScriptingInit(ScriptInterface& scriptInterface)
|
|
|
|
|
{
|
2014-01-04 02:14:53 -08:00
|
|
|
JSI_IGUIObject::init(scriptInterface);
|
|
|
|
|
JSI_GUITypes::init(scriptInterface);
|
2014-04-20 13:03:57 -07:00
|
|
|
|
2013-09-29 11:56:50 -07:00
|
|
|
JSI_ConfigDB::RegisterScriptFunctions(scriptInterface);
|
2017-09-11 20:11:33 -07:00
|
|
|
JSI_Console::RegisterScriptFunctions(scriptInterface);
|
2017-09-11 19:25:28 -07:00
|
|
|
JSI_Debug::RegisterScriptFunctions(scriptInterface);
|
2017-09-11 17:54:49 -07:00
|
|
|
JSI_GUIManager::RegisterScriptFunctions(scriptInterface);
|
2017-09-11 20:11:33 -07:00
|
|
|
JSI_Game::RegisterScriptFunctions(scriptInterface);
|
|
|
|
|
JSI_GameView::RegisterScriptFunctions(scriptInterface);
|
|
|
|
|
JSI_L10n::RegisterScriptFunctions(scriptInterface);
|
|
|
|
|
JSI_Lobby::RegisterScriptFunctions(scriptInterface);
|
|
|
|
|
JSI_Main::RegisterScriptFunctions(scriptInterface);
|
2014-08-25 09:02:54 -07:00
|
|
|
JSI_Mod::RegisterScriptFunctions(scriptInterface);
|
2018-04-24 06:12:08 -07:00
|
|
|
JSI_ModIo::RegisterScriptFunctions(scriptInterface);
|
2017-09-11 17:29:10 -07:00
|
|
|
JSI_Network::RegisterScriptFunctions(scriptInterface);
|
2017-09-11 20:11:33 -07:00
|
|
|
JSI_Renderer::RegisterScriptFunctions(scriptInterface);
|
2017-09-11 16:22:28 -07:00
|
|
|
JSI_SavedGame::RegisterScriptFunctions(scriptInterface);
|
2017-09-11 18:53:46 -07:00
|
|
|
JSI_Simulation::RegisterScriptFunctions(scriptInterface);
|
2017-09-11 20:11:33 -07:00
|
|
|
JSI_Sound::RegisterScriptFunctions(scriptInterface);
|
2017-12-03 15:02:27 -08:00
|
|
|
JSI_VFS::RegisterScriptFunctions_GUI(scriptInterface);
|
2015-09-21 10:00:21 -07:00
|
|
|
JSI_VisualReplay::RegisterScriptFunctions(scriptInterface);
|
2010-01-09 11:20:14 -08:00
|
|
|
}
|