66#include " UILabel.h"
77#include " UIMMShniaga.h"
88#include " UISleepStatic.h"
9+ #include " ServerList.h"
10+ #include " UIMapInfo.h"
11+ #include " xrUICore/ComboBox/UIComboBox.h"
12+ #include " UIMapList.h"
913#include " ScriptXMLInit.h"
1014#include " xrScriptEngine/ScriptExporter.hpp"
1115
@@ -14,9 +18,12 @@ using namespace luabind::policy;
1418
1519// clang-format off
1620SCRIPT_EXPORT (CDialogHolder, (), {
17- module (luaState)[class_<CDialogHolder>(" CDialogHolder" )
18- .def (" AddDialogToRender" , &CDialogHolder::AddDialogToRender)
19- .def (" RemoveDialogToRender" , &CDialogHolder::RemoveDialogToRender)];
21+ module (luaState)
22+ [
23+ class_<CDialogHolder>(" CDialogHolder" )
24+ .def (" AddDialogToRender" , &CDialogHolder::AddDialogToRender)
25+ .def (" RemoveDialogToRender" , &CDialogHolder::RemoveDialogToRender)
26+ ];
2027});
2128
2229SCRIPT_EXPORT (CUIDialogWnd, (CUIWindow), {
@@ -59,4 +66,87 @@ SCRIPT_EXPORT(CUIMMShniaga, (CUIWindow), {
5966
6067SCRIPT_EXPORT (CUISleepStatic, (CUIStatic),
6168 { module (luaState)[class_<CUISleepStatic, CUIStatic>(" CUISleepStatic" ).def (constructor<>())]; });
69+
70+ SCRIPT_EXPORT (SServerFilters, (), {
71+ module (luaState)
72+ [
73+ class_<SServerFilters>(" SServerFilters" )
74+ .def (constructor<>())
75+ .def_readwrite (" empty" , &SServerFilters::empty)
76+ .def_readwrite (" full" , &SServerFilters::full)
77+ .def_readwrite (" with_pass" , &SServerFilters::with_pass)
78+ .def_readwrite (" without_pass" , &SServerFilters::without_pass)
79+ .def_readwrite (" without_ff" , &SServerFilters::without_ff)
80+ .def_readwrite (" listen_servers" , &SServerFilters::listen_servers)
81+ ];
82+ });
83+
84+ SCRIPT_EXPORT (connect_error_cb, (), {
85+ module (luaState)
86+ [
87+ class_<connect_error_cb>(" connect_error_cb" )
88+ .def (constructor<>())
89+ .def (constructor<connect_error_cb::lua_object_type, connect_error_cb::lua_function_type>())
90+ .def (" bind" , &connect_error_cb::bind)
91+ .def (" clear" , &connect_error_cb::clear)
92+ ];
93+ });
94+
95+ SCRIPT_EXPORT (CServerList, (CUIWindow), {
96+ module (luaState)
97+ [
98+ class_<CServerList, CUIWindow>(" CServerList" )
99+ .def (constructor<>())
100+ .enum_ (" enum_connect_errcode" )
101+ [
102+ value (" ece_unique_nick_not_registred" , int (ece_unique_nick_not_registred)),
103+ value (" ece_unique_nick_expired" , int (ece_unique_nick_expired))
104+ ]
105+ .def (" SetConnectionErrCb" , &CServerList::SetConnectionErrCb)
106+ .def (" ConnectToSelected" , &CServerList::ConnectToSelected)
107+ .def (" SetFilters" , &CServerList::SetFilters)
108+ .def (" SetPlayerName" , &CServerList::SetPlayerName)
109+ .def (" RefreshList" , &CServerList::RefreshGameSpyList)
110+ .def (" RefreshQuick" , &CServerList::RefreshQuick)
111+ .def (" ShowServerInfo" , &CServerList::ShowServerInfo)
112+ .def (" NetRadioChanged" , &CServerList::NetRadioChanged)
113+ .def (" SetSortFunc" , &CServerList::SetSortFunc)
114+ ];
115+ });
116+
117+ SCRIPT_EXPORT (CUIMapList, (CUIWindow), {
118+ module (luaState)[class_<CUIMapList, CUIWindow>(" CUIMapList" )
119+ .def (constructor<>())
120+ .def (" SetWeatherSelector" , &CUIMapList::SetWeatherSelector)
121+ .def (" SetModeSelector" , &CUIMapList::SetModeSelector)
122+ .def (" OnModeChange" , &CUIMapList::OnModeChange)
123+ .def (" LoadMapList" , &CUIMapList::LoadMapList)
124+ .def (" SaveMapList" , &CUIMapList::SaveMapList)
125+ .def (" GetCommandLine" , &CUIMapList::GetCommandLine)
126+ .def (" SetServerParams" , &CUIMapList::SetServerParams)
127+ .def (" GetCurGameType" , &CUIMapList::GetCurGameType)
128+ .def (" StartDedicatedServer" , &CUIMapList::StartDedicatedServer)
129+ .def (" SetMapPic" , &CUIMapList::SetMapPic)
130+ .def (" SetMapInfo" , &CUIMapList::SetMapInfo)
131+ .def (" ClearList" , &CUIMapList::ClearList)
132+ .def (" IsEmpty" , &CUIMapList::IsEmpty)];
133+ });
134+
135+ SCRIPT_EXPORT (EnumGameIDs, (), {
136+ class EnumGameIDs
137+ {
138+ };
139+ module (luaState)
140+ [
141+ class_<EnumGameIDs>(" GAME_TYPE" )
142+ .enum_ (" gametype" )
143+ [
144+ value (" GAME_UNKNOWN" , int (-1 )),
145+ value (" eGameIDDeathmatch" , int (eGameIDDeathmatch)),
146+ value (" eGameIDTeamDeathmatch" , int (eGameIDTeamDeathmatch)),
147+ value (" eGameIDArtefactHunt" , int (eGameIDArtefactHunt)),
148+ value (" eGameIDCaptureTheArtefact" , int (eGameIDCaptureTheArtefact))
149+ ]
150+ ];
151+ });
62152// clang-format on
0 commit comments