/// <summary> /// Turns modal to a message box with the specified color. /// </summary> /// <param name="modalBase">The modal instance that this method extends.</param> /// <param name="color">The color of the modal.</param> /// <returns>Current component.</returns> public static ModalBase Message(this ModalBase modalBase, BootstrapColorBase color) { modalBase.AddCssClass("modal-message"); modalBase.AddCssClass(string.Format("{0}-{1}", modalBase.GetBaseClass(), color)); return(modalBase); }
private void SelectedCallback(int level) { Context.Get <GameController>().PlaySpecificLevel(level); if (_modalBase == null) { _modalBase = GetComponentInParent <ModalBase>(); } _modalBase.Close(); }
public static GenericAssertions <ModalBase> ExpectTo(this ModalBase input) { return(ExpectTo(new SingleItemAssertable <ModalBase>(input))); }
/// <summary> /// Adds content to the modal. /// </summary> /// <param name="modalBase">The modal instance that this method extends.</param> /// <param name="content">The value of the content.</param> /// <returns>Current component.</returns> public static ModalBase Body(this ModalBase modalBase, Func <object, HelperResult> content) { modalBase.AddChild(content); return(modalBase); }
/// <summary> /// Adds content to the modal. /// </summary> /// <param name="modalBase">The modal instance that this method extends.</param> /// <param name="content">The value of the content.</param> /// <returns>Current component.</returns> public static ModalBase Body(this ModalBase modalBase, string content) { modalBase.AddChild(content); return(modalBase); }