|
2 | 2 |
|
3 | 3 | // UI-controls |
4 | 4 | #include "UIScriptWnd.h" |
5 | | -#include "uiscriptwnd_script.h" |
6 | 5 | #include "xrScriptEngine/ScriptExporter.hpp" |
7 | 6 | #include "xrScriptEngine/Functor.hpp" |
8 | 7 |
|
9 | 8 | using namespace luabind; |
10 | 9 |
|
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)]; |
| 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 | + ]; |
18 | 20 | }); |
19 | 21 |
|
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