Exemplo n.º 1
0
        /// <summary>
        /// Sets up the frame for the tactile user interface output.
        /// </summary>
        private void setUpTui()
        {
            if (io != null)
            {
                // get the current active Adapter and get its dimensions
                // this is necessary to create content regions in correct size
                int width  = 120;
                int height = 60;

                // get the dimensions of the current active devices' display area
                getActiveAdapterDimensions(ref width, ref height);

                // create the main screen - a container for content regions
                gameScreen = new GameScreen(ll, width, height);

                startScreen = new StartScreen(ll, width, height);

                mainMenuScreen  = new MenuScreen("MainMenu", mainMenuModel, 2, 2, width - 4, 8);
                pauseMenuScreen = new MenuScreen("PauseMenu", pauseMenuModel, 2, 2, width - 4, 8);
                saveMenuScreen  = new MenuScreen("SaveMenu", saveMenuModel, 2, 2, width - 4, 8);
                loadMenuScreen  = new MenuScreen("LoadMenu", loadMenuModel, 2, 2, width - 4, 8);
                questionScreen  = new MenuScreen("QuestionMenu", null, 0, 0, width, 13);

                gameScreen.Register();
                startScreen.Register();
                mainMenuScreen.Register();
                saveMenuScreen.Register();
                loadMenuScreen.Register();
                pauseMenuScreen.Register();
                questionScreen.Register();
            }
        }