Example #1
0
        // c'tor
        public OldLoadLevelMenu()
        {
            OldLoadLevelMenu.Instance = this;

            shared = new Shared(this);

            // Create the RenderObject and UpdateObject parts of this mode.
            updateObj = new UpdateObj(this, shared);
            renderObj = new RenderObj(shared);

            Init();
        }   // end of LoadLevelMenu c'tor
Example #2
0
            // c'tor
            public Shared(OldLoadLevelMenu parent)
            {
                this.parent = parent;
                GraphicsDevice device = BokuGame.bokuGame.GraphicsDevice;

                // Create grids for each tabbed page.
                UIGridWorldTile.SharedRenderTarget.ResetAll();
                missionsGrid      = CreateGrid(BokuGame.Settings.MediaPath + @"Xml\Levels" + @"\" + missionsPath, @"*.Xml");
                myWorldsGrid      = CreateGrid(BokuGame.Settings.MediaPath + @"Xml\Levels" + @"\" + myWorldsPath, @"*.Xml");
                starterWorldsGrid = CreateGrid(BokuGame.Settings.MediaPath + @"Xml\Levels" + @"\" + starterWorldsPath, @"*.Xml");
                downloadsGrid     = CreateGrid(BokuGame.Settings.MediaPath + @"Xml\Levels" + @"\" + downloadsPath, @"*.Xml");

                // Create tabs.
                // Create text elements.
                // Start with a blob of common parameters.
                UIGridElement.ParamBlob blob = new UIGridElement.ParamBlob();
                blob.width            = 2.0f;
                blob.height           = 0.5f;
                blob.edgeSize         = 0.25f;
                blob.font             = BokuGame.fontBerlinSansFBDemiBold24;
                blob.textColor        = Color.White;
                blob.dropShadowColor  = Color.Black;
                blob.useDropShadow    = true;
                blob.invertDropShadow = false;
                blob.normalMapName    = @"QuarterRoundNormalMap";
                blob.justify          = UIGrid2DTextElement.Justification.Center;

                blob.selectedColor   = selectedColor;
                blob.unselectedColor = unselectedColor;
                missionsTab          = new UIGrid2DTextElement(blob, Strings.Instance.loadLevelMenu.missionsTab);
                missionsTab.Position = new Vector3(-3.75f, 3.25f, 0.0f);

                float offset = 0.0f;

#if HIDE_MISSIONS
                // Provide offset to center remaining tabs.
                offset = -0.75f;
#endif

                blob.selectedColor   = selectedColor;
                blob.unselectedColor = unselectedColor;
                myWorldsTab          = new UIGrid2DTextElement(blob, Strings.Instance.loadLevelMenu.myWorldsTab);
                myWorldsTab.Position = new Vector3(-1.25f + offset, 3.25f, 0.0f);

                blob.selectedColor        = selectedColor;
                blob.unselectedColor      = unselectedColor;
                starterWorldsTab          = new UIGrid2DTextElement(blob, Strings.Instance.loadLevelMenu.starterWorldsTab);
                starterWorldsTab.Position = new Vector3(1.25f + offset, 3.25f, 0.0f);

                blob.selectedColor    = selectedColor;
                blob.unselectedColor  = unselectedColor;
                downloadsTab          = new UIGrid2DTextElement(blob, Strings.Instance.loadLevelMenu.downloadsTab);
                downloadsTab.Position = new Vector3(3.75f + offset, 3.25f, 0.0f);

                // Create the backdrop.

                // And the bottom bar.
                bottomBar               = new UIGrid2DTextElement(8.5f, 0.5f, 0.25f, @"QuarterRoundNormalMap", selectedColor, @"", BokuGame.fontBerlinSansFBDemiBold20, UIGrid2DTextElement.Justification.Center, Color.White, Color.Black, false);
                bottomBar.Position      = new Vector3(0.5f, -3.35f, 0.0f);
                bottomBar.SpecularColor = Color.Gray;
            }   // end of Shared c'tor
Example #3
0
 public UpdateObj(OldLoadLevelMenu parent, Shared shared)
 {
     this.parent = parent;
     this.shared = shared;
 }