public void SelectionMade(ContextMenuItem item, ContextMenu.ContextMenuEventArgs e) { scrollMenu.DestroyAndChildren(); scrollMenu = null; textObj.Text = item.textObj.Text; selection = item; SetDeActivated(); }
public override void OnDeActivation() { base.OnDeActivation(); if (scrollMenu != null) { scrollMenu.DestroyAndChildren(); scrollMenu = null; } }
public override void OnActivation() { base.OnActivation(); scrollMenu = new ScrollMenu(scrollMenuTemplate, new Vector2(-transform.Size.X / 2, transform.Size.Y / 2 + scrollMenuTemplate.UpArrowSize.Y), this); scrollMenu.ContextMenuButtonPressEvent += new ContextMenu.ContextMenuDelegate(SelectionMade); }