18 protected int m_iCode = -1;
19 protected int m_iRestCode = -1;
20 protected int m_iApiCode = -1;
24 ref ScriptInvoker m_OnSuccess =
new ScriptInvoker;
25 ref ScriptInvoker m_OnFail =
new ScriptInvoker;
26 ref ScriptInvoker m_OnTimeOut =
new ScriptInvoker;
28 ref ScriptInvoker<ServerBrowserCallback> event_OnResponse =
new ScriptInvoker;
35 override void OnSuccess(
int code)
40 m_OnSuccess.Invoke(
this);
42 event_OnResponse.Invoke(
this);
46 override void OnError(
int code,
int restCode,
int apiCode)
49 m_OnFail.Invoke(
this, code, restCode, apiCode);
51 event_OnResponse.Invoke(
this);
58 m_OnTimeOut.Invoke(
this);
60 event_OnResponse.Invoke(
this);
75 m_iRestCode = restCode;
76 m_iApiCode = m_iApiCode;
114 protected array<Room> m_Rooms;
119 array<Room> rooms =
new array<Room>;
120 GetGame().GetBackendApi().GetClientLobby().Target(rooms);
123 if (rooms.Count() == 0)
126 Print(
"[ServerBrowserMenuCallback] No room found with given parameters!", LogLevel.ERROR);
135 super.OnSuccess(code);
139 void OnDirectJoinCallback()
146 array<Room> GetFoundRooms() {
return m_Rooms; }
153 protected Room m_Room;
156 void SetRoom(Room room)
175 super.OnSuccess(code);
178 Print(
"[ServerBrowserMenuCallback] OnJoinRoomSB Success");
183 override void OnError(
int code,
int restCode,
int apiCode)
185 super.OnError(code, restCode, apiCode);
188 Print(
"[ServerBrowserMenuCallback] OnJoinRoomSB Error");
198 Print(
"[ServerBrowserMenuCallback] OnJoinRoomSB Timeout");
207 string m_Password =
"";
227 if (!m_Password.IsEmpty())
228 StoreString(
"password", m_Password);
242 void SetPassword(
string password) { m_Password = password; }