public void Dialog(string message, bool isSuccessful, string title) { DialogMessage.Text = message; DialogTitle.Text = title; DialogBox.Visible = true; DialogBox.Focus(); if (isSuccessful) { DialogBox.CssClass = "success"; } else { DialogBox.CssClass = ""; } if (title == "") { if (isSuccessful) { DialogTitle.Text = "Successful"; } else { DialogTitle.Text = "Error"; } } DialogBoxPanel.Update(); }
/* * void Update(){ * if (showingDialogBox || eventQueue.Count == 0) * return; * showEvent (); * } */ private void showEvent() { showingDialogBox = true; dialogEvent theEvent = currentEvent;// eventQueue [0]; currentCallback = theEvent.callback; currentPanel = theEvent.eventType == DialogBoxType.GameState ? gameOverPanel : regularPanel; currentPanel.showPanel(theEvent.buttonText, theEvent.infoText, theEvent.infoSize, theEvent.buttonTextSize); //eventQueue.RemoveAt (0); }