Changeset View
Changeset View
Standalone View
Standalone View
source/gui/Scripting/ScriptFunctions.cpp
/* Copyright (C) 2022 Wildfire Games. | /* Copyright (C) 2023 Wildfire Games. | ||||
* This file is part of 0 A.D. | * This file is part of 0 A.D. | ||||
* | * | ||||
* 0 A.D. is free software: you can redistribute it and/or modify | * 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 | * it under the terms of the GNU General Public License as published by | ||||
* the Free Software Foundation, either version 2 of the License, or | * the Free Software Foundation, either version 2 of the License, or | ||||
* (at your option) any later version. | * (at your option) any later version. | ||||
* | * | ||||
* 0 A.D. is distributed in the hope that it will be useful, | * 0 A.D. is distributed in the hope that it will be useful, | ||||
Show All 26 Lines | |||||
#include "ps/scripting/JSInterface_SavedGame.h" | #include "ps/scripting/JSInterface_SavedGame.h" | ||||
#include "ps/scripting/JSInterface_UserReport.h" | #include "ps/scripting/JSInterface_UserReport.h" | ||||
#include "ps/scripting/JSInterface_VFS.h" | #include "ps/scripting/JSInterface_VFS.h" | ||||
#include "ps/scripting/JSInterface_VisualReplay.h" | #include "ps/scripting/JSInterface_VisualReplay.h" | ||||
#include "renderer/scripting/JSInterface_Renderer.h" | #include "renderer/scripting/JSInterface_Renderer.h" | ||||
#include "scriptinterface/ScriptInterface.h" | #include "scriptinterface/ScriptInterface.h" | ||||
#include "simulation2/scripting/JSInterface_Simulation.h" | #include "simulation2/scripting/JSInterface_Simulation.h" | ||||
#include "soundmanager/scripting/JSInterface_Sound.h" | #include "soundmanager/scripting/JSInterface_Sound.h" | ||||
#include "tools/atlas/EditorInterface/scripting/JSInterface_Editor.h" | |||||
/* | /* | ||||
* This file defines a set of functions that are available to GUI scripts, to allow | * This file defines a set of functions that are available to GUI scripts, to allow | ||||
* interaction with the rest of the engine. | * interaction with the rest of the engine. | ||||
* Functions are exposed to scripts within the global object 'Engine', so | * Functions are exposed to scripts within the global object 'Engine', so | ||||
* scripts should call "Engine.FunctionName(...)" etc. | * scripts should call "Engine.FunctionName(...)" etc. | ||||
*/ | */ | ||||
void GuiScriptingInit(ScriptInterface& scriptInterface) | void GuiScriptingInit(ScriptInterface& scriptInterface) | ||||
Show All 16 Lines | void GuiScriptingInit(ScriptInterface& scriptInterface) | ||||
JSI_Network::RegisterScriptFunctions(rq); | JSI_Network::RegisterScriptFunctions(rq); | ||||
JSI_Renderer::RegisterScriptFunctions(rq); | JSI_Renderer::RegisterScriptFunctions(rq); | ||||
JSI_SavedGame::RegisterScriptFunctions(rq); | JSI_SavedGame::RegisterScriptFunctions(rq); | ||||
JSI_Simulation::RegisterScriptFunctions(rq); | JSI_Simulation::RegisterScriptFunctions(rq); | ||||
JSI_Sound::RegisterScriptFunctions(rq); | JSI_Sound::RegisterScriptFunctions(rq); | ||||
JSI_UserReport::RegisterScriptFunctions(rq); | JSI_UserReport::RegisterScriptFunctions(rq); | ||||
JSI_VFS::RegisterScriptFunctions_ReadWriteAnywhere(rq); | JSI_VFS::RegisterScriptFunctions_ReadWriteAnywhere(rq); | ||||
JSI_VisualReplay::RegisterScriptFunctions(rq); | JSI_VisualReplay::RegisterScriptFunctions(rq); | ||||
JSI_Editor::RegisterScriptFunctions(rq); | |||||
Stan: Any reason you need to specify that many parameters?
I think they are ordered alphabetically. | |||||
Done Inline ActionsFor editor Game Im exponsing an "EditorEngine" Object, the idea was to separete methods from Editor. So I pass like argument because I need an Instance Object thwn it' destroy also destroy "EditorEngine", in this case CGUI. trompetin17: For editor Game Im exponsing an "EditorEngine" Object, the idea was to separete methods from… | |||||
} | } |
Wildfire Games · Phabricator
Any reason you need to specify that many parameters?
I think they are ordered alphabetically.