예제 #1
0
파일: Panel.cs 프로젝트: veyvin/SystemWars
        public override void Anchor(AnchorPoint anchorPoint, GUIManager.ScreenPoint screenPoint, float xScreenRatioOffset, float yScreenRatioOffset)
        {
            int xOffset = GUIManager.ScreenRatioX(xScreenRatioOffset);
            int yOffset = GUIManager.ScreenRatioY(yScreenRatioOffset);

            Anchor(anchorPoint, screenPoint, new Vector2(xOffset, yOffset));
        }
예제 #2
0
파일: Panel.cs 프로젝트: veyvin/SystemWars
        public override void Anchor(AnchorPoint anchorPoint, GUIManager.ScreenPoint screenPoint, Vector2 offset)
        {
            Vector2 topLeftDiff  = GetAnchorOffset(anchorPoint);
            Vector2 screenAnchor = SystemCore.GUIManager.GetScreenPoint(screenPoint);

            screenAnchor += topLeftDiff;
            screenAnchor += offset;
            Rect          = new Rectangle((int)screenAnchor.X, (int)screenAnchor.Y, Rect.Width, Rect.Height);
        }
예제 #3
0
 public virtual void Anchor(AnchorPoint anchorPoint, GUIManager.ScreenPoint screenPoint, float xScreenRatioOffset, float yScreenRatioOffset)
 {
 }
예제 #4
0
 public virtual void Anchor(AnchorPoint anchorPoint, GUIManager.ScreenPoint screenPoint, Vector2 offset)
 {
 }