virtual protected void LayoutModalWaitPane() { if (_contentArea != null) { Vector2 pt = _frame.LocalToGlobal(Vector2.zero); pt = this.GlobalToLocal(pt); _modalWaitPane.SetXY((int)pt.x + _contentArea.x, (int)pt.y + _contentArea.y); _modalWaitPane.SetSize(_contentArea.width, _contentArea.height); } else { _modalWaitPane.SetSize(this.width, this.height); } }
/// <summary> /// Replace this object to another object in the display list. /// 在显示列表中,将指定对象取代这个图形对象。这个图形对象相当于一个占位的用途。 /// </summary> /// <param name="target">Target object.</param> public void ReplaceMe(GObject target) { if (parent == null) { throw new Exception("parent not set"); } target.name = this.name; target.alpha = this.alpha; target.rotation = this.rotation; target.visible = this.visible; target.touchable = this.touchable; target.grayed = this.grayed; target.SetXY(this.x, this.y); target.SetSize(this.width, this.height); int index = parent.GetChildIndex(this); parent.AddChildAt(target, index); target.relations.CopyFrom(this.relations); parent.RemoveChild(this, true); }
/// <summary> /// Replace this object to another object in the display list. /// 在显示列表中,将指定对象取代这个图形对象。这个图形对象相当于一个占位的用途。 /// </summary> /// <param name="target">Target object.</param> public void ReplaceMe(GObject target) { if (parent == null) throw new Exception("parent not set"); target.name = this.name; target.alpha = this.alpha; target.rotation = this.rotation; target.visible = this.visible; target.touchable = this.touchable; target.grayed = this.grayed; target.SetXY(this.x, this.y); target.SetSize(this.width, this.height); int index = parent.GetChildIndex(this); parent.AddChildAt(target, index); target.relations.CopyFrom(this.relations); parent.RemoveChild(this, true); }