private void initializeWindows()
        {
            int fullWidth       = GameOptions.screenWidth;
            int fullHeight      = GameOptions.screenHeight;
            int outerHorzBorder = (int)fullWidth * 2 / 100;
            int innerHorzBorder = (int)fullWidth * 2 / 100;
            int outerVertBorder = (int)fullHeight * 2 / 100;
            int innerVertBorder = (int)fullHeight * 3 / 100;

            int borderWidth = horzBorderTex.Height;

            winCon = new WindowController();

            //Setup the size and position of the windows correctly
            viewScreen   = new ViewScreenWindow(winCon, outerHorzBorder, outerVertBorder, (int)fullWidth * 54 / 100, (int)fullHeight * 59 / 100, borderWidth, blankTex, horzBorderTex, vertBorderTex);
            detailList   = new DetailListWindow(winCon, outerHorzBorder + viewScreen.Width + innerHorzBorder, outerVertBorder, (int)fullWidth * 40 / 100, (int)fullHeight * 59 / 100, borderWidth, blankTex, horzBorderTex, vertBorderTex);
            scheduleList = new ScheduleListWindow(winCon, outerHorzBorder, outerVertBorder + viewScreen.Height + innerVertBorder, (int)fullWidth * 54 / 100, (int)fullHeight * 35 / 100, borderWidth, blankTex, horzBorderTex, vertBorderTex);
            mainControls = new MainControlWindow(winCon, outerHorzBorder + viewScreen.Width + innerHorzBorder, outerVertBorder + viewScreen.Height + innerVertBorder, (int)fullWidth * 40 / 100, (int)fullHeight * 35 / 100, borderWidth, blankTex, horzBorderTex, vertBorderTex);

            //Set up list to cycle through for input commands
            displayWindows = new List <DisplayWindow>();
            displayWindows.Add(viewScreen);
            displayWindows.Add(detailList);
            displayWindows.Add(scheduleList);
            displayWindows.Add(mainControls);

            previousState = Keyboard.GetState();
        }
Esempio n. 2
0
 public void Initialize(ViewScreenWindow vs, ScheduleListWindow sl, DetailListWindow dl, MainControlWindow mc)
 {
     viewScreen   = vs;
     scheduleList = sl;
     detailList   = dl;
     mainControl  = mc;
 }