public Page3(PopupComponent pop) { this.pop = pop; InitializeComponent(); lbl.Text = "If you have any idea that you want to share with us, don't hesitate " + "to post it and let us know about it. In the About page you may find some contact information."; }
public void Apply(IEntity entity) { var uiComponent = new UIComponent { UIName = uiName, IsDynamic = true, UIType = UIType.UI_POPUP }; var popupComponent = new PopupComponent { Title = title, Message = message, Model = model, ModalColor = modelColor }; entity.AddComponents(uiComponent, popupComponent); entity.AddComponent <ViewComponent>(); }
public DatePicker() { InitializeComponent(); popup = new PopupComponent(datePickerPopup = new DatePickerPopup()); if (SystemInformation.IsComboBoxAnimationEnabled) { popup.ShowingAnimation = PopupAnimations.Slide | PopupAnimations.TopToBottom; popup.HidingAnimation = PopupAnimations.Slide | PopupAnimations.BottomToTop; } else { popup.ShowingAnimation = popup.HidingAnimation = PopupAnimations.None; } popup.Resizable = false; datePickerPopup.ChangeDate += new EventHandler(DatePickerPopup_ChangeDate); }
public static SimpleHUDWindow CreatePopup(string text, EventHandler onYesPressed, EventHandler onNoPressed) { SpriteFont font = content.Load <SpriteFont>(windowFontResource); SimpleHUDWindow popupWindow = new SimpleHUDWindow(font); PopupComponent popupComponent = new PopupComponent(font, content, text); popupComponent.RegisterYesEvent(onYesPressed); popupComponent.RegisterNoEvent(onNoPressed); //TODO: hardcoded popup size popupWindow.Size = new Vector2(330, 150); popupWindow.Position = new Vector2( (GameSettings.ScreenRectangle.Width - popupWindow.Size.X) / 2, (GameSettings.ScreenRectangle.Height - popupWindow.Size.Y) / 2); popupWindow.Component = popupComponent; popupWindow.BorderTexture = content.Load <Texture2D>(borderResource); return(popupWindow); }