2018-06-17 15:48:42 +02:00
|
|
|
/*****************************************************************************
|
2020-04-22 16:06:29 +01:00
|
|
|
* Copyright (c) 2014-2020 OpenRCT2 developers
|
2018-06-17 15:48:42 +02:00
|
|
|
*
|
|
|
|
|
* For a complete list of all authors, please refer to contributors.md
|
|
|
|
|
* Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2
|
|
|
|
|
*
|
|
|
|
|
* OpenRCT2 is licensed under the GNU General Public License version 3.
|
|
|
|
|
*****************************************************************************/
|
|
|
|
|
|
2020-04-24 15:58:01 +01:00
|
|
|
#ifdef ENABLE_SCRIPTING
|
2018-07-31 17:59:48 +02:00
|
|
|
|
2020-02-23 12:55:48 +00:00
|
|
|
# include "UiExtensions.h"
|
2018-03-24 19:30:10 +00:00
|
|
|
|
2020-02-23 12:55:48 +00:00
|
|
|
# include "CustomMenu.h"
|
2020-05-01 17:04:37 +01:00
|
|
|
# include "ScTileSelection.hpp"
|
2020-02-23 12:55:48 +00:00
|
|
|
# include "ScUi.hpp"
|
|
|
|
|
# include "ScWidget.hpp"
|
|
|
|
|
# include "ScWindow.hpp"
|
|
|
|
|
|
|
|
|
|
# include <openrct2/scripting/ScriptEngine.h>
|
2018-07-31 17:59:48 +02:00
|
|
|
|
2018-03-24 19:30:10 +00:00
|
|
|
using namespace OpenRCT2::Scripting;
|
|
|
|
|
|
|
|
|
|
void UiScriptExtensions::Extend(ScriptEngine& scriptEngine)
|
|
|
|
|
{
|
|
|
|
|
auto ctx = scriptEngine.GetContext();
|
|
|
|
|
|
2018-03-25 18:23:24 +01:00
|
|
|
dukglue_register_global(ctx, std::make_shared<ScUi>(scriptEngine), "ui");
|
2018-03-24 19:30:10 +00:00
|
|
|
|
2020-05-01 17:04:37 +01:00
|
|
|
ScTileSelection::Register(ctx);
|
2020-05-01 21:32:41 +01:00
|
|
|
ScTool::Register(ctx);
|
2018-03-24 19:30:10 +00:00
|
|
|
ScUi::Register(ctx);
|
2020-02-14 21:22:22 +00:00
|
|
|
ScViewport::Register(ctx);
|
2020-02-14 23:36:24 +00:00
|
|
|
ScWidget::Register(ctx);
|
2018-03-24 19:30:10 +00:00
|
|
|
ScWindow::Register(ctx);
|
2020-02-11 21:26:05 +00:00
|
|
|
|
|
|
|
|
InitialiseCustomMenuItems(scriptEngine);
|
2018-03-24 19:30:10 +00:00
|
|
|
}
|
2020-02-23 12:55:48 +00:00
|
|
|
|
|
|
|
|
#endif
|