override public GObject AddChildAt(GObject obj, int index) { if (_layoutObsolete == SINGLE_COLUMN) { obj.SetSize(this.viewWidth, obj.initHeight); } else if (_layoutObsolete == SINGLE_ROW) { obj.SetSize(obj.initWidth, this.viewHeight); } else { obj.SetSize(obj.initWidth, obj.initHeight); } base.AddChildAt(obj, index); if (obj is GButton) { GButton button = (GButton)(obj); button.relatedController = _selection; _selection.AddPageAt("", index); button.pageOption.index = index; //button.AddClickListener(__clickItemObsolete); // button.onTouchBegin.Add(__itemTouchBegin); button.onClick.Add(__clickItem); } return(obj); }
public void ShowModalWait(int requestingCmd = 0) { if (requestingCmd != 0) { _requestingCmd = requestingCmd; } if (UIConfig.windowModalWaiting != null) { if (_modalWaitPane == null) { _modalWaitPane = UIPackage.CreateObjectFromURL(UIConfig.windowModalWaiting); } _modalWaitPane.SetSize(this.width, this.height); AddChild(_modalWaitPane); } }
public void ReplaceMe(GObject target) { if (_parent == null) { throw new Exception("parent not set"); } target.name = this.name; target.alpha = _alpha; target.rotation = _rotation; target.visible = _visible; target.touchable = _touchable; target.grayed = _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); }