sources/interface.cpp

changeset 28
3cc042af3090
parent 27
089e37c0887e
child 29
e534f2f78196
equal deleted inserted replaced
27:089e37c0887e 28:3cc042af3090
287 String text; 287 String text;
288 RCONSession* session = RCONSession::get_session(); 288 RCONSession* session = RCONSession::get_session();
289 289
290 if (session == nullptr) 290 if (session == nullptr)
291 { 291 {
292 text = "[DISCONNECTED]"; 292 text = "";
293 } 293 }
294 else 294 else
295 { 295 {
296 switch (session->state()) 296 switch (session->state())
297 { 297 {
298 case RCON_DISCONNECTED: 298 case RCON_DISCONNECTED:
299 text = "[DISCONNECTED]"; 299 text = "Disconnected.";
300 break; 300 break;
301 301
302 case RCON_CONNECTING: 302 case RCON_CONNECTING:
303 case RCON_AUTHENTICATING: 303 case RCON_AUTHENTICATING:
304 text = "Connecting to " + session->address().to_string (IP_WITH_PORT) + "..."; 304 text = "Connecting to " + session->address().to_string (IP_WITH_PORT) + "...";
317 session->level(), adminText); 317 session->level(), adminText);
318 } 318 }
319 break; 319 break;
320 } 320 }
321 } 321 }
322
323 if (not text.is_empty())
324 text += " | ";
325
326 text += "^N to connect, ^Q to quit";
322 327
323 if (text != g_statusBarText) 328 if (text != g_statusBarText)
324 { 329 {
325 g_statusBarText = text; 330 g_statusBarText = text;
326 g_needStatusBarRender = true; 331 g_needStatusBarRender = true;

mercurial