|
2 | 2 |
|
3 | 3 | // UI-controls |
4 | 4 | #include "UIScriptWnd.h" |
| 5 | +#include "uiscriptwnd_script.h" |
5 | 6 | #include "xrScriptEngine/ScriptExporter.hpp" |
6 | 7 | #include "xrScriptEngine/Functor.hpp" |
7 | 8 |
|
8 | 9 | using namespace luabind; |
9 | 10 |
|
10 | | -SCRIPT_EXPORT(CUIDialogWndEx, (CUIDialogWnd, IFactoryObject), { |
11 | | - module(luaState)[class_<CUIDialogWndEx, bases<CUIDialogWnd, IFactoryObject>>("CUIScriptWnd") |
12 | | - .def("OnKeyboard", &CUIDialogWndEx::OnKeyboardAction) |
13 | | - .def("Update", &CUIDialogWndEx::Update) |
14 | | - .def("Dispatch", &CUIDialogWndEx::Dispatch) |
15 | | - .def("AddCallback", (void (CUIDialogWndEx::*)(LPCSTR, s16, const functor<void>&, const object&)) & |
16 | | - CUIDialogWndEx::AddCallback) |
17 | | - .def("Register", (void (CUIDialogWndEx::*)(CUIWindow*, LPCSTR)) &CUIDialogWndEx::Register) |
18 | | - .def("Load", &CUIDialogWndEx::Load) |
19 | | - ]; |
| 11 | +extern export_class& script_register_ui_window1(export_class&); |
| 12 | +extern export_class& script_register_ui_window2(export_class&); |
| 13 | + |
| 14 | +SCRIPT_EXPORT(CUIDialogWndEx, (), { |
| 15 | + export_class instance("CUIScriptWnd"); |
| 16 | + |
| 17 | + module(luaState)[script_register_ui_window2(script_register_ui_window1(instance)).def("Load", &BaseType::Load)]; |
20 | 18 | }); |
21 | 19 |
|
| 20 | +export_class& script_register_ui_window1(export_class& instance) |
| 21 | +{ |
| 22 | + instance.def(constructor<>()) |
| 23 | + .def("AddCallback", (void (BaseType::*)(LPCSTR, s16, const luabind::functor<void>&, const luabind::object&)) & |
| 24 | + BaseType::AddCallback) |
| 25 | + .def("Register", (void (BaseType::*)(CUIWindow*, LPCSTR)) & BaseType::Register); |
| 26 | + return (instance); |
| 27 | +} |
0 commit comments