ATTRIB(Dialog, zoomedOutTitleBarPosition, float, 0)
ATTRIB(Dialog, zoomedOutTitleBar, float, 0)
+ ATTRIB(Dialog, requiresConnection, float, 0) // set to TRUE if the dialog requires a connection to be opened
+
ATTRIB(Dialog, backgroundImage, string, string_null)
ATTRIB(Dialog, borderLines, float, 1)
ATTRIB(Dialog, closeButtonImage, string, string_null)
for(e = NULL; (e = find(e, name, itemname)); )
if(e.classname != "vtbl")
break;
- if(e)
+
+ if((e) && (!e.requiresConnection || (gamestatus & (GAME_ISSERVER | GAME_CONNECTED))))
{
m_hide();
m_activate_window(e);
ATTRIB(XonoticTeamSelectDialog, team2, entity, NULL)
ATTRIB(XonoticTeamSelectDialog, team3, entity, NULL)
ATTRIB(XonoticTeamSelectDialog, team4, entity, NULL)
+ ATTRIB(XonoticTeamSelectDialog, requiresConnection, float, TRUE)
ENDCLASS(XonoticTeamSelectDialog)
#endif