예제 #1
0
        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);
        }
예제 #2
0
        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));
        }
예제 #3
0
        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));
        }