public void SetRelativePosition(Vector2 relativePosition, MenuEntry entry, bool defaultPosition) { var position = new Vector2(entry.Position.X, entry.Position.Y); if (entry.EntryTexture != null) { position.Y += entry.EntryTexture.Height; } SetPosition(Vector2.Add(position, relativePosition), defaultPosition); }
public void SetRelativePosition(Vector2 relativeDefaultPosition, Vector2 relativeCurrentPosition, MenuEntry entry) { var defaultPosition = new Vector2(entry.DefaultPosition.X, entry.DefaultPosition.Y); var currentPosition = new Vector2(entry.Position.X, entry.Position.Y); if (entry.EntryTexture != null) { defaultPosition.Y += entry.EntryTexture.Height; currentPosition.Y += entry.EntryTexture.Height; } SetPosition(Vector2.Add(defaultPosition, relativeDefaultPosition), Vector2.Add(currentPosition, relativeCurrentPosition)); }