public ViewScreenWindow(WindowController wc, int x, int y, int width, int height, int borderWidth, Texture2D windowTexture, Texture2D horzBorderTexture, Texture2D vertBorderTexture) : base(wc, x, y, width, height, borderWidth, windowTexture, horzBorderTexture, vertBorderTexture)
 {
     currentDisplay   = GameOptions.DisplayMode.blankView;
     galaxyViewWindow = new Rectangle(x, y, width, height);
     systemViewWindow = new Rectangle(x, y, width, height);
     baseViewWindow   = new Rectangle(x, y, width, height);
 }
        private int buttonClickedNum = -1; // -1 if nothing

        //use parent class constructor
        public MainControlWindow(WindowController wc, int x, int y, int width, int height, int borderWidth, Texture2D windowTexture, Texture2D horzBorderTexture, Texture2D vertBorderTexture) : base(wc, x, y, width, height, borderWidth, windowTexture, horzBorderTexture, vertBorderTexture)
        {
            buttons = new Rectangle[buttonArrayHeight * buttonArrayWidth];

            buttonWidth  = Window.Width / buttonArrayWidth;
            buttonHeight = Window.Height / buttonArrayHeight;

            for (int i = 0; i < buttonArrayWidth; i++)
            {
                for (int j = 0; j < buttonArrayHeight; j++)
                {
                    buttons[j * buttonArrayWidth + i] = new Rectangle(Window.X + i * buttonWidth, Window.Y + j * buttonHeight, buttonWidth, buttonHeight);
                }
            }
        }
Beispiel #3
0
        public DisplayWindow(WindowController wc, int x, int y, int width, int height, int borderWidth, Texture2D windowTexture, Texture2D horzBorderTexture, Texture2D vertBorderTexture)
        {
            windowRect = new Rectangle(x, y, width, height);
            topBorderRect = new Rectangle(x-(int)borderWidth, y-borderWidth, width + borderWidth*2, borderWidth);
            leftBorderRect = new Rectangle(x-borderWidth, y, borderWidth, height);
            rightBorderRect = new Rectangle(x + width, y, borderWidth, height);
            bottomBorderRect = new Rectangle(x - (int)borderWidth, y + height, width + borderWidth*2, borderWidth);

            windowTex = windowTexture;
            horzBorderTex = horzBorderTexture;
            vertBorderTex = vertBorderTexture;
            hoverColor = Color.White;
            backgroundColor = new Color(127, 51, 0);
            defaultBackgroundColor = backgroundColor;

            winCon = wc;
        }
Beispiel #4
0
 public DetailListWindow(WindowController wc, int x, int y, int width, int height, int borderWidth, Texture2D windowTexture, Texture2D horzBorderTexture, Texture2D vertBorderTexture) : base(wc, x, y, width, height, borderWidth, windowTexture, horzBorderTexture, vertBorderTexture)
 {
     base.backgroundColor = Color.Black;
 }