private void SetElementPositions(int width, int height) { _drawRectangle.X = TMBAW_Game.UserResWidth / 2 - _drawRectangle.Width / 2; _drawRectangle.Y = 0; brushButton.SetPosition(new Vector2(11 * 2, 11 * 2), _drawRectangle); eraserButton.SetPosition(new Vector2(29 * 2, 11 * 2), _drawRectangle); selectButton.SetPosition(new Vector2(47 * 2, 11 * 2), _drawRectangle); wallButton.SetPosition(new Vector2(65 * 2, 11 * 2), _drawRectangle); expandButton.SetPosition(new Vector2(293 * 2, 17 * 2), _drawRectangle); playButton.SetPosition(new Vector2(336 * 2, 11 * 2), _drawRectangle); lightingButton.SetPosition(new Vector2(318 * 2, 11 * 2), _drawRectangle); optionsButton.SetPosition(new Vector2(354 * 2, 11 * 2), _drawRectangle); // Minimap buttons. plusButton.SetPosition(new Vector2(TMBAW_Game.UserResWidth - 18 * 2, TMBAW_Game.UserResHeight - 112 * 2)); minusButton.SetPosition(new Vector2(TMBAW_Game.UserResWidth - 18 * 2, TMBAW_Game.UserResHeight - 94 * 2)); }
private void SetElementPositions(int width, int height) { _boundsDrawRectangle.X = TMBAW_Game.UserResWidth / 2 - _boundsDrawRectangle.Width / 2; _boundsDrawRectangle.Y = TMBAW_Game.UserResHeight / 2 - _boundsDrawRectangle.Height / 2; // Defines how big the level selection box will be based on the game's resolution. _scissorRectangle = new Rectangle(_boundsDrawRectangle.X + 12, _boundsDrawRectangle.Y + 12, _boundsDrawRectangle.Width - 24, _boundsDrawRectangle.Height - 24); // Defines where the function buttons will be. _functionButtonContainer = new Rectangle(_scissorRectangle.X + _scissorRectangle.Width - (4 + 128 + 16 + 32), _scissorRectangle.Y + _scissorRectangle.Height + 8, 184, 40); _playButton.SetPosition(new Vector2(4 + IconButton.Size * 0, 4), _functionButtonContainer); _editButton.SetPosition(new Vector2(4 + IconButton.Size * 1 + 4, 4), _functionButtonContainer); _renameButton.SetPosition(new Vector2(4 + IconButton.Size * 2 + 8, 4), _functionButtonContainer); _deleteButton.SetPosition(new Vector2(4 + IconButton.Size * 3 + 12, 4), _functionButtonContainer); _newButton.SetPosition(new Vector2(4 + IconButton.Size * 4 + 16, 4), _functionButtonContainer); _backButton.SetPosition(new Vector2(-500 + IconButton.Size * 3 + 4, 4), _functionButtonContainer); // Define the SpriteFont for the "Select Level" header and its position. _headerPos = new Vector2(_scissorRectangle.X, _scissorRectangle.Y - _headerFont.LineSpacing - (10)); }