public MapWarehouseGuiScreen(InputHandler Input)
            : base(Input, true, true, true, false)
        {
            _modeBox           = new ComboBox(Input);
            _modeBox.IsFocused = true;
            _modeBox.X         = 160;
            _modeBox.Y         = 10;
            _modeBox.Items.Add(Art.GRAPHICS[23, 19]);
            _modeBox.Items.Add(Art.GRAPHICS[24, 19]);
            _modeBox.Items.Add(Art.GRAPHICS[25, 19]);
            Controls.Add(_modeBox);

            Label temp = new Label(Input);

            temp.Text = "Search map";
            temp.X    = 300;
            temp.Y    = 25;
            Controls.Add(temp);

            _searchBox           = new TextBox(Input);
            _searchBox           = new TextBox(Input);
            _searchBox.X         = 390;
            _searchBox.Y         = 25;
            _searchBox.MaxLength = 16;
            Controls.Add(_searchBox);

            _mapBox           = new SelectableGrid(Input, 10, 65, 150);
            _mapBox.IsFocused = false;
            _mapBox.SetBorder(3);
            _mapBox.SetItemDimension(150, 150);

            ThreadPool.QueueUserWorkItem(_init);
        }
        public void InitLevelList()
        {
            Controls.Clear();

            Selector = new SelectableGrid(Input, 100, 60, 4);
            Selector.SetX(100);
            Selector.SetY(60);
            Selector.SetBorder(3);
            Selector.SetItemDimension(100, 100);

            LevelManager manager = new LevelManager();

            for (int i = 0; i < manager.GetLevelsAmount(GameLevel.GetMode()); ++i)
            {
                string  name      = manager.GetLevelName(GameLevel.GetMode(), i);
                GBitmap thumbnail = LevelGen.CreateThumbnail(manager.GetLevelStream(GameLevel.GetMode(), i));
                Selector.Push(new GridItem(manager.ParseName(GameLevel.GetMode(), name), thumbnail));
            }

            Controls.Add(Selector);
        }
示例#3
0
        internal void _initToolbox()
        {
            _toolBox          = new SelectableGrid(Input, 0, GameComponent.GetScreenHeight() - 55, 500);
            _toolBox.Selected = -1;
            _toolBox.SetItemDimension(30, 30);
            GridItem item = new GridItem("1", Art.GRAPHICS[0, 2]);

            _toolBox.Push(item);

            item = new GridItem("2", Art.GRAPHICS[0, 4]);
            _toolBox.Push(item);

            item = new GridItem("3", Art.GRAPHICS[0, 6]);
            _toolBox.Push(item);

            item = new GridItem("4", Art.GRAPHICS[0, 5]);
            _toolBox.Push(item);

            item = new GridItem("5", Art.GRAPHICS[0, 3]);
            _toolBox.Push(item);

            item = new GridItem("6", Art.GRAPHICS[1, 4]);
            _toolBox.Push(item);

            item = new GridItem("7", Art.GRAPHICS[3, 18]);
            _toolBox.Push(item);

            item = new GridItem("8", Art.GRAPHICS[2, 18]);
            _toolBox.Push(item);

            item = new GridItem("9", Art.GRAPHICS[5, 18]);
            _toolBox.Push(item);

            item = new GridItem("0", Art.GRAPHICS[4, 18]);
            _toolBox.Push(item);
        }