protected override void ItemSelected(AdvancedDropdownItem item) { var payloadItem = item as AdvancedDropdownItem <TPayload>; onItemSelectedCallback?.Invoke(payloadItem.payload); }
public static void Show(Rect buttonRect, AdvancedDropdownItem <TPayload> root, Action <TPayload> onItemSelectedCallback) { new BetterAdvancedDropdown <TPayload>(new AdvancedDropdownState(), root, onItemSelectedCallback) .Show(buttonRect); }
public BetterAdvancedDropdown(AdvancedDropdownState state, AdvancedDropdownItem <TPayload> root, Action <TPayload> onItemSelectedCallback) : base(state) { this.root = root; this.onItemSelectedCallback = onItemSelectedCallback; }