public sealed override void OnInitialize() { WindowPanel = new UIAdvPanel(); WindowPanel.OnMouseDown += new MouseEvent(DragStart); WindowPanel.OnMouseOver += new MouseEvent(Dragging); WindowPanel.OnMouseUp += new MouseEvent(DragEnd); WindowPanel.Color = Color.Transparent; Initialize(WindowPanel); this.Append(WindowPanel); }
public sealed override void OnInitialize() { WindowPanel = new UIAdvPanel(); WindowPanel.OnMouseDown += new MouseEvent(DragStart); WindowPanel.OnMouseOver += new MouseEvent(Dragging); WindowPanel.OnMouseUp += new MouseEvent(DragEnd); Initialize(WindowPanel); Texture2D closeTex = MusicBox.ModTexturesTable["CloseButton"]; close = new UIButton(closeTex, false); close.Left.Set(-30f, 1f); close.Top.Set(10f, 0f); close.Width.Set(20f, 0f); close.Height.Set(20f, 0f); close.ButtonDefaultColor = Color.White; close.ButtonChangeColor = Color.Red; close.OnClick += Close_OnClick; WindowPanel.Append(close); this.Append(WindowPanel); }
protected virtual void Initialize(UIAdvPanel WindowPanel) { }