void CreateModalLayer() { _modalLayer = new GGraph(); _modalLayer.DrawRect(this.width, this.height, 0, Color.white, UIConfig.modalLayerColor); _modalLayer.AddRelation(this, RelationType.Size); _modalLayer.name = _modalLayer.gameObjectName = "ModalLayer"; _modalLayer.SetHome(this); }
public GGraph CreateModalLayer() { var modal = new GGraph(); modal.DrawRect(this.width, this.height, 0, Color.white, UIConfig.modalLayerColor); modal.AddRelation(this, RelationType.Size); modal.name = modal.gameObjectName = "ModalLayer"; modal.SetHome(this); return(modal); }
private void AdjustModalLayer() { if (_modalLayer == null) { _modalLayer = new GGraph(); _modalLayer.DrawRect(this.width, this.height, 0, Color.white, UIConfig.modalLayerColor); _modalLayer.AddRelation(this, RelationType.Size); _modalLayer.gameObjectName = "ModalLayer"; _modalLayer.SetHome(this); } int cnt = this.numChildren; if (_modalWaitPane != null && _modalWaitPane.parent != null) { SetChildIndex(_modalWaitPane, cnt - 1); } for (int i = cnt - 1; i >= 0; i--) { GObject g = this.GetChildAt(i); if ((g is Window) && (g as Window).modal) { if (_modalLayer.parent == null) { AddChildAt(_modalLayer, i); } else { SetChildIndexBefore(_modalLayer, i); } return; } } if (_modalLayer.parent != null) { RemoveChild(_modalLayer); } }
private void AdjustModalLayer() { if (_modalLayer == null) { _modalLayer = new GGraph(); _modalLayer.DrawRect(this.width, this.height, 0, Color.white, UIConfig.modalLayerColor); _modalLayer.AddRelation(this, RelationType.Size); _modalLayer.gameObjectName = "ModalLayer"; _modalLayer.SetHome(this); } int cnt = this.numChildren; if (_modalWaitPane != null && _modalWaitPane.parent != null) SetChildIndex(_modalWaitPane, cnt - 1); for (int i = cnt - 1; i >= 0; i--) { GObject g = this.GetChildAt(i); if ((g is Window) && (g as Window).modal) { if (_modalLayer.parent == null) AddChildAt(_modalLayer, i); else SetChildIndexBefore(_modalLayer, i); return; } } if (_modalLayer.parent != null) RemoveChild(_modalLayer); }