示例#1
0
        private void OnItemInteraction(EEInteractableItem item, SLabel label)
        {
            AssemblyContents cont = _assemblyMap[_assemblySelected];
            NamespaceMap     map  = cont.Namespaces.FirstOrDefault(n => n.Namespace == _namespaceDropdown.Selected.ReadableName);
            Type             type = map?.Types.FirstOrDefault(t => t.Name == item.Label.ReadableName);

            SelectedType = type;
            OnTypeSelected?.Invoke(type);
        }
示例#2
0
        /// <summary>
        /// Construct an InteractableItem. Foreach buttonLabel, a button will be created
        /// </summary>
        /// <param name="itemLabel"></param>
        /// <param name="buttonLabels"></param>
        public EEInteractableList(SLabel listLabel, params EEInteractableItem.Args[] interableItemArgs)
        {
            Label = listLabel;

            Items = interableItemArgs.Select(
                a =>
            {
                EEInteractableItem item = new EEInteractableItem(a);
                item.OnInteraction     += l => OnItemInteraction?.Invoke(item, l);
                return(item);
            }
                ).ToArray();
        }
示例#3
0
 private void _list_OnItemInteraction(EEInteractableItem arg1, SLabel arg2)
 {
     _response = $"The item {arg1.Label.ReadableName} was clicked with the {arg2.ReadableName} action";
 }