//---------------------------------------------------------------------- public clsXWCommandPopup(IMenuManager _manager) : base(_manager) { TitleLabel = new Label(Screen, "", Anchor.Start); TitleLabel.Font = Screen.Style.MediumFont; TitleLabel.AnchoredRect = AnchoredRect.CreateTopAnchored(0, 0, 0, Screen.Style.DefaultButtonHeight); AddChild(TitleLabel); { ContentGroup = new Group(Screen); ContentGroup.AnchoredRect = AnchoredRect.CreateFull(0, 60, 0, 80); AddChild(ContentGroup); MessageLabel = new Label(Screen, "MessageLabel", Anchor.Start); MessageLabel.WrapText = true; MessageLabel.Font = Screen.Style.SmallFont; // 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, NuclearWinter.i18n.Common.Close); mCloseButton.ClickHandler = delegate { Dismiss(); }; mCloseButton.BindPadButton(Buttons.A); //*/ } }
//---------------------------------------------------------------------- public Screen( NuclearWinter.NuclearGame _game, Style _style, int _iWidth, int _iHeight ) { Game = _game; Style = _style; Width = _iWidth; Height = _iHeight; Root = new Group( this ); }
//---------------------------------------------------------------------- public NotebookTab( Notebook _notebook, string _strText, Texture2D _iconTex ) : base(_notebook.Screen) { mNotebook = _notebook; Parent = _notebook; mLabel = new Label( Screen, "", Anchor.Start, Screen.Style.DefaultTextColor ); mIcon = new Image( Screen, _iconTex ); mTooltip = new Tooltip( Screen, "" ); mCloseButton = new Button( Screen, new Button.ButtonStyle( 5, null, null, Screen.Style.NotebookTabCloseHover, Screen.Style.NotebookTabCloseDown, null, 0, 0 ), "", Screen.Style.NotebookTabClose, Anchor.Center ); mCloseButton.Parent = this; mCloseButton.Padding = new Box(0); mCloseButton.ClickHandler = delegate { mNotebook.Tabs.Remove( this ); Screen.Focus( mNotebook ); if( mNotebook.TabClosedHandler != null ) { mNotebook.TabClosedHandler( this ); } }; Text = _strText; PageGroup = new Group( Screen ); PageGroup.Parent = this; }