Beispiel #1
0
        protected override void ItemSelected(AdvancedDropdownItem item)
        {
            var payloadItem = item as AdvancedDropdownItem <TPayload>;

            onItemSelectedCallback?.Invoke(payloadItem.payload);
        }
Beispiel #2
0
 public static void Show(Rect buttonRect, AdvancedDropdownItem <TPayload> root, Action <TPayload> onItemSelectedCallback)
 {
     new BetterAdvancedDropdown <TPayload>(new AdvancedDropdownState(), root, onItemSelectedCallback)
     .Show(buttonRect);
 }
Beispiel #3
0
 public BetterAdvancedDropdown(AdvancedDropdownState state, AdvancedDropdownItem <TPayload> root, Action <TPayload> onItemSelectedCallback) : base(state)
 {
     this.root = root;
     this.onItemSelectedCallback = onItemSelectedCallback;
 }