public RoomSettings(Engine engine)
            : base("Room Settings")
        {
            NewSize = new Vector3(engine.room.Width, engine.room.Depth, engine.room.Height);

            AddCloseButton(engine);

            AddText("Use these buttons to resize the map. Left click extends a border, right click retracts the border.", engine.FontMain);
            DisplayText = new ScreenText(this, "#", engine.FontMain);
            UpdateText();
            AddElement(DisplayText);
            AddElement(new ScreenButton(this, "Update Room", engine.FontMain));

            Vector2 _tl = new Vector2(Screen.boarderSize, GetTotalElementHeight());
            Vector2 _sz = new Vector2(32, 32);
            Vector2 _left = new Vector2(32, 0);
            Vector2 _down = new Vector2(0, 32);
            ScreenPictureButton BTop = new ScreenPictureButton(this, "Up Border", engine.textureManager.Dic["uparrow"], _tl + _left, _sz);
            ScreenPictureButton BLeft = new ScreenPictureButton(this, "Left Border", engine.textureManager.Dic["leftarrow"], _tl + _down, _sz);
            ScreenPictureButton BRight = new ScreenPictureButton(this, "Right Border", engine.textureManager.Dic["rightarrow"], _tl + _down + _left * 2, _sz);
            ScreenPictureButton BFront = new ScreenPictureButton(this, "Down Border", engine.textureManager.Dic["downarrow"], _tl + _down + _left, _sz);
            this.AddElement(BTop);
            this.AddElement(BLeft);
            this.AddElement(BRight);
            this.AddElement(BFront);
            ScreenPictureButton BBack = new ScreenPictureButton(this, "ZUp", engine.textureManager.Dic["uparrow"], _tl + _left * 4, _sz);
            ScreenPictureButton BBottom = new ScreenPictureButton(this, "ZDown", engine.textureManager.Dic["downarrow"], _tl + _down + _left * 4, _sz);
            this.AddElement(BBack);
            this.AddElement(BBottom);

            AddCloseButton(engine);
        }
        public LevelEditor(Engine engine)
            : base("Editor")
        {
            this.Size = new Vector2(Screen.boarderSize * 4 + 32);
            CameraButton = new ScreenPictureButton(this, "Toggle Camera", engine.textureManager.Dic["camera_button"]);
            this.AddElement(CameraButton);
            StackButton = new ScreenPictureButton(this, "Toggle Block Stacking", engine.textureManager.Dic["stack_on_button"]);
            this.AddElement(StackButton);
            this.AddElement(new ScreenPictureButton(this, "Save Layout", engine.textureManager.Dic["save_button"]));
            this.AddElement(new ScreenPictureButton(this, "Load Layout", engine.textureManager.Dic["open_button"]));
            this.AddElement(new ScreenPictureButton(this, "Open Directory", engine.textureManager.Dic["dir_button"]));
            this.AddElement(new ScreenPictureButton(this, "Room Settings", engine.textureManager.Dic["room_settings"]));
            ShowNullButton = new ScreenPictureButton(this, "Toggle Show Null", engine.textureManager.Dic["show_null"]);
            this.AddElement(ShowNullButton);
            this.AddElement(new ScreenPictureButton(this, "Light Settings", engine.textureManager.Dic["light_button"]));
            this.Position = Vector2.Zero;
            blockSelector = new BlockPlacer(engine, this);
            engine.screenManager.AddScreen(blockSelector);

            engine.camera.Set(engine, CameraSetting.Free);
            this.PreformAction(engine, "Reset Camera");
        }
        private void SetUpScreen(Engine engine)
        {
            this.Size.X = 320;
            this.AddCloseButton(engine);
            this.DemandPriority = true;

            Vector2 _tl = new Vector2(Screen.boarderSize, Screen.boarderSize + Screen.headerSize);
            Vector2 _sz = new Vector2(32, 32);
            Vector2 _left = new Vector2(32, 0);
            Vector2 _down = new Vector2(0, 32);
            BBack = new ScreenPictureButton(this, "Set Back", engine.textureManager.Dic["backarrow"], _tl, _sz);
            BTop = new ScreenPictureButton(this, "Set Top", engine.textureManager.Dic["uparrow"], _tl + _left, _sz);
            BLeft = new ScreenPictureButton(this, "Set Left", engine.textureManager.Dic["leftarrow"], _tl + _down, _sz);
            BRight = new ScreenPictureButton(this, "Set Right", engine.textureManager.Dic["rightarrow"], _tl + _down + _left * 2, _sz);
            BFront = new ScreenPictureButton(this, "Set Front", engine.textureManager.Dic["frontarrow"], _tl + _down + _left, _sz);
            BBottom = new ScreenPictureButton(this, "Set Bottom", engine.textureManager.Dic["downarrow"], _tl + _down * 2 + _left, _sz);
            this.AddElement(BBack);
            this.AddElement(BTop);
            this.AddElement(BLeft);
            this.AddElement(BRight);
            this.AddElement(BFront);
            this.AddElement(BBottom);

            UpdateButtonColor();

            TextureSelector = new ScreenTextureSelector(engine, this);
            AddElement(TextureSelector);

            float _butHeight = PrevBox.Y + PrevBoxSize + boarderSize;
            ScreenButton _but = new ScreenButton(this, "Name", engine.FontMain);
            _but.Position.X = Screen.boarderSize * 3 + 2 * 32;
            _but.Position.Y = _butHeight;
            _but.Size.X = 48;
            this.AddElement(_but);
            _but = new ScreenButton(this, "Settings", engine.FontMain);
            _but.Position.X = Screen.boarderSize * 4 + 2 * 32 + 48;
            _but.Position.Y = _butHeight;
            _but.Size.X = 64;
            this.AddElement(_but);
            _but = new ScreenButton(this, "Save", engine.FontMain);
            _but.Position.X = Screen.boarderSize * 5 + 2 * 32 + 48 + 64;
            _but.Position.Y = _butHeight;
            _but.Size.X = 48;
            this.AddElement(_but);

            UpdateHeader();
        }