public static bool ShowMessageBox(String message, string caption, MessageType messageType = MessageType.OK) { string wrappedMessage = TypeFacePrinter.InsertCRs(message, 350, 12); StyledMessageBox messageBox = new StyledMessageBox(wrappedMessage, caption, messageType, null, 400, 300); bool okClicked = false; messageBox.ClickedOk += (sender, e) => { okClicked = true; }; messageBox.ShowAsSystemWindow(); return(okClicked); }
public static bool ShowMessageBox(string message, string caption, GuiWidget[] extraWidgetsToAdd, MessageType messageType) { string wrappedMessage = TypeFacePrinter.InsertCRs(message, 300, 12); StyledMessageBox messageBox = new StyledMessageBox(wrappedMessage, caption, messageType, extraWidgetsToAdd, 400, 300); bool okClicked = false; messageBox.ClickedOk += (sender, e) => { okClicked = true; }; messageBox.ShowAsSystemWindow(); return(okClicked); }
public void AddTextField(string instructionsText, int pixelsFromLast) { GuiWidget spacer = new GuiWidget(10, pixelsFromLast); topToBottomControls.AddChild(spacer); string wrappedInstructions = TypeFacePrinter.InsertCRs(instructionsText, 400, 12); string wrappedInstructionsTabsToSpaces = wrappedInstructions.Replace("\t", " "); TextWidget instructionsWidget = new TextWidget(wrappedInstructionsTabsToSpaces, textColor: RGBA_Bytes.White); instructionsWidget.HAnchor = Agg.UI.HAnchor.ParentCenter; topToBottomControls.AddChild(instructionsWidget); }