Inheritance: Window, IInputReceiver
        public AdvancedShapeCollectionLoadingWindow(Cursor cursor, MultiButtonMessageBox mbmb, TypesToLoad typesToLoad) : base(cursor)
        {
            this.AddWindow(mbmb);

            this.ScaleX = mbmb.ScaleX + 12.5f;
            mbmb.DrawBorders = false;
            mbmb.X = mbmb.ScaleX;

            mbmb.RemoveButton(mbmb.GetButton("Advanced >>"));
            // Maybe one day we want to allow the user to go back to the 
            // basic view?  It's a pain, so I won't do that now

            mbmb.Y = mbmb.ScaleY;
            this.ScaleY = mbmb.ScaleY + 1;


            //Button cancelButton = mbmb.GetButton("Cancel");
            //mbmb.RemoveButton(cancelButton);
            mbmb.HasMoveBar = false;
            mbmb.HasCloseButton = false;
            this.HasMoveBar = true;

            //mbmb.AddButton(cancelButton);

            TextDisplay textDisplay = new TextDisplay(cursor);
            textDisplay.Text = "Offset";
            this.AddWindow(textDisplay);
            textDisplay.X = mbmb.ScaleX * 2;
            textDisplay.Y = 1;

            offsetWindow = new Vector3Display(cursor);
            this.AddWindow(offsetWindow);
            offsetWindow.X = mbmb.ScaleX * 2 + offsetWindow.ScaleX ;
            offsetWindow.Y = offsetWindow.ScaleY + 2;

            mbmb.Closing += new GuiMessage(CloseThis);
            this.Name = "";

            PropertyGrid<TypesToLoad> propertyGrid = new PropertyGrid<TypesToLoad>(cursor);
            propertyGrid.ObjectDisplaying = typesToLoad;
            propertyGrid.HasMoveBar = false;
            propertyGrid.HasCloseButton = false;

            this.AddWindow(propertyGrid);
            propertyGrid.X = mbmb.ScaleX * 2 + propertyGrid.ScaleX - 1; // subtract 1 because we're not going to show the frames
            propertyGrid.Y = propertyGrid.ScaleY + 2 + offsetWindow.ScaleY * 2 + .5f;

            propertyGrid.DrawBorders = false;

        }
Exemplo n.º 2
0
        public Vector3OkWindow(Cursor cursor)
            : base(cursor)
        {
            this.ScaleX = 6.5f;
            this.ScaleY = 6.0f;
            HasMoveBar = true;
            HasCloseButton = true;

            mVector3Display = new Vector3Display(cursor);
            this.AddWindow(mVector3Display);
            mVector3Display.Y = .5f + mVector3Display.ScaleY;

            this.Closing += GuiManager.RemoveWindow;

            Button okButton = new Button(mCursor);
            AddWindow(okButton);
            const float border = .5f;
            okButton.Y = this.ScaleY * 2 - okButton.ScaleY - border;
            okButton.ScaleX = 3;
            okButton.Text = "Ok";
            okButton.Click += ShiftSceneOk;
        }