- if(me.dialogToShow)
- {
- DialogOpenButton_Click_withCoords(NULL, me.dialogToShow, '0 0 0', eX * conwidth + eY * conheight);
- me.dialogToShow = NULL;
- }
-
- //-------------------------------------
- // Part of Disconnect Dialog button:
- // In case of this function is recalling every time, need to use condition of visibility
-
- if (me.disconnectDialogVisibility && !(gamestatus & (GAME_ISSERVER | GAME_CONNECTED)))
- {
- // If gamestate is not "ingame" (and it is a first "frame" of drawing (or dialog is visible)),
- // disconnect button is unnecessary, remove it
- me.removeItem(me.mainNexposee, me.disconnectDialog);
- me.disconnectDialogVisibility = 0;
-
- } else if(!me.disconnectDialogVisibility && (gamestatus & (GAME_ISSERVER | GAME_CONNECTED))) {
+ if (me.firstDraw) {
+ if (me.ToSDialog.shouldShow())
+ {
+ me.ToSDialog.loadXonoticToS(me.ToSDialog);
+ DialogOpenButton_Click_withCoords(NULL, me.ToSDialog, '0 0 0', eX * conwidth + eY * conheight);
+ }
+ else if(me.firstRunDialog.shouldShow())
+ DialogOpenButton_Click_withCoords(NULL, me.firstRunDialog, '0 0 0', eX * conwidth + eY * conheight);