Example #1
0
        //----------------------------------------------------------------------
        public MessagePopup(IMenuManager _manager)
            : base(_manager)
        {
            TitleLabel              = new Label(Screen, "", Anchor.Start);
            TitleLabel.Font         = Screen.Style.LargeFont;
            TitleLabel.AnchoredRect = AnchoredRect.CreateTopAnchored(0, 0, 0, Screen.Style.DefaultButtonHeight);
            AddChild(TitleLabel);

            {
                mSpinningWheel = new SpinningWheel(Screen, Screen.Style.SpinningWheel);
                mSpinningWheel.AnchoredRect = AnchoredRect.CreateCentered(mSpinningWheel.ContentWidth, mSpinningWheel.ContentHeight);

                // Message label
                ContentGroup = new Group(Screen);
                ContentGroup.AnchoredRect = AnchoredRect.CreateFull(0, Screen.Style.DefaultButtonHeight + 10, 0, Screen.Style.DefaultButtonHeight + 10);
                AddChild(ContentGroup);

                MessageLabel          = new Label(Screen, "", Anchor.Start);
                MessageLabel.WrapText = true;

                // Actions
                mActionsGroup = new BoxGroup(Screen, Orientation.Horizontal, 0, Anchor.End);
                mActionsGroup.AnchoredRect = AnchoredRect.CreateBottomAnchored(0, 0, 0, Screen.Style.DefaultButtonHeight);

                AddChild(mActionsGroup);

                // Close / Cancel
                mCloseButton = new Button(Screen, i18n.Common.Close);
                mCloseButton.ClickHandler = delegate { Dismiss(); };

                // Confirm
                mConfirmButton = new Button(Screen, i18n.Common.Confirm);
                mConfirmButton.ClickHandler = delegate { Confirm(); };
                mActionsGroup.AddChild(mConfirmButton);
            }
        }
Example #2
0
 //----------------------------------------------------------------------
 public Widget( Screen _screen, AnchoredRect _anchoredRect )
 {
     Screen = _screen;
     AnchoredRect = _anchoredRect;
 }
Example #3
0
 //----------------------------------------------------------------------
 public Popup(T _manager)
     : base(_manager.PopupScreen, _manager.PopupScreen.Style.PopupFrame, _manager.PopupScreen.Style.PopupFrameCornerSize)
 {
     Manager      = _manager;
     AnchoredRect = AnchoredRect.CreateCentered(DefaultSize.X, DefaultSize.Y);
 }
Example #4
0
 //----------------------------------------------------------------------
 public Widget(Screen _screen, AnchoredRect _anchoredRect)
 {
     Screen       = _screen;
     AnchoredRect = _anchoredRect;
 }