SetLocation() public method

public SetLocation ( int left, int top ) : void
left int
top int
return void
示例#1
0
        public void SetLocation(int left, int top)
        {
            UI.UIBox box = uiElem as UI.UIBox;
            if (box == null)
            {
                return;
            }

            box.SetLocation(left, top);
        }
 public UIHolderBox WrapWithHolderBox(int x, int y, UIBox uibox)
 {
     //create holder ui
     var box1 = new UIHolderBox(uibox.Width + 10, uibox.Height + 10);
     uibox.SetLocation(5, 5);
     box1.AddChild(uibox);
     box1.SetLocation(x, y);
     box1.TargetBox = uibox;
     SetupActiveBoxProperties(box1);
     userBoxes.Add(box1);
     return box1;
 }
 public UIHolderBox AddExternalControl(int x, int y, UIBox uibox)
 {
     //create holder ui
     var box1 = new UIHolderBox(uibox.Width + 10, uibox.Height + 10);
     uibox.SetLocation(5, 5);
     box1.AddChild(uibox);
     box1.SetLocation(x, y);
     box1.TargetBox = uibox;
     SetupActiveBoxProperties(box1);
     viewport.AddContent(box1);
     userBoxes.Add(box1);
     return box1;
 }